Bank implementation (#512)
* get currency refactor * bank work * finish vault markers * add bank doors * map update * loadouts * Update CP14StationTravelingStoreShipTargetComponent.cs * oopsie
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Content.Server._CP14.Objectives.Systems;
|
||||
using Content.Server._CP14.StealArea;
|
||||
using Content.Server.Objectives.Systems;
|
||||
using Content.Server.Thief.Systems;
|
||||
|
||||
@@ -6,7 +8,7 @@ namespace Content.Server.Objectives.Components;
|
||||
/// <summary>
|
||||
/// An abstract component that allows other systems to count adjacent objects as "stolen" when controlling other systems
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(StealConditionSystem), typeof(ThiefBeaconSystem))]
|
||||
[RegisterComponent, Access(typeof(StealConditionSystem), typeof(ThiefBeaconSystem), typeof(CP14CurrencyCollectConditionSystem), typeof(CP14StealAreaAutoJobConnectSystem))] //CP14 add currency condition access
|
||||
public sealed partial class StealAreaComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -6,7 +6,7 @@ using Content.Shared._CP14.TravelingStoreShip.Prototype;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server._CP14.TravelingStoreShip;
|
||||
namespace Content.Server._CP14.Cargo;
|
||||
|
||||
public sealed partial class CP14CargoSystem
|
||||
{
|
||||
@@ -2,7 +2,7 @@ using System.Text;
|
||||
using Content.Shared._CP14.TravelingStoreShip;
|
||||
using Content.Shared.UserInterface;
|
||||
|
||||
namespace Content.Server._CP14.TravelingStoreShip;
|
||||
namespace Content.Server._CP14.Cargo;
|
||||
|
||||
public sealed partial class CP14CargoSystem
|
||||
{
|
||||
@@ -16,7 +16,7 @@ using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server._CP14.TravelingStoreShip;
|
||||
namespace Content.Server._CP14.Cargo;
|
||||
|
||||
public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Content.Server._CP14.TravelingStoreShip;
|
||||
namespace Content.Server._CP14.Cargo;
|
||||
|
||||
[RegisterComponent, Access(typeof(CP14CargoSystem)), AutoGenerateComponentPause]
|
||||
public sealed partial class CP14TravelingStoreShipComponent : Component
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace Content.Server._CP14.TravelingStoreShip;
|
||||
namespace Content.Server._CP14.Cargo;
|
||||
|
||||
/// <summary>
|
||||
/// One of the possible points where an traveling store ship might land
|
||||
@@ -30,11 +30,25 @@ public sealed partial class CP14CurrencySystem : CP14SharedCurrencySystem
|
||||
|
||||
SubscribeLocalEvent<CP14CurrencyConverterComponent, InteractUsingEvent>(OnInteractUsing);
|
||||
SubscribeLocalEvent<CP14CurrencyConverterComponent, GetVerbsEvent<Verb>>(OnGetVerb);
|
||||
|
||||
SubscribeLocalEvent<CP14CurrencyComponent, CP14GetCurrencyEvent>(OnGetCurrency);
|
||||
}
|
||||
|
||||
private void OnGetCurrency(Entity<CP14CurrencyComponent> ent, ref CP14GetCurrencyEvent args)
|
||||
{
|
||||
var total = ent.Comp.Currency;
|
||||
|
||||
if (TryComp<StackComponent>(ent, out var stack))
|
||||
{
|
||||
total *= stack.Count;
|
||||
}
|
||||
|
||||
args.Currency += total;
|
||||
}
|
||||
|
||||
private void OnExamine(Entity<CP14CurrencyComponent> currency, ref ExaminedEvent args)
|
||||
{
|
||||
var total = GetTotalCurrency(currency, currency.Comp);
|
||||
var total = GetTotalCurrency(currency);
|
||||
|
||||
var push = Loc.GetString("cp14-currency-examine-title");
|
||||
push += GetCurrencyPrettyString(total);
|
||||
|
||||
@@ -73,7 +73,10 @@ public sealed class CP14CommonObjectivesRule : GameRuleSystem<CP14CommonObjectiv
|
||||
objective = null;
|
||||
|
||||
if (!_proto.HasIndex<EntityPrototype>(objectiveProto))
|
||||
{
|
||||
Log.Error($"Invalid objective prototype {objectiveProto}, don't found entity prototype");
|
||||
return false;
|
||||
}
|
||||
|
||||
objective = Spawn(objectiveProto);
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using Content.Server._CP14.Objectives.Systems;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server._CP14.Objectives.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(CP14CurrencyCollectConditionSystem))]
|
||||
public sealed partial class CP14CurrencyStoredConditionComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public int Currency = 1000;
|
||||
|
||||
[DataField(required: true)]
|
||||
public LocId ObjectiveText;
|
||||
|
||||
[DataField(required: true)]
|
||||
public LocId ObjectiveDescription;
|
||||
|
||||
[DataField(required: true)]
|
||||
public SpriteSpecifier ObjectiveSprite;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using Content.Server._CP14.Objectives.Components;
|
||||
using Content.Server.Objectives.Components;
|
||||
using Content.Shared._CP14.Currency;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Movement.Pulling.Components;
|
||||
@@ -14,36 +16,50 @@ public sealed class CP14CurrencyCollectConditionSystem : EntitySystem
|
||||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
[Dependency] private readonly SharedObjectivesSystem _objectives = default!;
|
||||
[Dependency] private readonly CP14SharedCurrencySystem _currency = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
|
||||
|
||||
private EntityQuery<ContainerManagerComponent> _containerQuery;
|
||||
|
||||
private HashSet<Entity<TransformComponent>> _nearestEnts = new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_containerQuery = GetEntityQuery<ContainerManagerComponent>();
|
||||
|
||||
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveAssignedEvent>(OnAssigned);
|
||||
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveAfterAssignEvent>(OnAfterAssign);
|
||||
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveGetProgressEvent>(OnGetProgress);
|
||||
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveAfterAssignEvent>(OnCollectAfterAssign);
|
||||
SubscribeLocalEvent<CP14CurrencyStoredConditionComponent, ObjectiveAfterAssignEvent>(OnStoredAfterAssign);
|
||||
|
||||
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveGetProgressEvent>(OnCollectGetProgress);
|
||||
SubscribeLocalEvent<CP14CurrencyStoredConditionComponent, ObjectiveGetProgressEvent>(OnStoredGetProgress);
|
||||
}
|
||||
|
||||
private void OnAssigned(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveAssignedEvent args)
|
||||
{
|
||||
}
|
||||
|
||||
private void OnAfterAssign(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
|
||||
private void OnCollectAfterAssign(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
|
||||
{
|
||||
_metaData.SetEntityName(condition.Owner, Loc.GetString(condition.Comp.ObjectiveText), args.Meta);
|
||||
_metaData.SetEntityDescription(condition.Owner, Loc.GetString(condition.Comp.ObjectiveDescription, ("coins", _currency.GetCurrencyPrettyString(condition.Comp.Currency))), args.Meta);
|
||||
_objectives.SetIcon(condition.Owner, condition.Comp.ObjectiveSprite);
|
||||
}
|
||||
|
||||
private void OnGetProgress(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveGetProgressEvent args)
|
||||
private void OnStoredAfterAssign(Entity<CP14CurrencyStoredConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
|
||||
{
|
||||
_metaData.SetEntityName(condition.Owner, Loc.GetString(condition.Comp.ObjectiveText), args.Meta);
|
||||
_metaData.SetEntityDescription(condition.Owner, Loc.GetString(condition.Comp.ObjectiveDescription, ("coins", _currency.GetCurrencyPrettyString(condition.Comp.Currency))), args.Meta);
|
||||
_objectives.SetIcon(condition.Owner, condition.Comp.ObjectiveSprite);
|
||||
}
|
||||
|
||||
private void OnCollectGetProgress(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveGetProgressEvent args)
|
||||
{
|
||||
args.Progress = GetProgress(args.Mind, condition);
|
||||
}
|
||||
|
||||
private void OnStoredGetProgress(Entity<CP14CurrencyStoredConditionComponent> condition, ref ObjectiveGetProgressEvent args)
|
||||
{
|
||||
args.Progress = GetStoredProgress(args.Mind, condition);
|
||||
}
|
||||
|
||||
private float GetProgress(MindComponent mind, CP14CurrencyCollectConditionComponent condition)
|
||||
{
|
||||
if (!_containerQuery.TryGetComponent(mind.OwnedEntity, out var currentManager))
|
||||
@@ -53,12 +69,13 @@ public sealed class CP14CurrencyCollectConditionSystem : EntitySystem
|
||||
var count = 0;
|
||||
|
||||
//check pulling object
|
||||
if (TryComp<PullerComponent>(mind.OwnedEntity, out var pull)) //TO DO: to make the code prettier? don't like the repetition
|
||||
if (TryComp<PullerComponent>(mind.OwnedEntity,
|
||||
out var pull)) //TO DO: to make the code prettier? don't like the repetition
|
||||
{
|
||||
var pulledEntity = pull.Pulling;
|
||||
if (pulledEntity != null)
|
||||
{
|
||||
CheckEntity(pulledEntity.Value, condition, ref containerStack, ref count);
|
||||
CheckEntity(pulledEntity.Value, ref containerStack, ref count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,12 +97,39 @@ public sealed class CP14CurrencyCollectConditionSystem : EntitySystem
|
||||
}
|
||||
} while (containerStack.TryPop(out currentManager));
|
||||
|
||||
var result = count / (float) condition.Currency;
|
||||
var result = count / (float)condition.Currency;
|
||||
result = Math.Clamp(result, 0, 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void CheckEntity(EntityUid entity, CP14CurrencyCollectConditionComponent condition, ref Stack<ContainerManagerComponent> containerStack, ref int counter)
|
||||
private float GetStoredProgress(MindComponent mind, CP14CurrencyStoredConditionComponent condition)
|
||||
{
|
||||
var containerStack = new Stack<ContainerManagerComponent>();
|
||||
var count = 0;
|
||||
|
||||
var areasQuery = AllEntityQuery<StealAreaComponent, TransformComponent>();
|
||||
while (areasQuery.MoveNext(out var uid, out var area, out var xform))
|
||||
{
|
||||
if (!area.Owners.Contains(mind.Owner))
|
||||
continue;
|
||||
|
||||
_nearestEnts.Clear();
|
||||
_lookup.GetEntitiesInRange(xform.Coordinates, area.Range, _nearestEnts);
|
||||
foreach (var ent in _nearestEnts)
|
||||
{
|
||||
if (!_interaction.InRangeUnobstructed((uid, xform), (ent, ent.Comp), area.Range))
|
||||
continue;
|
||||
|
||||
CheckEntity(ent, ref containerStack, ref count);
|
||||
}
|
||||
}
|
||||
|
||||
var result = count / (float)condition.Currency;
|
||||
result = Math.Clamp(result, 0, 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void CheckEntity(EntityUid entity, ref Stack<ContainerManagerComponent> containerStack, ref int counter)
|
||||
{
|
||||
// check if this is the item
|
||||
counter += _currency.GetTotalCurrency(entity);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._CP14.StealArea;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[RegisterComponent, AutoGenerateComponentPause]
|
||||
public sealed partial class CP14StealAreaAutoJobConnectComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public HashSet<ProtoId<JobPrototype>> Jobs = new();
|
||||
|
||||
[DataField]
|
||||
public HashSet<ProtoId<DepartmentPrototype>> Departments = new();
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Objectives.Components;
|
||||
using Content.Shared.Roles.Jobs;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._CP14.StealArea;
|
||||
|
||||
public sealed class CP14StealAreaAutoJobConnectSystem : EntitySystem
|
||||
{
|
||||
|
||||
[Dependency] private readonly MindSystem _mind = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly SharedJobSystem _job = default!;
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<CP14StealAreaAutoJobConnectComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<PlayerSpawnCompleteEvent>(OnPlayerSpawning);
|
||||
}
|
||||
|
||||
private void OnMapInit(Entity<CP14StealAreaAutoJobConnectComponent> autoConnect, ref MapInitEvent args)
|
||||
{
|
||||
if (!TryComp<StealAreaComponent>(autoConnect, out var stealArea))
|
||||
return;
|
||||
|
||||
foreach (var player in _playerManager.Sessions)
|
||||
{
|
||||
if (!_mind.TryGetMind(player.UserId, out var playerMind))
|
||||
continue;
|
||||
|
||||
if (!_job.MindTryGetJob(playerMind, out var playerJob))
|
||||
continue;
|
||||
|
||||
if (stealArea.Owners.Contains(playerMind.Value))
|
||||
continue;
|
||||
|
||||
if (autoConnect.Comp.Jobs.Contains(playerJob))
|
||||
{
|
||||
stealArea.Owners.Add(playerMind.Value);
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var depObj in autoConnect.Comp.Departments)
|
||||
{
|
||||
if (!_proto.TryIndex(depObj, out var indexedDepart))
|
||||
continue;
|
||||
|
||||
if (!indexedDepart.Roles.Contains(playerJob))
|
||||
continue;
|
||||
|
||||
stealArea.Owners.Add(playerMind.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPlayerSpawning(PlayerSpawnCompleteEvent ev)
|
||||
{
|
||||
if (!_mind.TryGetMind(ev.Player.UserId, out var mind))
|
||||
return;
|
||||
|
||||
var query = EntityQueryEnumerator<StealAreaComponent, CP14StealAreaAutoJobConnectComponent>();
|
||||
while (query.MoveNext(out var uid, out var stealArea, out var autoConnect))
|
||||
{
|
||||
if (stealArea.Owners.Contains(mind.Value))
|
||||
continue;
|
||||
|
||||
if (ev.JobId is null)
|
||||
continue;
|
||||
|
||||
if (autoConnect.Jobs.Contains(ev.JobId))
|
||||
{
|
||||
stealArea.Owners.Add(mind.Value);
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var depObj in autoConnect.Departments)
|
||||
{
|
||||
if (!_proto.TryIndex(depObj, out var indexedDepart))
|
||||
continue;
|
||||
|
||||
if (!indexedDepart.Roles.Contains(ev.JobId))
|
||||
continue;
|
||||
|
||||
stealArea.Owners.Add(mind.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,21 +39,21 @@ public partial class CP14SharedCurrencySystem : EntitySystem
|
||||
|
||||
public int GetTotalCurrency(EntityUid uid)
|
||||
{
|
||||
if (!TryComp<CP14CurrencyComponent>(uid, out var currency))
|
||||
return 0;
|
||||
var ev = new CP14GetCurrencyEvent();
|
||||
RaiseLocalEvent(uid, ev);
|
||||
|
||||
return GetTotalCurrency(uid, currency);
|
||||
}
|
||||
|
||||
public int GetTotalCurrency(EntityUid uid, CP14CurrencyComponent currency)
|
||||
{
|
||||
var total = currency.Currency;
|
||||
|
||||
if (TryComp<StackComponent>(uid, out var stack))
|
||||
{
|
||||
total *= stack.Count;
|
||||
}
|
||||
|
||||
return total;
|
||||
return (int)(ev.Currency * ev.Multiplier);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CP14GetCurrencyEvent : EntityEventArgs
|
||||
{
|
||||
public int Currency;
|
||||
public float Multiplier;
|
||||
|
||||
public CP14GetCurrencyEvent(int cur = 0, int mult = 1)
|
||||
{
|
||||
Currency = cur;
|
||||
Multiplier = mult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ public sealed partial class CP14StationTravelingStoreShipTargetComponent : Compo
|
||||
public TimeSpan NextTravelTime = TimeSpan.Zero;
|
||||
|
||||
[DataField]
|
||||
public TimeSpan StationWaitTime = TimeSpan.FromMinutes(1);
|
||||
public TimeSpan StationWaitTime = TimeSpan.FromMinutes(6);
|
||||
|
||||
[DataField]
|
||||
public TimeSpan TradePostWaitTime = TimeSpan.FromMinutes(1);
|
||||
public TimeSpan TradePostWaitTime = TimeSpan.FromMinutes(4);
|
||||
|
||||
[DataField]
|
||||
public Dictionary<CP14StoreBuyPositionPrototype, int> CurrentBuyPositions = new(); //Proto, price
|
||||
|
||||
@@ -2,4 +2,7 @@ cp14-objective-issuer-town = [color=#fcae38]Orders of the Empire[/color]
|
||||
|
||||
cp14-objective-town-send-title = Extract { $itemName }
|
||||
cp14-objective-town-send-desc = Your task is to mine and ship { $itemName } to the city on a merchant ship.
|
||||
cp14-objective-town-send-multiply-desc = Your task is to mine and ship { $count } { $itemName } to the city on a merchant ship.
|
||||
cp14-objective-town-send-multiply-desc = Your task is to mine and ship { $count } { $itemName } to the city on a merchant ship.
|
||||
|
||||
cp14-objective-bank-earning-title = Increase the bank's wealth
|
||||
cp14-objective-bank-earning-desc = There must be at least { $coins } in the bank vault. You can use any methods of earning money that do not violate the law.
|
||||
@@ -2,4 +2,7 @@ cp14-objective-issuer-town = [color=#fcae38]Приказ империи[/color]
|
||||
|
||||
cp14-objective-town-send-title = Добыть { $itemName }
|
||||
cp14-objective-town-send-desc = Ваша задача - добыть и отправить { $itemName } в город на торговом корабле.
|
||||
cp14-objective-town-send-multiply-desc = Ваша задача - добыть и отправить { $count } { $itemName } в город на торговом корабле.
|
||||
cp14-objective-town-send-multiply-desc = Ваша задача - добыть и отправить { $count } { $itemName } в город на торговом корабле.
|
||||
|
||||
cp14-objective-bank-earning-title = Преумножить состояние
|
||||
cp14-objective-bank-earning-desc = В банковском хранилище должно находиться не меньше { $coins }. Вы можете использовать любые методы заработка, не нарушающие закон.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,4 +33,31 @@
|
||||
- id: CP14VialTinyChromiumSlime
|
||||
prob: 0.3
|
||||
- id: CP14VialTinyLumiMushroom
|
||||
prob: 0.3
|
||||
prob: 0.3
|
||||
|
||||
- type: entity
|
||||
parent: CP14WoodenCloset
|
||||
id: CP14WoodenClosetBankerFilled
|
||||
suffix: Banker, Filled
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: HandLabeler #TODO custom cp14 labeler
|
||||
- id: CP14PaperFolderRed
|
||||
amount: 2
|
||||
- id: CP14PaperFolderBlue
|
||||
amount: 2
|
||||
- id: CP14PaperFolderRed
|
||||
prob: 0.5
|
||||
- id: CP14PaperFolderBlue
|
||||
prob: 0.5
|
||||
- id: CP14Paper
|
||||
amount: 2
|
||||
- id: CP14PenFeather
|
||||
amount: 2
|
||||
- id: CP14Inkwell
|
||||
prob: 0.2
|
||||
- id: CP14CopperCoin5
|
||||
prob: 0.2
|
||||
- id: CP14SilverCoin1
|
||||
prob: 0.2
|
||||
@@ -14,4 +14,22 @@
|
||||
- id: CP14ClothingHeadAlchemistBeret
|
||||
prob: 0.6
|
||||
- id: CP14ClothingHeadAlchemistBandana
|
||||
prob: 0.6
|
||||
prob: 0.6
|
||||
|
||||
- type: entity
|
||||
parent: CP14WoodenCabinet
|
||||
id: CP14WoodenCabinetBanker
|
||||
suffix: Banker, Filled
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: CP14ClothingHeadBowler
|
||||
prob: 0.5
|
||||
- id: CP14ClothingPantsAristocratic
|
||||
prob: 0.5
|
||||
- id: CP14ClothingShirtBanker
|
||||
prob: 0.5
|
||||
- id: CP14ClothingEyesMonocle
|
||||
prob: 0.2
|
||||
- id: CP14ClothingEyesGlasses
|
||||
prob: 0.3
|
||||
@@ -1,10 +0,0 @@
|
||||
- type: entity
|
||||
id: CP14ExpeditionShipTargetPoint
|
||||
parent: MarkerBase
|
||||
name: Expedition ship target point
|
||||
description: One of the possible arrival points of a ship carrying players
|
||||
categories: [ ForkFiltered ]
|
||||
components:
|
||||
- type: CP14ExpeditionShipFTLTarget
|
||||
- type: Sprite
|
||||
state: pink
|
||||
29
Resources/Prototypes/_CP14/Entities/Markers/misc.yml
Normal file
29
Resources/Prototypes/_CP14/Entities/Markers/misc.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
- type: entity
|
||||
id: CP14ExpeditionShipTargetPoint
|
||||
parent: MarkerBase
|
||||
name: Expedition ship target point
|
||||
description: One of the possible arrival points of a ship carrying players
|
||||
categories: [ ForkFiltered ]
|
||||
components:
|
||||
- type: CP14ExpeditionShipFTLTarget
|
||||
- type: Sprite
|
||||
state: pink
|
||||
|
||||
- type: entity
|
||||
id: CP14BankStorageMarker
|
||||
parent: MarkerBase
|
||||
categories: [ ForkFiltered ]
|
||||
name: Bank vault marker
|
||||
suffix: ONCE ON MAP
|
||||
description: Marks the specified area as a “bank vault” to credit all bankers with treasure storage goals
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: pink
|
||||
- sprite: /Textures/_CP14/Objects/Economy/jewelry.rsi
|
||||
state: ruby1
|
||||
- type: StealArea
|
||||
range: 2
|
||||
- type: CP14StealAreaAutoJobConnect
|
||||
departments:
|
||||
- CP14Bank
|
||||
@@ -40,10 +40,10 @@
|
||||
id: CP14JewelryEmerald
|
||||
name: emerald
|
||||
description: A beautiful emerald stone that's worth a lot of money.
|
||||
suffix: 20gp
|
||||
suffix: 40gp
|
||||
components:
|
||||
- type: CP14Currency
|
||||
currency: 2000
|
||||
currency: 4000
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: emerald1
|
||||
|
||||
@@ -42,3 +42,111 @@
|
||||
#- type: Construction
|
||||
# graph: CP14WoodenDoor
|
||||
# node: CP14WoodenDoorMirrored
|
||||
|
||||
# Bank
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankStaff
|
||||
suffix: Bank Staff
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankStaff
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent:
|
||||
- CP14IronDoorBankStaff
|
||||
- CP14IronDoorMirrored
|
||||
id: CP14IronDoorMirroredBankStaff
|
||||
suffix: Bank Staff, Mirrored
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankVault
|
||||
suffix: Bank Vault
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankVault
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent:
|
||||
- CP14IronDoorBankVault
|
||||
- CP14IronDoorMirrored
|
||||
id: CP14IronDoorMirroredBankVault
|
||||
suffix: Bank Vault, Mirrored
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe1
|
||||
suffix: Bank Safe 1
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe1
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankCommandantRoom
|
||||
suffix: Bank Commandant room
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankCommandantRoom
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe2
|
||||
suffix: Bank Safe 2
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe2
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe3
|
||||
suffix: Bank Safe 3
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe3
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe4
|
||||
suffix: Bank Safe 4
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe4
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe5
|
||||
suffix: Bank Safe 5
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe5
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoor
|
||||
id: CP14IronDoorBankSafe6
|
||||
suffix: Bank Safe 6
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankSafe6
|
||||
- type: Lock
|
||||
locked: true
|
||||
@@ -45,3 +45,22 @@
|
||||
#- type: Construction
|
||||
# graph: CP14WoodenDoor
|
||||
# node: CP14WoodenDoorMirrored
|
||||
|
||||
# Bank
|
||||
|
||||
- type: entity
|
||||
parent: CP14IronDoorWindowed
|
||||
id: CP14IronDoorWindowedBankEntrance
|
||||
suffix: Bank Entrance
|
||||
components:
|
||||
- type: CP14Lock
|
||||
autoGenerateShape: BankEntrance
|
||||
- type: Lock
|
||||
locked: true
|
||||
|
||||
- type: entity
|
||||
parent:
|
||||
- CP14IronDoorWindowedBankEntrance
|
||||
- CP14IronDoorWindowedMirrored
|
||||
id: CP14IronDoorWindowedMirroredBankEntrance
|
||||
suffix: Bank Entrance, Mirrored
|
||||
@@ -59,4 +59,38 @@
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: CP14KeyAlchemy
|
||||
- id: CP14KeyAlchemy
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKeyRing
|
||||
id: CP14KeyRingBanker
|
||||
suffix: Banker
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: CP14KeyBankEntrance
|
||||
- id: CP14KeyBankStaff
|
||||
- id: CP14KeyBankSafe1
|
||||
- id: CP14KeyBankSafe2
|
||||
- id: CP14KeyBankSafe3
|
||||
- id: CP14KeyBankSafe4
|
||||
- id: CP14KeyBankSafe5
|
||||
- id: CP14KeyBankSafe6
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKeyRing
|
||||
id: CP14KeyRingCommandant
|
||||
suffix: Commandant
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: CP14KeyBankCommandantRoom
|
||||
- id: CP14KeyBankVault
|
||||
- id: CP14KeyBankEntrance
|
||||
- id: CP14KeyBankStaff
|
||||
- id: CP14KeyBankSafe1
|
||||
- id: CP14KeyBankSafe2
|
||||
- id: CP14KeyBankSafe3
|
||||
- id: CP14KeyBankSafe4
|
||||
- id: CP14KeyBankSafe5
|
||||
- id: CP14KeyBankSafe6
|
||||
@@ -115,4 +115,104 @@
|
||||
- type: Sprite
|
||||
state: key8
|
||||
- type: CP14Key
|
||||
autoGenerateShape: Alchemy
|
||||
autoGenerateShape: Alchemy
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankEntrance
|
||||
name: bank entrance key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key9
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankEntrance
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankStaff
|
||||
name: bank staff key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key10
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankStaff
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankVault
|
||||
name: bank vault key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key11
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankVault
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankCommandantRoom
|
||||
name: bank commandant room key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key11
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankCommandantRoom
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe1
|
||||
name: bank safe 1 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe1
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe2
|
||||
name: bank safe 2 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe2
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe3
|
||||
name: bank safe 3 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe3
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe4
|
||||
name: bank safe 4 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe4
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe5
|
||||
name: bank safe 5 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe5
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseKey
|
||||
id: CP14KeyBankSafe6
|
||||
name: bank safe 6 key
|
||||
components:
|
||||
- type: Sprite
|
||||
state: key12
|
||||
- type: CP14Key
|
||||
autoGenerateShape: BankSafe6
|
||||
@@ -15,6 +15,8 @@
|
||||
departmentObjectives:
|
||||
CP14Command:
|
||||
- CP14TownSendObjectiveGroup
|
||||
CP14Bank:
|
||||
- CP14BankEarningObjectiveGroup
|
||||
- type: CP14PersonalObjectivesRule
|
||||
departmentObjectives:
|
||||
CP14Mercenary:
|
||||
|
||||
@@ -2,6 +2,49 @@
|
||||
id: Debug
|
||||
complexity: 10
|
||||
|
||||
# Bank
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankEntrance
|
||||
complexity: 3
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankStaff
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankVault
|
||||
complexity: 7
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankCommandantRoom
|
||||
complexity: 7
|
||||
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe1
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe2
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe3
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe4
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe5
|
||||
complexity: 5
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: BankSafe6
|
||||
complexity: 5
|
||||
|
||||
# Tavern
|
||||
|
||||
- type: CP14LockCategory
|
||||
@@ -12,6 +55,7 @@
|
||||
id: TavernStaff
|
||||
complexity: 5
|
||||
|
||||
|
||||
- type: CP14LockCategory
|
||||
id: TavernDorms1
|
||||
complexity: 3
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
components:
|
||||
- type: Objective
|
||||
issuer: cp14-objective-issuer-town
|
||||
difficulty: 1
|
||||
|
||||
|
||||
# Send group
|
||||
@@ -13,13 +14,13 @@
|
||||
parent: CP14BaseTownObjective
|
||||
id: CP14BaseTownSendObjective
|
||||
components:
|
||||
- type: Objective
|
||||
- type: CP14TownSendCondition
|
||||
minCollectionSize: 5
|
||||
maxCollectionSize: 10
|
||||
objectiveText: cp14-objective-town-send-title
|
||||
descriptionText: cp14-objective-town-send-desc
|
||||
descriptionMultiplyText: cp14-objective-town-send-multiply-desc
|
||||
- type: Objective
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseTownSendObjective
|
||||
@@ -29,10 +30,35 @@
|
||||
collectGroup: CP14Gold
|
||||
minCollectionSize: 200
|
||||
maxCollectionSize: 250
|
||||
- type: Objective
|
||||
difficulty: 1
|
||||
|
||||
- type: weightedRandom
|
||||
id: CP14TownSendObjectiveGroup
|
||||
weights:
|
||||
CP14TownSendGoldObjective: 1
|
||||
CP14TownSendGoldObjective: 1
|
||||
|
||||
|
||||
#Bank money
|
||||
- type: entity
|
||||
abstract: true
|
||||
parent: CP14BaseTownObjective
|
||||
id: CP14BaseTownBankEarningObjective
|
||||
components:
|
||||
- type: CP14CurrencyStoredCondition
|
||||
objectiveText: cp14-objective-bank-earning-title
|
||||
objectiveDescription: cp14-objective-bank-earning-desc
|
||||
objectiveSprite:
|
||||
sprite: /Textures/_CP14/Objects/Economy/pp_coin.rsi
|
||||
state: coin10
|
||||
- type: Objective
|
||||
|
||||
- type: entity
|
||||
parent: CP14BaseTownBankEarningObjective
|
||||
id: CP14TownBankEarningObjective
|
||||
components:
|
||||
- type: CP14CurrencyStoredCondition
|
||||
currency: 50000
|
||||
|
||||
- type: weightedRandom
|
||||
id: CP14BankEarningObjectiveGroup
|
||||
weights:
|
||||
CP14TownBankEarningObjective: 1
|
||||
@@ -10,4 +10,5 @@
|
||||
- type: startingGear
|
||||
id: CP14BankerGear
|
||||
equipment:
|
||||
belt1: CP14KeyRingInnkeeper
|
||||
belt1: CP14WalletFilledTest
|
||||
keys: CP14KeyRingBanker
|
||||
@@ -14,4 +14,5 @@
|
||||
- type: startingGear
|
||||
id: CP14CommandantGear
|
||||
equipment:
|
||||
belt1: CP14KeyRingInnkeeper
|
||||
belt1: CP14WalletFilledTest
|
||||
keys: CP14KeyRingCommandant
|
||||
Reference in New Issue
Block a user