* trading portal replace traveling storeship

* clean up content

* clean up content 2

* seel and buy realization

* fixes

* Update migration.yml

* Update migration.yml

* Update dev_map.yml

* Update dev_map.yml

* thats work correctly now

* bugfies and visual

* factions

* faction restruct + name reduce

* unnesting sell cargo positions

* unnesting cargo positions

* more cargo content

* Update buy.yml

* improve tradeportal visual

* Update migration.yml

* Bank ad Commandant removal

* merchant objectives

* finish

* clean up content

* Update migration.yml

* fix goal calculation

* Update comoss.yml

* Update dev_map.yml
This commit is contained in:
Ed
2025-03-06 12:01:43 +03:00
committed by GitHub
parent 0d23f79eb6
commit c1acf81541
112 changed files with 7448 additions and 8815 deletions

View File

@@ -1,11 +1,19 @@
<Control xmlns="https://spacestation14.io">
<Button Name="ProductButton" Access="Public">
<BoxContainer Orientation="Horizontal">
<EntityPrototypeView Name="EntityView"
MinSize="48 48"
MaxSize="48 48"
Scale="2,2"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Visible="False"/>
<TextureRect Name="View"
MinSize="48 48"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Stretch="KeepAspectCentered" />
Stretch="KeepAspectCentered"
Visible="False"/>
<BoxContainer Orientation="Vertical">
<RichTextLabel Name="SpecialLabel" Text="{Loc 'cp14-store-ui-tab-special'}" VerticalAlignment="Center" Access="Public" Visible="False" />
<RichTextLabel Name="ProductName" VerticalAlignment="Center" Access="Public" />

View File

@@ -3,7 +3,6 @@ using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;
namespace Content.Client._CP14.TravelingStoreShip;
@@ -26,10 +25,16 @@ public sealed partial class CP14StoreProductControl : Control
ProductName.Text = $"[bold]{entry.Name}[/bold]";
SpecialLabel.Visible = entry.Special;
View.Texture = _sprite.Frame0(entry.Icon);
}
private void UpdateView(SpriteSpecifier spriteSpecifier)
{
if (entry.Icon is not null)
{
View.Visible = true;
View.Texture = _sprite.Frame0(entry.Icon);
}
else if (entry.EntityView is not null)
{
EntityView.Visible = true;
EntityView.SetPrototype(entry.EntityView);
}
}
}

View File

@@ -1,6 +1,7 @@
<DefaultWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'cp14-store-ui-title'}"
Name="Window"
Title=""
MinSize="800 600"
SetSize="800 600">
<BoxContainer Orientation="Horizontal">

View File

@@ -11,9 +11,6 @@ public sealed partial class CP14StoreWindow : DefaultWindow
{
[Dependency] private readonly IGameTiming _timing = default!;
private TimeSpan? _nextTravelTime;
private bool _onStation;
public CP14StoreWindow()
{
RobustXamlLoader.Load(this);
@@ -25,24 +22,8 @@ public sealed partial class CP14StoreWindow : DefaultWindow
public void UpdateUI(CP14StoreUiState state)
{
Window.Title = Loc.GetString("cp14-store-ui-title", ("name", state.ShopName));
UpdateProducts(state);
_nextTravelTime = state.NextTravelTime;
_onStation = state.OnStation;
}
protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
//Updating time
if (_nextTravelTime is not null)
{
var time = _nextTravelTime.Value - _timing.CurTime;
TravelTimeLabel.Text =
$"{Loc.GetString(_onStation ? "cp14-store-ui-next-travel-out" : "cp14-store-ui-next-travel-in")} {Math.Max(time.Minutes, 0):00}:{Math.Max(time.Seconds, 0):00}";
}
}
private void UpdateProducts(CP14StoreUiState state)

View File

@@ -0,0 +1,55 @@
using Content.Server.Storage.Components;
using Content.Shared._CP14.Cargo;
using Content.Shared.Storage.Components;
namespace Content.Server._CP14.Cargo;
public sealed partial class CP14CargoSystem
{
private void InitializePortals()
{
SubscribeLocalEvent<CP14TradingPortalComponent, MapInitEvent>(OnTradePortalMapInit);
SubscribeLocalEvent<CP14TradingPortalComponent, StorageAfterCloseEvent>(OnTradePortalClose);
SubscribeLocalEvent<CP14TradingPortalComponent, StorageAfterOpenEvent>(OnTradePortalOpen);
}
private void UpdatePortals(float frameTime)
{
var query = EntityQueryEnumerator<CP14TradingPortalComponent, EntityStorageComponent>();
while (query.MoveNext(out var ent, out var portal, out var storage))
{
if (portal.ProcessFinishTime == TimeSpan.Zero || portal.ProcessFinishTime >= _timing.CurTime)
continue;
portal.ProcessFinishTime = TimeSpan.Zero;
SellingThings((ent, portal), storage);
TopUpBalance((ent, portal), storage);
BuyThings((ent, portal), storage);
CashOut((ent, portal), storage);
ThrowAllItems((ent, portal), storage);
}
}
private void OnTradePortalMapInit(Entity<CP14TradingPortalComponent> ent, ref MapInitEvent args)
{
AddRoundstartTradingPositions(ent);
UpdateStaticPositions(ent);
ent.Comp.CurrentSpecialBuyPositions.Clear();
ent.Comp.CurrentSpecialSellPositions.Clear();
AddRandomBuySpecialPosition(ent, ent.Comp.SpecialBuyPositionCount);
AddRandomSellSpecialPosition(ent, ent.Comp.SpecialSellPositionCount);
}
private void OnTradePortalClose(Entity<CP14TradingPortalComponent> ent, ref StorageAfterCloseEvent args)
{
ent.Comp.ProcessFinishTime = _timing.CurTime + ent.Comp.Delay;
}
private void OnTradePortalOpen(Entity<CP14TradingPortalComponent> ent, ref StorageAfterOpenEvent args)
{
ent.Comp.ProcessFinishTime = TimeSpan.Zero;
}
}

View File

@@ -1,118 +0,0 @@
using System.Numerics;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Shared._CP14.Cargo;
using Content.Shared.Gravity;
using Robust.Shared.Map;
using Robust.Shared.Random;
namespace Content.Server._CP14.Cargo;
public sealed partial class CP14CargoSystem
{
private void InitializeShuttle()
{
SubscribeLocalEvent<CP14TravelingStoreShipComponent, FTLCompletedEvent>(OnFTLCompleted);
SubscribeLocalEvent<CP14TravelingStoreShipComponent, MapInitEvent>(OnMapInit);
}
private void OnMapInit(Entity<CP14TravelingStoreShipComponent> ent, ref MapInitEvent args)
{
//TODO: This is shitcode! Because shouldnt related to traveling ship
EnsureComp<GravityComponent>(ent, out var gravity);
gravity.Enabled = true;
gravity.Inherent = true;
}
private void UpdateShuttle()
{
var query = EntityQueryEnumerator<CP14StationTravelingStoreShipTargetComponent>();
while (query.MoveNext(out var uid, out var ship))
{
if (_timing.CurTime < ship.NextTravelTime || ship.NextTravelTime == TimeSpan.Zero)
continue;
if (ship.Shuttle is null || ship.TradePostMap is null)
continue;
if (Transform(ship.Shuttle.Value).MapUid == Transform(ship.TradePostMap.Value).MapUid)
{
// if landed on trade post
ship.NextTravelTime = _timing.CurTime + ship.StationWaitTime;
SendShuttleToStation(ship.Shuttle.Value);
}
else
{
// if landed on station
ship.NextTravelTime = _timing.CurTime + ship.TradePostWaitTime;
SendShuttleToTradepost(ship.Shuttle.Value, ship.TradePostMap.Value);
}
}
}
private void SendShuttleToStation(EntityUid shuttle, float startupTime = 0f)
{
var targetPoints = new List<EntityUid>();
var targetEnumerator =
EntityQueryEnumerator<CP14TravelingStoreShipFTLTargetComponent,
TransformComponent>(); //TODO - different method position location
while (targetEnumerator.MoveNext(out var uid, out _, out _))
{
targetPoints.Add(uid);
}
if (targetPoints.Count == 0)
return;
var target = _random.Pick(targetPoints);
var targetXform = Transform(target);
var shuttleComp = Comp<ShuttleComponent>(shuttle);
_shuttles.FTLToCoordinates(shuttle,
shuttleComp,
targetXform.Coordinates,
targetXform.LocalRotation,
hyperspaceTime: 20f,
startupTime: startupTime);
}
private void SendShuttleToTradepost(EntityUid shuttle, EntityUid tradePostMap)
{
var shuttleComp = Comp<ShuttleComponent>(shuttle);
_shuttles.FTLToCoordinates(shuttle,
shuttleComp,
new EntityCoordinates(tradePostMap, Vector2.Zero),
Angle.Zero,
startupTime: 10f,
hyperspaceTime: 20f);
}
private void OnFTLCompleted(Entity<CP14TravelingStoreShipComponent> ent, ref FTLCompletedEvent args)
{
if (!TryComp<CP14StationTravelingStoreShipTargetComponent>(ent.Comp.Station, out var station))
return;
if (station.TradePostMap is not null &&
Transform(ent).MapUid == Transform(station.TradePostMap.Value).MapUid) //Landed on tradepost
{
station.OnStation = false;
SellingThings((ent.Comp.Station, station)); // +balance
TopUpBalance((ent.Comp.Station, station)); //+balance
BuyToQueue((ent.Comp.Station, station)); //-balance +buyQueue
TrySpawnBuyedThings((ent.Comp.Station, station));
UpdateStorePositions((ent.Comp.Station, station));
}
else //Landed on station
{
station.OnStation = true;
CashOut((ent.Comp.Station, station));
station.Balance = 0;
}
UpdateAllStores();
}
}

View File

@@ -8,101 +8,109 @@ public sealed partial class CP14CargoSystem
{
public void InitializeUI()
{
SubscribeLocalEvent<CP14CargoStoreComponent, BeforeActivatableUIOpenEvent>(OnBeforeUIOpen);
SubscribeLocalEvent<CP14TradingInfoBoardComponent, BeforeActivatableUIOpenEvent>(OnBeforeUIOpen);
}
private void TryInitStore(Entity<CP14CargoStoreComponent> ent)
private void TryInitStore(Entity<CP14TradingInfoBoardComponent> ent)
{
//TODO: There's no support for multiple stations. (settlements).
var stations = _station.GetStations();
if (stations.Count == 0)
return;
if (!TryComp<CP14StationTravelingStoreShipTargetComponent>(stations[0], out var station))
return;
ent.Comp.Station = new Entity<CP14StationTravelingStoreShipTargetComponent>(stations[0], station);
//TODO: more accurate way to find the trading portal, without lookup
var entitiesInRange = _lookup.GetEntitiesInRange<CP14TradingPortalComponent>(Transform(ent).Coordinates, 2);
foreach (var trading in entitiesInRange)
{
ent.Comp.TradingPortal = trading;
ent.Comp.CahcedFaction = trading.Comp.Faction;
break;
}
}
private void OnBeforeUIOpen(Entity<CP14CargoStoreComponent> ent, ref BeforeActivatableUIOpenEvent args)
private void OnBeforeUIOpen(Entity<CP14TradingInfoBoardComponent> ent, ref BeforeActivatableUIOpenEvent args)
{
//TODO: If you open a store on a mapping, and initStore() it, the entity will throw an error when you try to save the grid\map.
if (ent.Comp.Station is null)
if (ent.Comp.TradingPortal is null)
TryInitStore(ent);
UpdateUIProducts(ent);
}
private void UpdateAllStores()
private void UpdateUIProducts(Entity<CP14TradingInfoBoardComponent> ent)
{
//TODO: redo
var query = EntityQueryEnumerator<CP14CargoStoreComponent>();
while (query.MoveNext(out var uid, out var store))
{
UpdateUIProducts((uid, store));
}
}
private void UpdateUIProducts(Entity<CP14CargoStoreComponent> ent)
{
if (ent.Comp.Station is null)
if (ent.Comp.TradingPortal is null)
return;
if (!TryComp<CP14StationTravelingStoreShipTargetComponent>(ent.Comp.Station.Value, out var storeTargetComp))
if (!TryComp<CP14TradingPortalComponent>(ent.Comp.TradingPortal.Value, out var tradePortalComp))
return;
var prodBuy = new HashSet<CP14StoreUiProductEntry>();
var prodSell = new HashSet<CP14StoreUiProductEntry>();
//Add special buy positions
foreach (var (proto, price) in storeTargetComp.CurrentSpecialBuyPositions)
foreach (var (proto, price) in tradePortalComp.CurrentSpecialBuyPositions)
{
var name = Loc.GetString(proto.Name);
var name = proto.NameOverride ?? proto.Service.GetName(_proto);
var desc = new StringBuilder();
desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-buy-hint", ("name", Loc.GetString(proto.Name)), ("code", "[color=yellow][bold]#" + proto.Code + "[/bold][/color]")));
//desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-buy-hint", ("name", name), ("code", "[color=yellow][bold]#" + proto.Code + "[/bold][/color]")));
prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, true));
prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.IconOverride ?? proto.Service.GetTexture(_proto), proto.Service.GetEntityView(_proto), name, desc.ToString(), price, true));
}
//Add static buy positions
foreach (var (proto, price) in storeTargetComp.CurrentBuyPositions)
foreach (var (proto, price) in tradePortalComp.CurrentBuyPositions)
{
var name = Loc.GetString(proto.Name);
var name = proto.NameOverride ?? proto.Service.GetName(_proto);
var desc = new StringBuilder();
desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-buy-hint", ("name", Loc.GetString(proto.Name)), ("code", "[color=yellow][bold]#" + proto.Code + "[/bold][/color]")));
//desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-buy-hint", ("name", name), ("code", "[color=yellow][bold]#" + proto.Code + "[/bold][/color]")));
prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, false));
prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.IconOverride ?? proto.Service.GetTexture(_proto), proto.Service.GetEntityView(_proto), name, desc.ToString(), price, false));
}
//Add special sell positions
foreach (var (proto, price) in storeTargetComp.CurrentSpecialSellPositions)
foreach (var (proto, price) in tradePortalComp.CurrentSpecialSellPositions)
{
var name = Loc.GetString(proto.Name);
var name = proto.Service.GetName(_proto);
var desc = new StringBuilder();
desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-sell-hint", ("name", Loc.GetString(proto.Name))));
//desc.Append(Loc.GetString(proto.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-sell-hint", ("name", name)));
prodSell.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, true));
prodSell.Add(new CP14StoreUiProductEntry(
proto.ID,
proto.Service.GetTexture(_proto),
proto.Service.GetEntityView(_proto),
name,
desc.ToString(),
price,
true));
}
//Add static sell positions
foreach (var proto in storeTargetComp.CurrentSellPositions)
foreach (var proto in tradePortalComp.CurrentSellPositions)
{
var name = Loc.GetString(proto.Key.Name);
var name = proto.Key.Service.GetName(_proto);
var desc = new StringBuilder();
desc.Append(Loc.GetString(proto.Key.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-sell-hint", ("name", Loc.GetString(proto.Key.Name))));
//desc.Append(Loc.GetString(proto.Key.Desc) + "\n");
desc.Append("\n" + Loc.GetString("cp14-store-sell-hint", ("name", name)));
prodSell.Add(new CP14StoreUiProductEntry(proto.Key.ID, proto.Key.Icon, name, desc.ToString(), proto.Value, false));
prodSell.Add(new CP14StoreUiProductEntry(
proto.Key.ID,
proto.Key.Service.GetTexture(_proto),
proto.Key.Service.GetEntityView(_proto),
name,
desc.ToString(),
proto.Value,
false));
}
var stationComp = storeTargetComp;
_userInterface.SetUiState(ent.Owner, CP14StoreUiKey.Key, new CP14StoreUiState(prodBuy, prodSell, stationComp.OnStation, stationComp.NextTravelTime));
var shopName = ":3";
//Get shop name
if (ent.Comp.CahcedFaction is not null && _proto.TryIndex(ent.Comp.CahcedFaction.Value, out var indexedShop))
{
shopName = Loc.GetString(indexedShop.Name);
}
_userInterface.SetUiState(ent.Owner, CP14StoreUiKey.Key, new CP14StoreUiState(shopName, prodBuy, prodSell));
}
}

View File

@@ -1,21 +1,13 @@
using System.Linq;
using System.Numerics;
using Content.Server._CP14.Currency;
using Content.Server._CP14.RoundRemoveShuttle;
using Content.Server.Shuttles.Systems;
using Content.Server.Station.Events;
using Content.Server.Station.Systems;
using Content.Server.Storage.Components;
using Content.Server.Storage.EntitySystems;
using Content.Shared._CP14.Cargo;
using Content.Shared._CP14.Cargo.Prototype;
using Content.Shared.Maps;
using Content.Shared.Paper;
using Content.Shared.Physics;
using Content.Shared.Station.Components;
using Content.Shared.Storage;
using Content.Shared.Storage.EntitySystems;
using JetBrains.Annotations;
using Content.Shared.Throwing;
using Robust.Server.GameObjects;
using Robust.Shared.EntitySerialization.Systems;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -24,20 +16,15 @@ namespace Content.Server._CP14.Cargo;
public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly MapLoaderSystem _loader = default!;
[Dependency] private readonly ShuttleSystem _shuttles = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly CP14CurrencySystem _currency = default!;
[Dependency] private readonly SharedStorageSystem _storage = default!;
[Dependency] private readonly TurfSystem _turf = default!;
private EntityQuery<TransformComponent> _xformQuery;
[Dependency] private readonly EntityStorageSystem _entityStorage = default!;
[Dependency] private readonly ThrowingSystem _throwing = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
private IEnumerable<CP14StoreBuyPositionPrototype>? _buyProto;
private IEnumerable<CP14StoreSellPositionPrototype>? _sellProto;
@@ -48,15 +35,18 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
base.Initialize();
InitializeUI();
InitializeShuttle();
_xformQuery = GetEntityQuery<TransformComponent>();
InitializePortals();
_buyProto = _proto.EnumeratePrototypes<CP14StoreBuyPositionPrototype>();
_sellProto = _proto.EnumeratePrototypes<CP14StoreSellPositionPrototype>();
SubscribeLocalEvent<PrototypesReloadedEventArgs>(OnProtoReload);
SubscribeLocalEvent<CP14StationTravelingStoreShipTargetComponent, StationPostInitEvent>(OnPostInit);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
UpdatePortals(frameTime);
}
private void OnProtoReload(PrototypesReloadedEventArgs ev)
@@ -65,61 +55,14 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
_sellProto = _proto.EnumeratePrototypes<CP14StoreSellPositionPrototype>();
}
public override void Update(float frameTime)
{
base.Update(frameTime);
UpdateShuttle();
}
/// <summary>
/// Allows other systems to additionally add items to the queue that are brought to the settlement on a merchant ship.
/// </summary>
[PublicAPI]
public void AddBuyQueue(Entity<CP14StationTravelingStoreShipTargetComponent> station, List<EntProtoId> products)
{
foreach (var product in products)
{
station.Comp.BuyedQueue.Enqueue(product);
}
}
private void OnPostInit(Entity<CP14StationTravelingStoreShipTargetComponent> station, ref StationPostInitEvent args)
{
if (!Deleted(station.Comp.Shuttle))
return;
var tradepostMap = _mapManager.CreateMap();
if (!_loader.TryLoadGrid(tradepostMap ,station.Comp.ShuttlePath, out var shuttle))
return;
station.Comp.Shuttle = shuttle;
station.Comp.TradePostMap = _mapManager.GetMapEntityId(tradepostMap);
var travelingStoreShipComp = EnsureComp<CP14TravelingStoreShipComponent>(station.Comp.Shuttle.Value);
travelingStoreShipComp.Station = station;
var member = EnsureComp<StationMemberComponent>(shuttle.Value);
member.Station = station;
var roundRemover = EnsureComp<CP14RoundRemoveShuttleComponent>(shuttle.Value);
roundRemover.Station = station;
station.Comp.NextTravelTime = _timing.CurTime + TimeSpan.FromSeconds(10f);
AddRoundstartTradingPositions(station);
UpdateStorePositions(station);
}
private void AddRoundstartTradingPositions(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void AddRoundstartTradingPositions(Entity<CP14TradingPortalComponent> portal)
{
if (_buyProto is not null)
{
foreach (var buy in _buyProto)
{
if (buy.RoundstartAvailable)
station.Comp.AvailableBuyPosition.Add(buy);
portal.Comp.AvailableBuyPosition.Add(buy);
}
}
@@ -128,123 +71,149 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
foreach (var sell in _sellProto)
{
if (sell.RoundstartAvailable)
station.Comp.AvailableSellPosition.Add(sell);
portal.Comp.AvailableSellPosition.Add(sell);
}
}
}
private void UpdateStorePositions(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void UpdateStaticPositions(Entity<CP14TradingPortalComponent> portal)
{
station.Comp.CurrentBuyPositions.Clear();
station.Comp.CurrentSellPositions.Clear();
station.Comp.CurrentSpecialBuyPositions.Clear();
station.Comp.CurrentSpecialSellPositions.Clear();
var availableSpecialSellPositions = new List<CP14StoreSellPositionPrototype>();
var availableSpecialBuyPositions = new List<CP14StoreBuyPositionPrototype>();
portal.Comp.CurrentBuyPositions.Clear();
portal.Comp.CurrentSellPositions.Clear();
//Add static positions + cash special ones
foreach (var buyPos in station.Comp.AvailableBuyPosition)
foreach (var buyPos in portal.Comp.AvailableBuyPosition)
{
if (buyPos.Special)
availableSpecialBuyPositions.Add(buyPos);
else
station.Comp.CurrentBuyPositions.Add(buyPos, buyPos.Price);
continue;
if (buyPos.Factions.Count > 0 && !buyPos.Factions.Contains(portal.Comp.Faction))
continue;
portal.Comp.CurrentBuyPositions.Add(buyPos, buyPos.Price);
}
foreach (var sellPos in station.Comp.AvailableSellPosition)
foreach (var sellPos in portal.Comp.AvailableSellPosition)
{
if (sellPos.Special)
availableSpecialSellPositions.Add(sellPos);
else
station.Comp.CurrentSellPositions.Add(sellPos, sellPos.Price);
continue;
if (sellPos.Factions.Count > 0 && !sellPos.Factions.Contains(portal.Comp.Faction))
continue;
portal.Comp.CurrentSellPositions.Add(sellPos, sellPos.Price);
}
}
private void AddRandomBuySpecialPosition(Entity<CP14TradingPortalComponent> portal, int count)
{
if (_buyProto is null)
return;
var availableSpecialBuyPositions = new List<CP14StoreBuyPositionPrototype>();
foreach (var buyPos in _buyProto)
{
if (!buyPos.Special)
continue;
if (portal.Comp.CurrentSpecialBuyPositions.ContainsKey(buyPos))
continue;
if (buyPos.Factions.Count > 0 && !buyPos.Factions.Contains(portal.Comp.Faction))
continue;
availableSpecialBuyPositions.Add(buyPos);
}
//Random and select special positions
_random.Shuffle(availableSpecialSellPositions);
_random.Shuffle(availableSpecialBuyPositions);
var currentSpecialBuyPositions = station.Comp.SpecialBuyPositionCount.Next(_random);
var currentSpecialSellPositions = station.Comp.SpecialSellPositionCount.Next(_random);
var added = 0;
foreach (var buyPos in availableSpecialBuyPositions)
{
if (station.Comp.CurrentSpecialBuyPositions.Count >= currentSpecialBuyPositions)
if (added >= count)
break;
station.Comp.CurrentSpecialBuyPositions.Add(buyPos, buyPos.Price);
portal.Comp.CurrentSpecialBuyPositions.Add(buyPos, buyPos.Price);
added++;
}
}
private void AddRandomSellSpecialPosition(Entity<CP14TradingPortalComponent> portal, int count)
{
if (_sellProto is null)
return;
var availableSpecialSellPositions = new List<CP14StoreSellPositionPrototype>();
foreach (var sellPos in _sellProto)
{
if (!sellPos.Special)
continue;
if (portal.Comp.CurrentSpecialSellPositions.ContainsKey(sellPos))
continue;
if (sellPos.Factions.Count > 0 && !sellPos.Factions.Contains(portal.Comp.Faction))
continue;
availableSpecialSellPositions.Add(sellPos);
}
_random.Shuffle(availableSpecialSellPositions);
var added = 0;
foreach (var sellPos in availableSpecialSellPositions)
{
if (station.Comp.CurrentSpecialSellPositions.Count >= currentSpecialSellPositions)
if (added >= count)
break;
station.Comp.CurrentSpecialSellPositions.Add(sellPos, sellPos.Price);
portal.Comp.CurrentSpecialSellPositions.Add(sellPos, sellPos.Price);
added++;
}
}
/// <summary>
/// Sell all the items we can, and replenish the internal balance
/// </summary>
private void SellingThings(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void SellingThings(Entity<CP14TradingPortalComponent> portal, EntityStorageComponent storage)
{
var shuttle = station.Comp.Shuttle;
var containedEntities = storage.Contents.ContainedEntities.ToHashSet();
//var ev = new BeforeSellEntities(ref portal.Comp.EntitiesInPortal);
//RaiseLocalEvent(ev);
//Get all entities sent to trading posts
var toSell = new HashSet<EntityUid>();
var query = EntityQueryEnumerator<CP14SellingPalettComponent, TransformComponent>();
while (query.MoveNext(out var uid, out _, out var palletXform))
foreach (var sellPos in portal.Comp.CurrentSellPositions)
{
if (palletXform.ParentUid != shuttle || !palletXform.Anchored)
continue;
var sentEntities = new HashSet<EntityUid>();
_lookup.GetEntitiesInRange(uid, 0.5f, sentEntities, LookupFlags.Dynamic | LookupFlags.Sundries);
foreach (var ent in sentEntities)
//WHILE = sell all we can
while (sellPos.Key.Service.TrySell(EntityManager, containedEntities))
{
if (toSell.Contains(ent) || !_xformQuery.TryGetComponent(ent, out _))
continue;
toSell.Add(ent);
portal.Comp.Balance += sellPos.Value;
}
}
var ev = new BeforeSellEntities(ref toSell);
RaiseLocalEvent(ev);
foreach (var sellPos in station.Comp.CurrentSellPositions)
List<CP14StoreSellPositionPrototype> toRemove = new();
foreach (var sellPos in portal.Comp.CurrentSpecialSellPositions)
{
while (sellPos.Key.Service.TrySell(EntityManager, toSell))
//IF = only 1 try
if (sellPos.Key.Service.TrySell(EntityManager, containedEntities))
{
station.Comp.Balance += sellPos.Value;
portal.Comp.Balance += sellPos.Value;
toRemove.Add(sellPos.Key);
}
}
foreach (var sellPos in station.Comp.CurrentSpecialSellPositions)
//Remove this special position from the list and add new random one
foreach (var position in toRemove)
{
while (sellPos.Key.Service.TrySell(EntityManager, toSell))
{
station.Comp.Balance += sellPos.Value;
}
portal.Comp.CurrentSpecialSellPositions.Remove(position);
AddRandomSellSpecialPosition(portal, 1);
}
}
/// <summary>
/// Take all the money from the tradebox, and credit it to the internal balance
/// Take all the money from the portal, and credit it to the internal balance
/// </summary>
private void TopUpBalance(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void TopUpBalance(Entity<CP14TradingPortalComponent> portal, EntityStorageComponent storage)
{
var tradebox = GetTradeBox(station);
if (tradebox is null)
return;
if (!TryComp<StorageComponent>(tradebox, out var tradeStorage))
return;
//Get all currency in tradebox
int cash = 0;
foreach (var stored in tradeStorage.Container.ContainedEntities)
//Get all currency in portal
var cash = 0;
foreach (var stored in storage.Contents.ContainedEntities)
{
var price = _currency.GetTotalCurrency(stored);
if (price > 0)
@@ -254,22 +223,14 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
}
}
station.Comp.Balance += cash;
portal.Comp.Balance += cash;
}
private void BuyToQueue(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void BuyThings(Entity<CP14TradingPortalComponent> portal, EntityStorageComponent storage)
{
var tradebox = GetTradeBox(station);
if (tradebox is null)
return;
if (!TryComp<StorageComponent>(tradebox, out var tradeStorage))
return;
//Reading all papers in tradebox
//Reading all papers in portal
List<KeyValuePair<CP14StoreBuyPositionPrototype, int>> requests = new();
foreach (var stored in tradeStorage.Container.ContainedEntities)
foreach (var stored in storage.Contents.ContainedEntities)
{
if (!TryComp<PaperComponent>(stored, out var paper))
continue;
@@ -277,12 +238,13 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
var splittedText = paper.Content.Split("#");
foreach (var fragment in splittedText)
{
foreach (var buyPosition in station.Comp.CurrentBuyPositions)
foreach (var buyPosition in portal.Comp.CurrentBuyPositions)
{
if (fragment.StartsWith(buyPosition.Key.Code))
requests.Add(buyPosition);
}
foreach (var buyPosition in station.Comp.CurrentSpecialBuyPositions)
foreach (var buyPosition in portal.Comp.CurrentSpecialBuyPositions)
{
if (fragment.StartsWith(buyPosition.Key.Code))
requests.Add(buyPosition);
@@ -292,80 +254,57 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem
QueueDel(stored);
}
//Trying spend tradebox money to buy requested things
//Trying to spend inner money to buy requested things
foreach (var request in requests)
{
if (station.Comp.Balance < request.Value)
if (portal.Comp.Balance < request.Value)
continue;
station.Comp.Balance -= request.Value;
portal.Comp.Balance -= request.Value;
if (!_proto.TryIndex<CP14StoreBuyPositionPrototype>(request.Key, out var indexedBuyed))
continue;
foreach (var service in indexedBuyed.Services)
//Remove this position from the list and add new random one
if (request.Key.Special)
{
service.Buy(EntityManager, _proto, station);
portal.Comp.CurrentSpecialBuyPositions.Remove(request.Key);
AddRandomBuySpecialPosition(portal, 1);
}
}
}
//Dequeue buyed items, and spawn they on shuttle
private void TrySpawnBuyedThings(Entity<CP14StationTravelingStoreShipTargetComponent> station)
{
var shuttle = station.Comp.Shuttle;
var query = EntityQueryEnumerator<CP14BuyingPalettComponent, TransformComponent>();
while (query.MoveNext(out var uid, out _, out var palletXform))
{
if (station.Comp.BuyedQueue.Count <= 0)
break;
if (palletXform.ParentUid != shuttle || !palletXform.Anchored)
continue;
var tileRef = palletXform.Coordinates.GetTileRef();
if (tileRef is null)
continue;
if (_turf.IsTileBlocked(tileRef.Value, CollisionGroup.ItemMask))
continue;
var buyedThing = station.Comp.BuyedQueue.Dequeue();
Spawn(buyedThing, palletXform.Coordinates);
indexedBuyed.Service.Buy(EntityManager, _proto, portal);
}
}
/// <summary>
/// Transform all the accumulated balance into physical money, which we will give to the players.
/// </summary>
private void CashOut(Entity<CP14StationTravelingStoreShipTargetComponent> station)
private void CashOut(Entity<CP14TradingPortalComponent> portal, EntityStorageComponent storage)
{
var moneyBox = GetTradeBox(station);
if (moneyBox is not null)
var coins = _currency.GenerateMoney(portal.Comp.Balance, Transform(portal).Coordinates);
foreach (var coin in coins)
{
var coord = Transform(moneyBox.Value).Coordinates;
var coins = _currency.GenerateMoney(station.Comp.Balance, coord);
foreach (var coin in coins)
{
_storage.Insert(moneyBox.Value, coin, out _);
}
_entityStorage.Insert(coin, portal, storage);
}
portal.Comp.Balance = 0;
}
private EntityUid? GetTradeBox(Entity<CP14StationTravelingStoreShipTargetComponent> station)
/// <summary>
/// Return all items to the map
/// </summary>
private void ThrowAllItems(Entity<CP14TradingPortalComponent> portal, EntityStorageComponent storage)
{
var query = EntityQueryEnumerator<CP14CargoMoneyBoxComponent, TransformComponent>();
var containedEntities = storage.Contents.ContainedEntities.ToList();
while (query.MoveNext(out var uid, out _, out var xform))
_entityStorage.OpenStorage(portal, storage);
var xform = Transform(portal);
var rotation = xform.LocalRotation;
foreach (var stored in containedEntities)
{
if (xform.GridUid != station.Comp.Shuttle)
continue;
return uid;
_transform.AttachToGridOrMap(stored);
var targetThrowPosition = xform.Coordinates.Offset(rotation.ToWorldVec() * 1);
_throwing.TryThrow(stored, targetThrowPosition.Offset(new Vector2(_random.NextFloat(-0.5f, 0.5f), _random.NextFloat(-0.5f, 0.5f))));
}
return null;
}
}

View File

@@ -1,8 +0,0 @@
namespace Content.Server._CP14.Cargo;
[RegisterComponent, Access(typeof(CP14CargoSystem))]
public sealed partial class CP14TravelingStoreShipComponent : Component
{
[DataField]
public EntityUid Station;
}

View File

@@ -1,10 +0,0 @@
namespace Content.Server._CP14.Cargo;
/// <summary>
/// One of the possible points where an traveling store ship might land
/// </summary>
[RegisterComponent, Access(typeof(CP14CargoSystem))]
public sealed partial class CP14TravelingStoreShipFTLTargetComponent : Component
{
}

View File

@@ -7,6 +7,7 @@ using Content.Shared.Stacks;
using Content.Shared.Storage;
using Content.Shared.Whitelist;
using Robust.Server.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.Currency;
@@ -28,12 +29,14 @@ public sealed partial class CP14CurrencySystem : CP14SharedCurrencySystem
SubscribeLocalEvent<CP14CurrencyExaminableComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<CP14CurrencyComponent, CP14GetCurrencyEvent>(OnGetCurrency);
//SubscribeLocalEvent<EntityStorageComponent, CP14GetCurrencyEvent>(OnEntityStorageGetCurrency);
//SubscribeLocalEvent<StorageComponent, CP14GetCurrencyEvent>(OnStorageGetCurrency);
SubscribeLocalEvent<ContainerManagerComponent, CP14GetCurrencyEvent>(OnContainerGetCurrency);
}
private void OnGetCurrency(Entity<CP14CurrencyComponent> ent, ref CP14GetCurrencyEvent args)
{
if (args.CheckedEntities.Contains(ent))
return;
var total = ent.Comp.Currency;
if (TryComp<StackComponent>(ent, out var stack))
{
@@ -41,29 +44,22 @@ public sealed partial class CP14CurrencySystem : CP14SharedCurrencySystem
}
args.Currency += total;
args.CheckedEntities.Add(ent);
}
//private void OnEntityStorageGetCurrency(Entity<EntityStorageComponent> ent, ref CP14GetCurrencyEvent args)
//{
// var total = 0;
// foreach (var entity in ent.Comp.Contents.ContainedEntities)
// {
// total += GetTotalCurrency(entity);
// }
//
// args.Currency += total;
//}
//
//private void OnStorageGetCurrency(Entity<StorageComponent> ent, ref CP14GetCurrencyEvent args)
//{
// var total = 0;
// foreach (var entity in ent.Comp.StoredItems)
// {
// total += GetTotalCurrency(entity.Key);
// }
//
// args.Currency += total;
//}
private void OnContainerGetCurrency(Entity<ContainerManagerComponent> ent, ref CP14GetCurrencyEvent args)
{
var total = 0;
foreach (var container in ent.Comp.Containers.Values)
{
foreach (var containedEnt in container.ContainedEntities)
{
total += GetTotalCurrency(containedEnt);
}
}
args.Currency += total;
}
private void OnExamine(Entity<CP14CurrencyExaminableComponent> currency, ref ExaminedEvent args)
{

View File

@@ -1,20 +0,0 @@
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;
}

View File

@@ -0,0 +1,25 @@
using Content.Server._CP14.Objectives.Systems;
using Content.Shared.Roles;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Server._CP14.Objectives.Components;
/// <summary>
/// The player must be the richest among the players among the specified list of roles
/// </summary>
[RegisterComponent, Access(typeof(CP14RichestJobConditionSystem))]
public sealed partial class CP14RichestJobConditionComponent : Component
{
[DataField(required: true)]
public ProtoId<JobPrototype> Job;
[DataField(required: true)]
public LocId ObjectiveText;
[DataField(required: true)]
public LocId ObjectiveDescription;
[DataField(required: true)]
public SpriteSpecifier ObjectiveSprite;
}

View File

@@ -16,24 +16,13 @@ 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, ObjectiveAfterAssignEvent>(OnCollectAfterAssign);
SubscribeLocalEvent<CP14CurrencyStoredConditionComponent, ObjectiveAfterAssignEvent>(OnStoredAfterAssign);
SubscribeLocalEvent<CP14CurrencyCollectConditionComponent, ObjectiveGetProgressEvent>(OnCollectGetProgress);
SubscribeLocalEvent<CP14CurrencyStoredConditionComponent, ObjectiveGetProgressEvent>(OnStoredGetProgress);
}
private void OnCollectAfterAssign(Entity<CP14CurrencyCollectConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
@@ -43,103 +32,23 @@ public sealed class CP14CurrencyCollectConditionSystem : EntitySystem
_objectives.SetIcon(condition.Owner, condition.Comp.ObjectiveSprite);
}
private void OnStoredAfterAssign(Entity<CP14CurrencyStoredConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
{
_metaData.SetEntityName(condition.Owner, Loc.GetString(condition.Comp.ObjectiveText, ("coins", _currency.GetCurrencyPrettyString(condition.Comp.Currency))), 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))
var count = 0;
if (mind.OwnedEntity is null)
return 0;
var containerStack = new Stack<ContainerManagerComponent>();
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
{
var pulledEntity = pull.Pulling;
if (pulledEntity != null)
{
CheckEntity(pulledEntity.Value, ref containerStack, ref count);
}
}
// recursively check each container for the item
// checks inventory, bag, implants, etc.
do
{
foreach (var container in currentManager.Containers.Values)
{
foreach (var entity in container.ContainedEntities)
{
// check if this is the item
count += _currency.GetTotalCurrency(entity);
// if it is a container check its contents
if (_containerQuery.TryGetComponent(entity, out var containerManager))
containerStack.Push(containerManager);
}
}
} while (containerStack.TryPop(out currentManager));
count += _currency.GetTotalCurrency(mind.OwnedEntity.Value);
var result = count / (float)condition.Currency;
result = Math.Clamp(result, 0, 1);
return result;
}
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);
//we don't check the inventories of sentient entity
if (!TryComp<MindContainerComponent>(entity, out _))
{
// if it is a container check its contents
if (_containerQuery.TryGetComponent(entity, out var containerManager))
containerStack.Push(containerManager);
}
}
}

View File

@@ -0,0 +1,74 @@
using Content.Server._CP14.Objectives.Components;
using Content.Shared._CP14.Currency;
using Content.Shared.Mind;
using Content.Shared.Objectives.Components;
using Content.Shared.Objectives.Systems;
using Content.Shared.Roles.Jobs;
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.Objectives.Systems;
public sealed class CP14RichestJobConditionSystem : EntitySystem
{
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly SharedObjectivesSystem _objectives = default!;
[Dependency] private readonly CP14SharedCurrencySystem _currency = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly SharedJobSystem _job = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14RichestJobConditionComponent, ObjectiveAfterAssignEvent>(OnCollectAfterAssign);
SubscribeLocalEvent<CP14RichestJobConditionComponent, ObjectiveGetProgressEvent>(OnCollectGetProgress);
}
private void OnCollectAfterAssign(Entity<CP14RichestJobConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
{
if (!_proto.TryIndex(condition.Comp.Job, out var indexedJob))
return;
_metaData.SetEntityName(condition.Owner, Loc.GetString(condition.Comp.ObjectiveText), args.Meta);
_metaData.SetEntityDescription(condition.Owner, Loc.GetString(condition.Comp.ObjectiveDescription), args.Meta);
_objectives.SetIcon(condition.Owner, condition.Comp.ObjectiveSprite);
}
private void OnCollectGetProgress(Entity<CP14RichestJobConditionComponent> condition, ref ObjectiveGetProgressEvent args)
{
args.Progress = GetProgress(args.MindId, args.Mind, condition);
}
private float GetProgress(EntityUid mindId, MindComponent mind, CP14RichestJobConditionComponent condition)
{
if (mind.OwnedEntity is null)
return 0;
var ourValue = _currency.GetTotalCurrency(mind.OwnedEntity.Value);
var otherMaxValue = 0;
var allHumans = _mind.GetAliveHumans(mindId);
if (allHumans.Count == 0)
return 1; // No one to compare to, so we're the richest.
foreach (var otherHuman in allHumans)
{
if (!_job.MindTryGetJob(otherHuman, out var otherJob))
continue;
if (otherJob != condition.Job)
continue;
if (otherHuman.Comp.OwnedEntity is null)
continue;
var otherValue = _currency.GetTotalCurrency(otherHuman.Comp.OwnedEntity.Value);
if (otherValue > otherMaxValue)
otherMaxValue = otherValue;
}
// if several players have the same amount of money, no one wins.
return ourValue == otherMaxValue ? 0.99f : Math.Clamp(ourValue / (float)otherMaxValue, 0, 1);
}
}

View File

@@ -1,16 +1,11 @@
using System.Text;
using Content.Server._CP14.Cargo;
using Content.Server._CP14.Currency;
using Content.Server.Mind;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Shared._CP14.Cargo;
using Content.Shared._CP14.Currency;
using Content.Shared.Paper;
using Content.Shared.Station.Components;
using Content.Shared.Storage.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
@@ -41,15 +36,15 @@ public sealed partial class CP14SalarySystem : EntitySystem
{
base.Update(frameTime);
var query = EntityQueryEnumerator<CP14StationSalaryComponent, CP14StationTravelingStoreShipTargetComponent>();
while (query.MoveNext(out var uid, out var salary, out var store))
{
if (_timing.CurTime < salary.NextSalaryTime)
continue;
salary.NextSalaryTime = _timing.CurTime + salary.SalaryFrequency;
_cargo.AddBuyQueue((uid, store), new List<EntProtoId> {salary.SalaryProto});
}
//var query = EntityQueryEnumerator<CP14StationSalaryComponent, CP14StationTravelingStoreShipTargetComponent>();
//while (query.MoveNext(out var uid, out var salary, out var store))
//{
// if (_timing.CurTime < salary.NextSalaryTime)
// continue;
//
// salary.NextSalaryTime = _timing.CurTime + salary.SalaryFrequency;
// _cargo.AddBuyQueue((uid, store), new List<EntProtoId> {salary.SalaryProto});
//}
}
private void OnSalaryInit(Entity<CP14SalarySpawnerComponent> ent, ref MapInitEvent args)

View File

@@ -1,9 +0,0 @@
namespace Content.Shared._CP14.Cargo;
/// <summary>
/// marks an entity into which trade with the city will put money when selling, or take it when buying.
/// </summary>
[RegisterComponent]
public sealed partial class CP14CargoMoneyBoxComponent : Component
{
}

View File

@@ -1,11 +0,0 @@
namespace Content.Shared._CP14.Cargo;
/// <summary>
/// Allows users to view information on city trading opportunities
/// </summary>
[RegisterComponent]
public sealed partial class CP14CargoStoreComponent : Component
{
[DataField]
public EntityUid? Station = null;
}

View File

@@ -1,11 +0,0 @@
namespace Content.Shared._CP14.Cargo;
[RegisterComponent]
public sealed partial class CP14SellingPalettComponent : Component
{
}
[RegisterComponent]
public sealed partial class CP14BuyingPalettComponent : Component
{
}

View File

@@ -14,18 +14,15 @@ public enum CP14StoreUiKey
[Serializable, NetSerializable]
public sealed class CP14StoreUiState : BoundUserInterfaceState
{
public readonly string ShopName;
public readonly HashSet<CP14StoreUiProductEntry> ProductsBuy;
public readonly HashSet<CP14StoreUiProductEntry> ProductsSell;
public bool OnStation;
public readonly TimeSpan NextTravelTime;
public CP14StoreUiState(HashSet<CP14StoreUiProductEntry> productsBuy, HashSet<CP14StoreUiProductEntry> productsSell, bool onStation, TimeSpan time)
public CP14StoreUiState(string name, HashSet<CP14StoreUiProductEntry> productsBuy, HashSet<CP14StoreUiProductEntry> productsSell)
{
ShopName = name;
ProductsBuy = productsBuy;
ProductsSell = productsSell;
OnStation = onStation;
NextTravelTime = time;
}
}
@@ -33,16 +30,18 @@ public sealed class CP14StoreUiState : BoundUserInterfaceState
public readonly struct CP14StoreUiProductEntry : IEquatable<CP14StoreUiProductEntry>
{
public readonly string ProtoId;
public readonly SpriteSpecifier Icon;
public readonly SpriteSpecifier? Icon;
public readonly EntProtoId? EntityView;
public readonly string Name;
public readonly string Desc;
public readonly int Price;
public readonly bool Special;
public CP14StoreUiProductEntry(string protoId, SpriteSpecifier icon, string name, string desc, int price, bool special)
public CP14StoreUiProductEntry(string protoId, SpriteSpecifier? icon, EntProtoId? entityView, string name, string desc, int price, bool special)
{
ProtoId = protoId;
Icon = icon;
EntityView = entityView;
Name = name;
Desc = desc;
Price = price;

View File

@@ -0,0 +1,17 @@
using Content.Shared._CP14.Cargo.Prototype;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Cargo;
/// <summary>
/// Allows users to view information on faction trading opportunities
/// </summary>
[RegisterComponent]
public sealed partial class CP14TradingInfoBoardComponent : Component
{
[DataField]
public EntityUid? TradingPortal = null;
[DataField]
public ProtoId<CP14StoreFactionPrototype>? CahcedFaction;
}

View File

@@ -1,36 +1,29 @@
using Content.Shared._CP14.Cargo.Prototype;
using Content.Shared.Destructible.Thresholds;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo;
/// <summary>
/// Add to the station so that traveling store ship starts running on it
/// Add to the station so ...
/// </summary>
[RegisterComponent]
public sealed partial class CP14StationTravelingStoreShipTargetComponent : Component
[NetworkedComponent, RegisterComponent, AutoGenerateComponentPause, AutoGenerateComponentState]
public sealed partial class CP14TradingPortalComponent : Component
{
[DataField]
public EntityUid? Shuttle;
[DataField(required: true), AutoNetworkedField]
public ProtoId<CP14StoreFactionPrototype> Faction = default;
[DataField]
public EntityUid? TradePostMap;
public EntityCoordinates? TradingPosition = null;
[DataField]
public bool OnStation;
[DataField, AutoNetworkedField]
public TimeSpan Delay = TimeSpan.FromSeconds(3f);
[DataField]
public ResPath ShuttlePath = new("/Maps/_CP14/Ships/cargo_shuttle.yml");
[DataField]
public TimeSpan NextTravelTime = TimeSpan.Zero;
[DataField]
public TimeSpan StationWaitTime = TimeSpan.FromMinutes(6);
[DataField]
public TimeSpan TradePostWaitTime = TimeSpan.FromMinutes(4);
[DataField, AutoNetworkedField]
[AutoPausedField]
public TimeSpan ProcessFinishTime = TimeSpan.Zero;
/// <summary>
/// Available to random selecting and pusharing
@@ -54,7 +47,7 @@ public sealed partial class CP14StationTravelingStoreShipTargetComponent : Compo
public Dictionary<CP14StoreBuyPositionPrototype, int> CurrentSpecialBuyPositions = new(); //Proto, price
[DataField]
public MinMax SpecialBuyPositionCount = new(1, 2);
public int SpecialBuyPositionCount = 2;
[DataField]
public Dictionary<CP14StoreSellPositionPrototype, int> CurrentSellPositions = new(); //Proto, price
@@ -63,14 +56,8 @@ public sealed partial class CP14StationTravelingStoreShipTargetComponent : Compo
public Dictionary<CP14StoreSellPositionPrototype, int> CurrentSpecialSellPositions = new(); //Proto, price
[DataField]
public MinMax SpecialSellPositionCount = new(1, 2);
public int SpecialSellPositionCount = 2;
[DataField]
public int Balance = 0;
/// <summary>
/// a queue of purchased items. The oldest purchases are taken out one by one to be unloaded onto the ship
/// </summary>
[DataField]
public Queue<EntProtoId> BuyedQueue = new();
}

View File

@@ -1,21 +1,50 @@
using System.Text;
using Content.Shared.Stacks;
using Content.Shared.Storage.EntitySystems;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo.Prototype.BuyServices;
public sealed partial class CP14BuyItemsService : CP14StoreBuyService
{
[DataField(required: true)]
public Dictionary<EntProtoId, int> Product = new();
public EntProtoId Product;
public override void Buy(EntityManager entManager, IPrototypeManager prototype, Entity<CP14StationTravelingStoreShipTargetComponent> station)
[DataField]
public int Count = 1;
public override void Buy(EntityManager entManager,
IPrototypeManager prototype,
Entity<CP14TradingPortalComponent> portal)
{
foreach (var (protoId, count) in Product)
var storageSystem = entManager.System<SharedEntityStorageSystem>();
for (var i = 0; i < Count; i++)
{
for (var i = 0; i < count; i++)
{
station.Comp.BuyedQueue.Enqueue(protoId);
}
var spawned = entManager.Spawn(Product);
storageSystem.Insert(spawned, portal);
}
}
public override string GetName(IPrototypeManager protoMan)
{
if (!protoMan.TryIndex(Product, out var indexedProduct))
return ":3";
var count = Count;
if (indexedProduct.TryGetComponent<StackComponent>(out var stack))
count *= stack.Count;
return Count > 0 ? $"{indexedProduct.Name} x{count}" : indexedProduct.Name;
}
public override EntProtoId? GetEntityView(IPrototypeManager protoManager)
{
return Product;
}
public override SpriteSpecifier? GetTexture(IPrototypeManager protoManager)
{
return null;
}
}

View File

@@ -1,5 +1,5 @@
using System.Text;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo.Prototype.BuyServices;
@@ -14,17 +14,23 @@ public sealed partial class CP14UnlockPositionsService : CP14StoreBuyService
[DataField]
public HashSet<ProtoId<CP14StoreBuyPositionPrototype>> RemoveBuyPositions = new();
public override void Buy(EntityManager entManager, IPrototypeManager prototype, Entity<CP14StationTravelingStoreShipTargetComponent> station)
[DataField]
public HashSet<ProtoId<CP14StoreSellPositionPrototype>> RemoveSellPositions = new();
[DataField]
public SpriteSpecifier? Icon = null;
[DataField]
public LocId Name = string.Empty;
public override void Buy(EntityManager entManager, IPrototypeManager prototype, Entity<CP14TradingPortalComponent> portal)
{
foreach (var buy in AddBuyPositions)
{
if (!prototype.TryIndex(buy, out var indexedBuy))
continue;
if (station.Comp.AvailableBuyPosition.Contains(indexedBuy))
continue;
station.Comp.AvailableBuyPosition.Add(indexedBuy);
portal.Comp.AvailableBuyPosition.Add(indexedBuy);
}
foreach (var sell in AddSellPositions)
@@ -32,10 +38,7 @@ public sealed partial class CP14UnlockPositionsService : CP14StoreBuyService
if (!prototype.TryIndex(sell, out var indexedSell))
continue;
if (station.Comp.AvailableSellPosition.Contains(indexedSell))
continue;
station.Comp.AvailableSellPosition.Add(indexedSell);
portal.Comp.AvailableSellPosition.Add(indexedSell);
}
foreach (var rBuy in RemoveBuyPositions)
@@ -43,10 +46,36 @@ public sealed partial class CP14UnlockPositionsService : CP14StoreBuyService
if (!prototype.TryIndex(rBuy, out var indexedBuy))
continue;
if (!station.Comp.AvailableBuyPosition.Contains(indexedBuy))
if (!portal.Comp.AvailableBuyPosition.Contains(indexedBuy))
continue;
station.Comp.AvailableBuyPosition.Remove(indexedBuy);
portal.Comp.AvailableBuyPosition.Remove(indexedBuy);
}
foreach (var rSell in RemoveSellPositions)
{
if (!prototype.TryIndex(rSell, out var indexedSell))
continue;
if (!portal.Comp.AvailableSellPosition.Contains(indexedSell))
continue;
portal.Comp.AvailableSellPosition.Remove(indexedSell);
}
}
public override string GetName(IPrototypeManager protoMan)
{
return Loc.GetString(Name);
}
public override EntProtoId? GetEntityView(IPrototypeManager protoManager)
{
return null;
}
public override SpriteSpecifier? GetTexture(IPrototypeManager protoManager)
{
return Icon;
}
}

View File

@@ -1,4 +1,3 @@
using Content.Shared.Destructible.Thresholds;
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -17,23 +16,20 @@ public sealed partial class CP14StoreBuyPositionPrototype : IPrototype
[DataField(required: true)]
public int Price = 100;
[DataField(required: true)]
public LocId Name = string.Empty;
/// <summary>
/// a unique code that can be used to purchase items.
/// </summary>
[DataField(required: true)]
public string Code = string.Empty;
[DataField(required: true)]
public CP14StoreBuyService Service = default!;
[DataField]
public LocId Desc = string.Empty;
public SpriteSpecifier? IconOverride;
[DataField(required: true)]
public SpriteSpecifier Icon = default!;
[DataField(required: true)]
public List<CP14StoreBuyService> Services = new();
[DataField]
public LocId? NameOverride;
[DataField]
public bool RoundstartAvailable = true;
@@ -42,12 +38,27 @@ public sealed partial class CP14StoreBuyPositionPrototype : IPrototype
/// If true, this item will randomly appear under the Special Offer heading. With a chance to show up every time the ship arrives.
/// </summary>
[DataField]
public bool Special = false;
public bool Special;
[DataField]
public HashSet<ProtoId<CP14StoreFactionPrototype>> Factions = new();
}
[ImplicitDataDefinitionForInheritors]
[MeansImplicitUse]
public abstract partial class CP14StoreBuyService
{
public abstract void Buy(EntityManager entManager, IPrototypeManager prototype, Entity<CP14StationTravelingStoreShipTargetComponent> station);
public abstract void Buy(EntityManager entManager, IPrototypeManager prototype, Entity<CP14TradingPortalComponent> portal);
public abstract string GetName(IPrototypeManager protoMan);
/// <summary>
/// You can specify an icon generated from an entity. It will support layering, colour changes and other layer options. Return null to disable.
/// </summary>
public abstract EntProtoId? GetEntityView(IPrototypeManager protoManager);
/// <summary>
/// You can specify the texture directly. Return null to disable.
/// </summary>
public abstract SpriteSpecifier? GetTexture(IPrototypeManager protoManager);
}

View File

@@ -0,0 +1,16 @@
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Cargo.Prototype;
[Prototype("storeFaction")]
public sealed partial class CP14StoreFactionPrototype : IPrototype
{
[IdDataField, ViewVariables]
public string ID { get; private set; } = default!;
[DataField(required: true)]
public LocId Name = string.Empty;
[DataField]
public LocId Desc = string.Empty;
}

View File

@@ -17,15 +17,6 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype
[DataField(required: true)]
public int Price = 100;
[DataField(required: true)]
public LocId Name = string.Empty;
[DataField]
public LocId Desc = string.Empty;
[DataField(required: true)]
public SpriteSpecifier Icon = default!;
[DataField(required: true)]
public CP14StoreSellService Service = default!;
@@ -37,6 +28,9 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype
/// </summary>
[DataField]
public bool Special = false;
[DataField]
public HashSet<ProtoId<CP14StoreFactionPrototype>> Factions = new();
}
[ImplicitDataDefinitionForInheritors]
@@ -44,4 +38,16 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype
public abstract partial class CP14StoreSellService
{
public abstract bool TrySell(EntityManager entManager, HashSet<EntityUid> entities);
public abstract string GetName(IPrototypeManager protoMan);
/// <summary>
/// You can specify an icon generated from an entity. It will support layering, colour changes and other layer options. Return null to disable.
/// </summary>
public abstract EntProtoId? GetEntityView(IPrototypeManager protoManager);
/// <summary>
/// You can specify the texture directly. Return null to disable.
/// </summary>
public abstract SpriteSpecifier? GetTexture(IPrototypeManager protoManager);
}

View File

@@ -0,0 +1,65 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo.Prototype.SellServices;
public sealed partial class CP14SellPrototypeService : CP14StoreSellService
{
[DataField(required: true)]
public EntProtoId Proto;
[DataField]
public int Count = 1;
public override bool TrySell(EntityManager entManager, HashSet<EntityUid> entities)
{
HashSet<EntityUid> suitable = new();
var needCount = Count;
foreach (var ent in entities)
{
if (needCount <= 0)
break;
if (!entManager.TryGetComponent<MetaDataComponent>(ent, out var metaData))
continue;
if (metaData.EntityPrototype is null)
continue;
if (metaData.EntityPrototype != Proto)
continue;
suitable.Add(ent);
needCount -= 1;
}
if (needCount > 0)
return false;
foreach (var selledEnt in suitable)
{
entManager.QueueDeleteEntity(selledEnt);
}
return true;
}
public override string GetName(IPrototypeManager protoMan)
{
if (!protoMan.TryIndex(Proto, out var proto))
return ":3";
return $"{proto.Name} x{Count}";
}
public override EntProtoId? GetEntityView(IPrototypeManager protoManager)
{
return Proto;
}
public override SpriteSpecifier? GetTexture(IPrototypeManager protoManager)
{
return null;
}
}

View File

@@ -1,12 +1,13 @@
using Content.Shared.Stacks;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo.Prototype.SellServices;
public sealed partial class CP14SellStackService : CP14StoreSellService
{
[DataField(required: true)]
public ProtoId<StackPrototype> StackId = new();
public ProtoId<StackPrototype> StackId;
[DataField(required: true)]
public int Count = 1;
@@ -17,7 +18,7 @@ public sealed partial class CP14SellStackService : CP14StoreSellService
Dictionary<Entity<StackComponent>, int> suitable = new();
int needCount = Count;
var needCount = Count;
foreach (var ent in entities)
{
if (needCount <= 0)
@@ -49,4 +50,25 @@ public sealed partial class CP14SellStackService : CP14StoreSellService
return true;
}
public override string GetName(IPrototypeManager protoMan)
{
if (!protoMan.TryIndex(StackId, out var proto))
return ":3";
return $"{Loc.GetString(proto.Name)} x{Count}";
}
public override EntProtoId? GetEntityView(IPrototypeManager protoManager)
{
return null;
}
public override SpriteSpecifier? GetTexture(IPrototypeManager protoManager)
{
if (!protoManager.TryIndex(StackId, out var proto))
return null;
return proto.Icon;
}
}

View File

@@ -1,5 +1,6 @@
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Cargo.Prototype.SellServices;
@@ -11,13 +12,19 @@ public sealed partial class CP14SellWhitelistService : CP14StoreSellService
[DataField(required: true)]
public int Count = 1;
[DataField(required: true)]
public LocId Name = string.Empty;
[DataField(required: true)]
public SpriteSpecifier? Sprite = null;
public override bool TrySell(EntityManager entManager, HashSet<EntityUid> entities)
{
var whitelistSystem = entManager.System<EntityWhitelistSystem>();
HashSet<EntityUid> suitable = new();
int needCount = Count;
var needCount = Count;
foreach (var ent in entities)
{
if (needCount <= 0)
@@ -44,4 +51,19 @@ public sealed partial class CP14SellWhitelistService : CP14StoreSellService
return true;
}
public override string GetName(IPrototypeManager protoMan)
{
return $"{Loc.GetString(Name)} x{Count}";
}
public override EntProtoId? GetEntityView(IPrototypeManager protoManager)
{
return null;
}
public override SpriteSpecifier? GetTexture(IPrototypeManager protoManager)
{
return Sprite;
}
}

View File

@@ -46,14 +46,9 @@ public partial class CP14SharedCurrencySystem : EntitySystem
}
}
public sealed class CP14GetCurrencyEvent : EntityEventArgs
public sealed class CP14GetCurrencyEvent(int currency = 0, int multiplier = 1) : EntityEventArgs
{
public int Currency;
public float Multiplier;
public CP14GetCurrencyEvent(int cur = 0, int mult = 1)
{
Currency = cur;
Multiplier = mult;
}
public HashSet<EntityUid> CheckedEntities = new();
public int Currency = currency;
public float Multiplier = multiplier;
}

View File

@@ -1,9 +1,3 @@
cp14-lock-shape-bank-entrance = bank hall
cp14-lock-shape-bank-staff = bank offices
cp14-lock-shape-bank-commandant = commandant's house
cp14-lock-shape-bank-safe = bank safes
cp14-lock-shape-bank-vault = bank vault
cp14-lock-shape-tavern-hall = tavern hall
cp14-lock-shape-tavern-staff = tavern staff quarters
cp14-lock-shape-tavern-dorm1 = tavern room №1
@@ -20,6 +14,10 @@ cp14-lock-shape-blacksmith1 = forge №1
cp14-lock-shape-blacksmith2 = forge №2
cp14-lock-shape-blacksmith3 = forge №3
cp14-lock-shape-merchant1 = shop №1
cp14-lock-shape-merchant2 = shop №2
cp14-lock-shape-merchant3 = shop №3
cp14-lock-shape-personalhouse1 = house №1
cp14-lock-shape-personalhouse2 = house №2
cp14-lock-shape-personalhouse3 = house №3

View File

@@ -1,4 +1,7 @@
cp14-objective-issuer-personal = [color="#95a6c2"]Personal objectives[/color]
cp14-objective-personal-currency-collect-title = Earn{$coins}
cp14-objective-personal-currency-collect-desc = I plan to earn at least{$coins} by working here.
cp14-objective-personal-currency-collect-desc = I plan to earn at least{$coins} by working here.
cp14-objective-personal-richest-merchant-title = Become the richest of merchants
cp14-objective-personal-richest-merchant-desc = I must beat all other merchants by making more money than all of them!

View File

@@ -0,0 +1,11 @@
cp14-faction-name-helmir = Helmir's descendants
cp14-faction-desc-helmir = TODO
cp14-faction-name-sylphoria = The winds of Sylphoria
cp14-faction-desc-sylphoria = TODO
cp14-faction-name-spice-stream = Spice Stream
cp14-faction-desc-spice-stream = TODO
cp14-faction-name-brad-family = Brad's imperial family
cp14-faction-desc-brad-family = TODO

View File

@@ -0,0 +1,11 @@
cp14-store-ui-title = Trading outpost "{$name}"
cp14-store-ui-order = More info
cp14-store-ui-next-travel-out = Before departure:
cp14-store-ui-next-travel-in = Before arrival:
cp14-store-ui-tab-buy = Buying
cp14-store-ui-tab-sell = Selling
cp14-store-ui-tab-special = [bold][color=#eba346]One-off offer![/color][/bold]
cp14-store-sell-hint = To sell {$name}, put the item you want in the trade cabinet, and close it. Our people will figure out what's what, pick up the item, and send you the money through the same sales cabinet.

View File

@@ -1,37 +0,0 @@
cp14-store-sell-hint = To sell {$name}, load the desired goods onto the selling pallets. Our people in town will sort it out, pick up the goods and leave the money in the trade box on the ship.
cp14-store-sell-wood-name = 30 wooden planks
cp14-store-sell-wood-desc = Do you really think anyone needs planks from a faraway island? Well, you're right, we hope your settlement has something to keep you warm in the winter.
cp14-store-sell-glass-name = 10 glass
cp14-store-sell-glass-desc = A fine material prized in the Empire for its versatility. The windows of palaces, the lenses of craftsmen, and even the mirrors of mages all require glass. Your labors are sure to find a use for it!
cp14-store-sell-alchemical-herbals-name = 10 alchemical herbals
cp14-store-sell-alchemical-herbals-desc = TODO
# Metalls
cp14-store-sell-copperbar-name = 10 copper bars
cp14-store-sell-copperbar-desc = Although copper is used mainly as a coin material, it is also often enjoyed by blacksmiths in various alloys.
cp14-store-sell-ironbar-name = 10 iron bars
cp14-store-sell-ironbar-desc = Iron is an indispensable material in the manufacture of... almost anything that has any longevity in this world. And surely the Empire could use an extra shipment.
cp14-store-sell-goldbar-name = 10 gold bars
cp14-store-sell-goldbar-desc = The mining and processing of gold ore is heavily sponsored by the empire, which uses gold as currency and material for jewelry.
cp14-store-sell-mithrilbar-name = 10 mithril bars
cp14-store-sell-mithrilbar-desc = TODO
cp14-store-sell-copperore-name = 10 copper ore
cp14-store-sell-copperore-desc = TODO
cp14-store-sell-ironore-name = 10 iron ore
cp14-store-sell-ironore-desc = TODO
cp14-store-sell-goldore-name = 10 gold ore
cp14-store-sell-goldore-desc = TODO
cp14-store-sell-mithrilore-name = 10 mithril ore
cp14-store-sell-mithrilore-desc = TODO

View File

@@ -1,20 +0,0 @@
cp14-store-sell-special-wheat-name = 10 sheaves of wheat
cp14-store-sell-special-wheat-desc = Urgent wheat order! Our lizards have gone berserk and devoured the entire supply! Any supplies of wheat would be appreciated!
cp14-store-sell-special-dye-name = 10 dyes
cp14-store-sell-special-dye-desc = An aristocrat from the capital has suddenly shown an interest in painting, and requires dyes for his experiments. The Empire is buying up all the dyes you can provide her with.
cp14-store-sell-special-meat-name = 10 pieces of meat
cp14-store-sell-special-meat-desc = Any kind of meat will do. Lambs, goats, cows, even giant worms! In fact, send anything you want, Isil Island has no food for carnivores at the moment.
cp14-store-sell-special-torch-name = 20 torches
cp14-store-sell-special-torch-desc = The settlement of Grimstroke is requesting a large shipment of torches from the Empire! We're making a big march on the Great Tomb of Lazaric! And we have nothing to light it with.
cp14-store-sell-special-ash-name = 10 ashes
cp14-store-sell-special-ash-desc = The Mermaid Council is requesting a shipment of ash to their oceanic domain for the reason, quote Where do you think we should get ash from underwater?
cp14-store-sell-special-lucen-name = 10 lucen planks
cp14-store-sell-special-lucen-desc = A shipment of magical wood is needed to build an enchanted country house for an aristocrat. The whims of the rich are mysterious!
cp14-store-sell-special-spell-scroll-name = 5 spell scrolls
cp14-store-sell-special-spell-scroll-desc = We don't really care what spells are in the scrolls, they are only for reporting the magical prosperity of the settlement to the local Commandant.

View File

@@ -1,9 +0,0 @@
cp14-store-ui-title = Retail information board
cp14-store-ui-order = More info
cp14-store-ui-next-travel-out = Before departure:
cp14-store-ui-next-travel-in = Before arrival:
cp14-store-ui-tab-buy = Buying
cp14-store-ui-tab-sell = Selling
cp14-store-ui-tab-special = [bold][color=#eba346]Temporary offer![/color][/bold]

View File

@@ -1,9 +1,3 @@
cp14-lock-shape-bank-entrance = холл банка
cp14-lock-shape-bank-staff = служебные помещения банка
cp14-lock-shape-bank-commandant = дом комменданта
cp14-lock-shape-bank-safe = сейфы банка
cp14-lock-shape-bank-vault = хранилище банка
cp14-lock-shape-tavern-hall = зал таверны
cp14-lock-shape-tavern-staff = служебные помещения таверны
cp14-lock-shape-tavern-dorm1 = комната таверны №1
@@ -20,6 +14,10 @@ cp14-lock-shape-blacksmith1 = кузня №1
cp14-lock-shape-blacksmith2 = кузня №2
cp14-lock-shape-blacksmith3 = кузня №3
cp14-lock-shape-merchant1 = магазин №1
cp14-lock-shape-merchant2 = магазин №2
cp14-lock-shape-merchant3 = магазин №3
cp14-lock-shape-personalhouse1 = дом №1
cp14-lock-shape-personalhouse2 = дом №2
cp14-lock-shape-personalhouse3 = дом №3

View File

@@ -1,4 +1,7 @@
cp14-objective-issuer-personal = [color="#95a6c2"]Личные цели[/color]
cp14-objective-personal-currency-collect-title = Заработать{$coins}
cp14-objective-personal-currency-collect-desc = Я планирую заработать как минимум{$coins}, работая здесь.
cp14-objective-personal-currency-collect-desc = Я планирую заработать как минимум{$coins}, работая здесь.
cp14-objective-personal-richest-merchant-title = Стать самым богатым из торговцев
cp14-objective-personal-richest-merchant-desc = Я должен обставить всех других торговцев, заработав денег больше чем все они!

View File

@@ -0,0 +1,11 @@
cp14-faction-name-helmir = Хельмировы потомки
cp14-faction-desc-helmir = TODO
cp14-faction-name-sylphoria = Ветра Сильфории
cp14-faction-desc-sylphoria = TODO
cp14-faction-name-spice-stream = Поток пряностей
cp14-faction-desc-spice-stream = TODO
cp14-faction-name-brad-family = Имперская семья Брада
cp14-faction-desc-brad-family = TODO

View File

@@ -0,0 +1,11 @@
cp14-store-ui-title = Торговый аванпост "{$name}"
cp14-store-ui-order = Дополнительная информация
cp14-store-ui-next-travel-out = До отправления:
cp14-store-ui-next-travel-in = До прибытия:
cp14-store-ui-tab-buy = Покупка
cp14-store-ui-tab-sell = Продажа
cp14-store-ui-tab-special = [bold][color=#eba346]Разовое предложение![/color][/bold]
cp14-store-sell-hint = Чтобы продать {$name}, засуньте необходимый товар в торговый шкаф, и закройте его. Наши люди разберутся что к чему, заберут товар и отправят вам деньги через этот же торговый шкаф.

View File

@@ -1,20 +0,0 @@
cp14-store-sell-special-wheat-name = 10 снопов пшеницы
cp14-store-sell-special-wheat-desc = Срочный заказ пшеницы! Наши ящеры взбесились и сожрали вообще все запасы! Мы будем благодарны любым запасам пшена!
cp14-store-sell-special-dye-name = 10 красителей
cp14-store-sell-special-dye-desc = Аристократ из столицы внезапно проявил интерес с рисованию, и требует красителей для своих экспериментов. Империя скупаем все красители, которые вы сможете ей предоставить.
cp14-store-sell-special-meat-name = 10 кусков мяса
cp14-store-sell-special-meat-desc = Нам подойдет любое мясо. Бараны, козы, коровы, да хоть гигантские черви! В общем, присылайте любое, острову Изиль сейчас нечем кормить хищный скот.
cp14-store-sell-special-torch-name = 20 факелов
cp14-store-sell-special-torch-desc = Поселение Гримстроук запрашивает большую партию факелов от Империи! Мы устраиваем большой поход на Великую Гробницу Лазарика! И нам нечем освещать ее.
cp14-store-sell-special-ash-name = 10 пепла
cp14-store-sell-special-ash-desc = Совет русалок запрашивает партию пепла в свои океанические владения по причине, цитата 'Откуда мы должны под водой получать пепел по вашему?'
cp14-store-sell-special-lucen-name = 10 люценовых досок
cp14-store-sell-special-lucen-desc = Необходима партия магической древесины для строительства зачарованной загородной дачи одного из аристократов. Причуды богатых неисповедимы!
cp14-store-sell-special-spell-scroll-name = 5 свитков заклинаний
cp14-store-sell-special-spell-scroll-desc = Нам на самом деле не важно какие именно заклинания находятся в свитках, они нам только для отчетности магического процветания поселения перед местным Комендантом.

View File

@@ -1,37 +0,0 @@
cp14-store-sell-hint = Чтобы продать {$name}, погрузите необходимый товар на продающие поддоны. Наши люди в городе разберутся что к чему, заберут товар и оставят деньги в торговом ящике на корабле.
cp14-store-sell-wood-name = 30 деревянных досок
cp14-store-sell-wood-desc = Вы правда думаете что хоть кому то нужны доски с далекого острова? Что ж вы правы, надеемся у вашего поселения есть чем греться зимой.
cp14-store-sell-glass-name = 10 стекла
cp14-store-sell-glass-desc = Изящный материал, который ценится в Империи за свою универсальность. Окна дворцов, линзы мастеров и даже зеркала магов — все это требует стекла. Ваши труды точно найдут применение!
cp14-store-sell-alchemical-herbals-name = 10 алхимических растений
cp14-store-sell-alchemical-herbals-desc = TODO
# Metalls
cp14-store-sell-copperbar-name = 10 медных слитков
cp14-store-sell-copperbar-desc = Хоть медь и используется в основном как материал для монет но и в разных сплавах он часто нравится кузнецам.
cp14-store-sell-ironbar-name = 10 железных слитков
cp14-store-sell-ironbar-desc = Железо - незаменимый материал для производства... почти всего, что имеет хоть какую либо долговечность в этом мире. И конечно же, Империя не откажется от дополнительной партии.
cp14-store-sell-goldbar-name = 10 золотых слитков
cp14-store-sell-goldbar-desc = Добыча и обработка золотой руды активно спонсируется империей, использующей золото как валюту и материал для ювелирных украшений.
cp14-store-sell-mithrilbar-name = 10 мифриловых слитков
cp14-store-sell-mithrilbar-desc = TODO
cp14-store-sell-copperore-name = 10 медной руды
cp14-store-sell-copperore-desc = TODO
cp14-store-sell-ironore-name = 10 железной руды
cp14-store-sell-ironore-desc = TODO
cp14-store-sell-goldore-name = 10 золотой руды
cp14-store-sell-goldore-desc = TODO
cp14-store-sell-mithrilore-name = 10 мифриловой руды
cp14-store-sell-mithrilore-desc = TODO

View File

@@ -1,9 +0,0 @@
cp14-store-ui-title = Информационное торговое табло
cp14-store-ui-order = Дополнительная информация
cp14-store-ui-next-travel-out = До отправления:
cp14-store-ui-next-travel-in = До прибытия:
cp14-store-ui-tab-buy = Покупка
cp14-store-ui-tab-sell = Продажа
cp14-store-ui-tab-special = [bold][color=#eba346]Временное предложение![/color][/bold]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2489,7 +2489,7 @@ entities:
- type: Transform
pos: 5.5,-9.5
parent: 2
- proto: CP14TravelingShop
- proto: CP14TradingBoardBase
entities:
- uid: 418
components:
@@ -2503,15 +2503,6 @@ entities:
rot: -1.5707963267948966 rad
pos: 0.5,11.5
parent: 2
- proto: CP14TravelingStoreshipAnchor
entities:
- uid: 467
components:
- type: Transform
anchored: False
rot: 1.5707963267948966 rad
pos: 1.5,14.5
parent: 1
- proto: CP14VialMedium
entities:
- uid: 45
@@ -3103,7 +3094,7 @@ entities:
- type: Transform
pos: 3.5,-0.5
parent: 2
- proto: CP14WoodenDoorTavernAlchemy1
- proto: CP14WoodenDoorAlchemy1
entities:
- uid: 287
components:

View File

@@ -0,0 +1,188 @@
- type: storePositionBuy
id: AlchemyVials
code: VIALS
price: 40
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_medium.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledAlchemy
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledAlchemy
name: alchemical vials chest
components:
- type: StorageFill
contents:
- id: CP14VialTiny
amount: 5
- id: CP14VialSmall
amount: 5
- id: CP14VialMedium
amount: 5
- id: CP14GlassShard #Lol. Something broken
prob: 0.2
- type: storePositionBuy
id: CP14VialSmallHealingBrute
code: HEAL_BRUTE
price: 50
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallHealingBrute
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallHealingBrute
name: healing potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallHealingBrute
amount: 5
- type: storePositionBuy
id: CP14VialSmallHealingPoison
code: HEAL_POISON
price: 50
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallHealingPoison
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallHealingPoison
name: antidote potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallHealingPoison
amount: 5
- type: storePositionBuy
id: CP14VialSmallHealingAirloss
code: HEAL_AIRLOSS
price: 50
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallHealingAirloss
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallHealingAirloss
name: airloss healing potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallHealingAirloss
amount: 5
- type: storePositionBuy
id: CP14VialSmallHealingBlood
code: HEAL_BLOOD
price: 50
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallHealingBlood
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallHealingBlood
name: blood restoration potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallHealingBlood
amount: 5
- type: storePositionBuy
id: CP14VialSmallHealingMana
code: HEAL_MANA
price: 70
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallHealingMana
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallHealingMana
name: mana potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallHealingMana
amount: 5
- type: storePositionBuy
id: CP14VialSmallSpeedUp
code: SPEED_UP
price: 70
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallSpeedUp
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallSpeedUp
name: accseleration potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallSpeedUp
amount: 5
- type: storePositionBuy
id: CP14VialSmallRainbow
code: FUNNY_POTION
price: 100
iconOverride:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
factions:
- BradFamily
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledSmallRainbow
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledSmallRainbow
name: funny potions chest
components:
- type: StorageFill
contents:
- id: CP14VialSmallRainbow
amount: 5

View File

@@ -0,0 +1,99 @@
- type: storePositionSell
id: CP14BloodFlower
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14BloodFlower
count: 5
- type: storePositionSell
id: CP14AgaricMushroom
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14AgaricMushroom
count: 5
- type: storePositionSell
id: CP14ChromiumSlime
special: true
price: 150
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14ChromiumSlime
count: 5
- type: storePositionSell
id: CP14WildSage
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14WildSage
count: 5
- type: storePositionSell
id: CP14LumiMushroom
special: true
price: 100
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14LumiMushroom
count: 5
- type: storePositionSell
id: CP14BlueAmanita
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14BlueAmanita
count: 5
- type: storePositionSell
id: CP14Dayflin
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14Dayflin
count: 5
- type: storePositionSell
id: CP14AirLily
special: true
price: 75
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14AirLily
count: 5
- type: storePositionSell
id: CP14CrystalShardBase
special: true
price: 50
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14CrystalShardBase
count: 5
- type: storePositionSell
id: CP14BaseAlchemyBomb
special: true
price: 250
factions:
- BradFamily
service: !type:CP14SellPrototypeService
proto: CP14BaseAlchemyBomb
count: 3

View File

@@ -0,0 +1,15 @@
- type: storePositionSell
id: CP14FoodPieMeat
special: true
price: 30
service: !type:CP14SellPrototypeService
proto: CP14FoodPieMeat
count: 1
- type: storePositionSell
id: CP14FoodPiePumpkin
special: true
price: 30
service: !type:CP14SellPrototypeService
proto: CP14FoodPiePumpkin
count: 1

View File

@@ -0,0 +1,99 @@
- type: storePositionBuy
id: CP14ModularIronArrow
code: ARROW
price: 100
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronArrow
count: 6
- type: storePositionBuy
id: CP14ModularIronAxe
code: AXE
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronAxe
count: 3
- type: storePositionBuy
id: CP14ModularIronDagger
code: DAGGER
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronDagger
count: 7
- type: storePositionBuy
id: CP14ModularIronHammer
code: HAMMER
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronHammer
count: 5
- type: storePositionBuy
id: CP14ModularIronMace
code: MACE
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronMace
count: 5
- type: storePositionBuy
id: CP14ModularIronPickaxe
code: PICKAXE
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronPickaxe
count: 5
- type: storePositionBuy
id: CP14ModularIronShovel
code: SHOVEL
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronShovel
count: 5
- type: storePositionBuy
id: CP14ModularIronSickle
code: SICKLE
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronSickle
count: 7
- type: storePositionBuy
id: CP14ModularIronSpear
code: SPEAR
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronSpear
count: 5
- type: storePositionBuy
id: CP14ModularIronSword
code: SWORD
price: 150
factions:
- HelmirWeapon
service: !type:CP14BuyItemsService
product: CP14ModularIronSword
count: 5

View File

@@ -1,95 +0,0 @@
- type: storePositionSell
id: CopperBars
name: cp14-store-sell-copperbar-name
desc: cp14-store-sell-copperbar-desc
icon:
sprite: _CP14/Objects/Materials/copper_bar.rsi
state: bar_3
price: 150
service: !type:CP14SellStackService
stackId: CP14CopperBar
count: 10
- type: storePositionSell
id: CopperOre
name: cp14-store-sell-copperore-name
desc: cp14-store-sell-copperore-desc
icon:
sprite: _CP14/Objects/Materials/copper_ore.rsi
state: ore3
price: 20
service: !type:CP14SellStackService
stackId: CP14OreCopper
count: 10
- type: storePositionSell
id: IronBars
name: cp14-store-sell-ironbar-name
desc: cp14-store-sell-ironbar-desc
icon:
sprite: _CP14/Objects/Materials/iron_bar.rsi
state: bar_3
price: 300
service: !type:CP14SellStackService
stackId: CP14IronBar
count: 10
- type: storePositionSell
id: IronOre
name: cp14-store-sell-ironore-name
desc: cp14-store-sell-ironore-desc
icon:
sprite: _CP14/Objects/Materials/iron_ore.rsi
state: ore3
price: 30
service: !type:CP14SellStackService
stackId: CP14OreIron
count: 10
- type: storePositionSell
id: GoldBars
name: cp14-store-sell-goldbar-name
desc: cp14-store-sell-goldbar-desc
icon:
sprite: _CP14/Objects/Materials/gold_bar.rsi
state: bar_3
price: 1200
service: !type:CP14SellStackService
stackId: CP14GoldBar
count: 10
- type: storePositionSell
id: GoldOre
name: cp14-store-sell-goldore-name
desc: cp14-store-sell-goldore-desc
icon:
sprite: _CP14/Objects/Materials/gold_ore.rsi
state: ore3
price: 120
service: !type:CP14SellStackService
stackId: CP14OreGold
count: 10
- type: storePositionSell
id: MithrilBars
name: cp14-store-sell-mithrilbar-name
desc: cp14-store-sell-mithrilbar-desc
icon:
sprite: _CP14/Objects/Materials/mithril_bar.rsi
state: bar_3
price: 2500
service: !type:CP14SellStackService
stackId: CP14MithrilBar
count: 10
- type: storePositionSell
id: MithrilOre
name: cp14-store-sell-mithrilore-name
desc: cp14-store-sell-mithrilore-desc
icon:
sprite: _CP14/Objects/Materials/mithril_ore.rsi
state: ore3
price: 250
service: !type:CP14SellStackService
stackId: CP14OreMithril
count: 10

View File

@@ -1,37 +0,0 @@
- type: storePositionSell
id: Wood
name: cp14-store-sell-wood-name
desc: cp14-store-sell-wood-desc
icon:
sprite: _CP14/Objects/Materials/wood.rsi
state: planks_3
price: 20
service: !type:CP14SellStackService
stackId: CP14WoodenPlanks
count: 30
- type: storePositionSell
id: Glass
name: cp14-store-sell-glass-name
desc: cp14-store-sell-glass-desc
icon:
sprite: _CP14/Objects/Materials/glass.rsi
state: glass_3
price: 100
service: !type:CP14SellStackService
stackId: CP14GlassSheet
count: 10
- type: storePositionSell
id: AlchemicalHerbals
name: cp14-store-sell-alchemical-herbals-name
desc: cp14-store-sell-alchemical-herbals-desc
icon:
sprite: _CP14/Objects/Flora/Wild/store_position.rsi
state: sell
price: 50
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14AlchemicalHerbals
count: 10

View File

@@ -0,0 +1,221 @@
- type: storePositionBuy
id: FarmSeeds
code: SEEDS
iconOverride:
sprite: _CP14/Objects/Specific/Farming/seeds.rsi
state: seeds
price: 70
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledFarmSeeds
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledFarmSeeds
name: farm seeds chest
components:
- type: StorageFill
contents:
- id: CP14SeedWheat
amount: 3
- id: CP14SeedPumpkin
amount: 3
- id: CP14SeedCabbage
amount: 3
- id: CP14SeedCucumber
amount: 3
- id: CP14SeedTomato
amount: 3
- id: CP14SeedOnion
amount: 3
- id: CP14SeedPepper
amount: 3
- type: storePositionBuy
id: Cheese
code: CHEESE
iconOverride:
sprite: _CP14/Objects/Consumable/Food/cheese.rsi
state: cheese_wheel
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledCheese
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledCheese
name: cheese chest
components:
- type: StorageFill
contents:
- id: CP14FoodCheeseWheel
amount: 5
- type: storePositionBuy
id: Wood
code: WOOD
price: 50
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14WoodenPlanks10
count: 5
- type: storePositionBuy
id: Fabric
code: FABRIC
price: 30
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14Cloth10
count: 3
- type: storePositionBuy
id: CP14String
code: STRINGS
price: 30
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14String
count: 5
- type: storePositionBuy
id: CopperBar
code: COPPER
price: 250
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14CopperBar10
- type: storePositionBuy
id: IronBar
code: IRON
price: 500
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14IronBar10
- type: storePositionBuy
id: GoldBar
code: GOLD
price: 2000
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14GoldBar10
- type: storePositionBuy
id: Demiplane
code: DEMIPLANE_1
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14DemiplaneKeyT1
count: 5
- type: storePositionBuy
id: Demiplane2
code: DEMIPLANE_2
price: 200
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14DemiplaneKeyT2
count: 5
- type: storePositionBuy
id: Bureaucracy
code: PAPER
iconOverride:
sprite: _CP14/Objects/Bureaucracy/paper.rsi
state: folder_red
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledBureaucracy
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledBureaucracy
name: bureaucracy chest
components:
- type: StorageFill
contents:
- id: CP14PaperFolderBlue
amount: 5
- id: CP14PaperFolderRed
amount: 5
- id: CP14Paper
amount: 5
- id: CP14PenFeather
amount: 3
- type: storePositionBuy
id: CP14BookKnowledgeMetallMelting
code: KNOWLEDGE_MELTING
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BookKnowledgeMetallMelting
- type: storePositionBuy
id: CP14BookKnowledgeMetallForging
code: KNOWLEDGE_FORGING
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BookKnowledgeMetallForging
- type: storePositionBuy
id: CP14BookKnowledgeGlasswork
code: KNOWLEDGE_GLASSWORK
price: 100
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BookKnowledgeGlasswork
- type: storePositionBuy
id: EnergyCrystals
code: ENERGY
iconOverride:
sprite: _CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi
state: icon
price: 150
factions:
- SpiceStream
service: !type:CP14BuyItemsService
product: CP14BrassChestFilledEnergyCrystals
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledEnergyCrystals
name: energy crystals chest
components:
- type: StorageFill
contents:
- id: CP14EnergyCrystalSmallEmpty
amount: 5
- id: CP14EnergyCrystalMediumEmpty
amount: 3
- id: CP14ManaOperationGlove
amount: 2

View File

@@ -0,0 +1,94 @@
- type: storePositionSell
id: CopperBars
price: 150
factions:
- SpiceStream
- HelmirWeapon
service: !type:CP14SellStackService
stackId: CP14CopperBar
count: 10
- type: storePositionSell
id: CopperOre
price: 20
factions:
- SpiceStream
service: !type:CP14SellStackService
stackId: CP14OreCopper
count: 10
- type: storePositionSell
id: IronBars
price: 300
factions:
- SpiceStream
- HelmirWeapon
service: !type:CP14SellStackService
stackId: CP14IronBar
count: 10
- type: storePositionSell
id: IronOre
price: 30
factions:
- SpiceStream
service: !type:CP14SellStackService
stackId: CP14OreIron
count: 10
- type: storePositionSell
id: GoldBars
price: 1200
factions:
- SpiceStream
- HelmirWeapon
service: !type:CP14SellStackService
stackId: CP14GoldBar
count: 10
- type: storePositionSell
id: GoldOre
price: 120
factions:
- SpiceStream
service: !type:CP14SellStackService
stackId: CP14OreGold
count: 10
- type: storePositionSell
id: MithrilBars
price: 2500
factions:
- SpiceStream
- HelmirWeapon
service: !type:CP14SellStackService
stackId: CP14MithrilBar
count: 10
- type: storePositionSell
id: MithrilOre
price: 250
factions:
- SpiceStream
service: !type:CP14SellStackService
stackId: CP14OreMithril
count: 10
- type: storePositionSell
id: Wood
price: 20
factions:
- SpiceStream
- HelmirWeapon
service: !type:CP14SellStackService
stackId: CP14WoodenPlanks
count: 30
- type: storePositionSell
id: Glass
price: 100
factions:
- SpiceStream
service: !type:CP14SellStackService
stackId: CP14GlassSheet
count: 10

View File

@@ -0,0 +1,29 @@
- type: storePositionSell
id: CP14DyeRed
special: true
price: 75
factions:
- SpiceStream
service: !type:CP14SellPrototypeService
proto: CP14DyeRed
count: 5
- type: storePositionSell
id: CP14DyeYellow
special: true
price: 75
factions:
- SpiceStream
service: !type:CP14SellPrototypeService
proto: CP14DyeYellow
count: 5
- type: storePositionSell
id: CP14DyeBlue
special: true
price: 75
factions:
- SpiceStream
service: !type:CP14SellPrototypeService
proto: CP14DyeBlue
count: 5

View File

@@ -0,0 +1,19 @@
- type: storePositionSell
id: BountyTorch
special: true
price: 200
factions:
- Sylphoria
service: !type:CP14SellPrototypeService
proto: CP14Torch
count: 20
- type: storePositionSell
id: BountyLucenPlanks
special: true
price: 300
factions:
- Sylphoria
service: !type:CP14SellStackService
stackId: CP14LucensWoodenPlanks
count: 10

View File

@@ -1,184 +0,0 @@
- type: storePositionBuy
id: AlchemyUnlockT1
name: cp14-store-buy-alchemy-unlock-t1-name
desc: cp14-store-buy-alchemy-unlock-t1-desc
code: ALCHEMY
icon:
sprite: _CP14/Objects/Specific/Alchemy/mortar_pestle.rsi
state: full
price: 150
services:
- !type:CP14UnlockPositionsService
addBuyPositions:
- AlchemyVials
removeBuyPositions:
- AlchemyUnlockT1
- type: storePositionBuy
id: AlchemyVials
roundstartAvailable: false
name: cp14-store-buy-alchemy-vials-name
desc: cp14-store-buy-alchemy-vials-desc
code: VIALS
icon:
sprite: _CP14/Objects/Specific/Alchemy/vial_small.rsi
state: vial
price: 100
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledAlchemy: 1
- type: storePositionBuy
id: Bureaucracy
name: cp14-store-buy-alchemy-bureaucracy-name
desc: cp14-store-buy-alchemy-bureaucracy-desc
code: PAPER
icon:
sprite: _CP14/Objects/Bureaucracy/paper.rsi
state: folder_red
price: 100
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledBureaucracy: 1
- type: storePositionBuy
id: FarmSeeds
name: cp14-store-buy-alchemy-farm-seeds-name
desc: cp14-store-buy-alchemy-farm-seeds-desc
code: SEEDS
icon:
sprite: _CP14/Objects/Specific/Farming/seeds.rsi
state: seeds
price: 70
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledFarmSeeds: 1
- type: storePositionBuy
id: Demiplane
name: cp14-store-buy-alchemy-demiplan-name
desc: cp14-store-buy-alchemy-demiplan-desc
code: DEMIPLANE
icon:
sprite: /Textures/_CP14/Structures/Dungeon/demiplan_rift.rsi
state: pulse
price: 150
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledDemiplanes: 1
- type: storePositionBuy
id: Wood
name: cp14-store-buy-wood-name
desc: cp14-store-buy-wood-desc
code: WOOD
icon:
sprite: _CP14/Objects/Materials/wood.rsi
state: planks_3
price: 50
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledWood: 1
- type: storePositionBuy
id: Fabric
name: cp14-store-buy-fabric-name
desc: cp14-store-buy-fabric-desc
code: FABRIC
icon:
sprite: _CP14/Objects/Materials/cloth.rsi
state: cloth_3
price: 50
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledFabric: 1
- type: storePositionBuy
id: CopperBar
name: cp14-store-buy-copper-name
desc: cp14-store-buy-copper-desc
code: COPPER
icon:
sprite: _CP14/Objects/Materials/copper_bar.rsi
state: bar_3
price: 250
services:
- !type:CP14BuyItemsService
product:
CP14CopperBar10: 1
- type: storePositionBuy
id: IronBar
name: cp14-store-buy-iron-name
desc: cp14-store-buy-iron-desc
code: IRON
icon:
sprite: _CP14/Objects/Materials/iron_bar.rsi
state: bar_3
price: 500
services:
- !type:CP14BuyItemsService
product:
CP14IronBar10: 1
- type: storePositionBuy
id: GoldBar
name: cp14-store-buy-gold-name
desc: cp14-store-buy-gold-desc
code: GOLD
icon:
sprite: _CP14/Objects/Materials/gold_bar.rsi
state: bar_3
price: 2000
services:
- !type:CP14BuyItemsService
product:
CP14GoldBar10: 1
- type: storePositionBuy
id: EnergyCrystals
name: cp14-store-buy-energy-name
desc: cp14-store-buy-energy-desc
code: ENERGY
icon:
sprite: _CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi
state: icon
price: 50
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledEnergyCrystals: 1
- type: storePositionBuy
id: Cheese
name: cp14-store-buy-cheese-name
desc: cp14-store-buy-cheese-desc
code: CHEESE
icon:
sprite: _CP14/Objects/Consumable/Food/cheese.rsi
state: cheese_wheel
price: 100
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledCheese: 1
- type: storePositionBuy
id: Guidebook
name: cp14-store-buy-guidebook-name
desc: cp14-store-buy-guidebook-desc
code: KNOWLEDGE
icon:
sprite: Objects/Misc/books.rsi
state: book_icon
price: 300
services:
- !type:CP14BuyItemsService
product:
CP14BrassChestFilledGuidebook: 1

View File

@@ -0,0 +1,19 @@
- type: storeFaction
id: HelmirWeapon
name: cp14-faction-name-helmir
desc: cp14-faction-desc-helmir
- type: storeFaction
id: Sylphoria
name: cp14-faction-name-sylphoria
desc: cp14-faction-desc-sylphoria
- type: storeFaction
id: SpiceStream
name: cp14-faction-name-spice-stream
desc: cp14-faction-desc-spice-stream
- type: storeFaction
id: BradFamily
name: cp14-faction-name-brad-family
desc: cp14-faction-desc-brad-family

View File

@@ -1,100 +0,0 @@
- type: storePositionSell
id: BountyWheat
special: true
name: cp14-store-sell-special-wheat-name
desc: cp14-store-sell-special-wheat-desc
icon:
sprite: _CP14/Objects/Flora/Farm/wheat.rsi
state: base1
price: 150
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14Wheat
count: 10
- type: storePositionSell
id: BountyDye
special: true
name: cp14-store-sell-special-dye-name
desc: cp14-store-sell-special-dye-desc
icon:
sprite: _CP14/Objects/Materials/dye.rsi
state: preview
price: 200
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14Dye
count: 10
- type: storePositionSell
id: BountyMeat
special: true
name: cp14-store-sell-special-meat-name
desc: cp14-store-sell-special-meat-desc
icon:
sprite: _CP14/Objects/Consumable/Food/meat.rsi
state: sheepmeat
price: 200
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14Meat
count: 10
- type: storePositionSell
id: BountyTorch
special: true
name: cp14-store-sell-special-torch-name
desc: cp14-store-sell-special-torch-desc
icon:
sprite: _CP14/Objects/Tools/torch.rsi
state: torch-unlit
price: 200
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14Torch
count: 20
- type: storePositionSell
id: BountySpellScroll
special: true
name: cp14-store-sell-special-spell-scroll-name
desc: cp14-store-sell-special-spell-scroll-desc
icon:
sprite: _CP14/Objects/Bureaucracy/paper.rsi
state: magic
price: 200
service: !type:CP14SellWhitelistService
whitelist:
tags:
- CP14SpellScroll
count: 5
- type: storePositionSell
id: BountyAsh
special: true
name: cp14-store-sell-special-ash-name
desc: cp14-store-sell-special-ash-desc
icon:
sprite: _CP14/Objects/Materials/ash.rsi
state: ash_1
price: 100
service: !type:CP14SellStackService
stackId: CP14Ash
count: 10
- type: storePositionSell
id: BountyLucenPlanks
special: true
name: cp14-store-sell-special-lucen-name
desc: cp14-store-sell-special-lucen-desc
icon:
sprite: _CP14/Objects/Materials/lucens_wood.rsi
state: planks_2
price: 300
service: !type:CP14SellStackService
stackId: CP14LucensWoodenPlanks
count: 10

View File

@@ -1,157 +0,0 @@
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledAlchemy
suffix: Alchemical vials
components:
- type: StorageFill
contents:
- id: CP14VialTiny
amount: 5
- id: CP14VialSmall
amount: 5
- id: CP14VialMedium
amount: 5
- id: CP14GlassShard #Lol. Something broken
prob: 0.2
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledBureaucracy
suffix: Bureaucracy
components:
- type: StorageFill
contents:
- id: CP14PaperFolderBlue
amount: 5
- id: CP14PaperFolderRed
amount: 5
- id: CP14Paper
amount: 5
- id: CP14PenFeather
amount: 3
#Gift
- id: CP14Inkwell
amount: 1
prob: 0.2
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledFarmSeeds
suffix: Farm Seeds
components:
- type: StorageFill
contents:
- id: CP14SeedWheat
amount: 3
- id: CP14SeedPumpkin
amount: 3
- id: CP14SeedCabbage
amount: 3
- id: CP14SeedCucumber
amount: 3
- id: CP14SeedTomato
amount: 3
- id: CP14SeedOnion
amount: 3
- id: CP14SeedPepper
amount: 3
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledDemiplanes
suffix: Demiplanes
components:
- type: StorageFill
contents:
- id: CP14DemiplaneKeyT1
amount: 4
- id: CP14DemiplaneKeyT2
amount: 1
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledWood
suffix: Wood
components:
- type: StorageFill
contents:
- id: CP14WoodenPlanks10
amount: 5
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledFabric
suffix: Fabric
components:
- type: StorageFill
contents:
- id: CP14String
amount: 10
- id: CP14Cloth10
amount: 3
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledCopperBar
suffix: 30 Copper bars
components:
- type: StorageFill
contents:
- id: CP14CopperBar10
amount: 3
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledIronBar
suffix: 30 Iron bars
components:
- type: StorageFill
contents:
- id: CP14IronBar10
amount: 3
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledGoldBar
suffix: 30 Gold bars
components:
- type: StorageFill
contents:
- id: CP14GoldBar10
amount: 3
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledEnergyCrystals
suffix: EnergyCrystals
components:
- type: StorageFill
contents:
- id: CP14EnergyCrystalSmallEmpty
amount: 5
- id: CP14EnergyCrystalMediumEmpty
amount: 3
- id: CP14ManaOperationGlove
amount: 2
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledCheese
suffix: Cheese
components:
- type: StorageFill
contents:
- id: CP14FoodCheeseWheel
amount: 5
- type: entity
parent: CP14BrassChest
id: CP14BrassChestFilledGuidebook
suffix: Guidebook
components:
- type: StorageFill
contents:
- id: CP14BookKnowledgeWoodWork
- id: CP14BookKnowledgeMetallMelting
- id: CP14BookKnowledgeMetallForging
- id: CP14BookKnowledgeGlasswork

View File

@@ -64,45 +64,6 @@
- id: CP14SilverCoin1
prob: 0.2
- type: entity
parent: CP14WoodenCloset
id: CP14WoodenClosetCommandantFilled
suffix: Commandant, Filled
components:
- type: StorageFill
contents:
- id: HandLabeler #TODO custom cp14 labeler
- id: CP14StampDenied
- id: CP14StampApproved
- id: CP14StampCommandant
- id: CP14PaperFolderBlue
- type: entity
parent: CP14SafeVault
id: CP14SafeVaultFilled25
suffix: Vault, Filled 25gp
components:
- type: EntityTableContainerFill
containers:
entity_storage: !type:GroupSelector
children:
- id: CP14JewelryRuby
weight: 0.1
- !type:GroupSelector
children:
# or 5gp
- id: CP14GoldCoin5
# or 50sp
- !type:AllSelector
children:
- id: CP14SilverCoin
- id: CP14SilverCoin
- id: CP14SilverCoin
- id: CP14SilverCoin
- id: CP14SilverCoin
rolls: !type:ConstantNumberSelector
value: 5
- type: entity
parent: CP14WoodenCloset
id: CP14WoodenClosetBlacksmithFilled

View File

@@ -38,36 +38,6 @@
- state: green
- state: guard
# Traders
- type: entity
id: CP14SpawnPointCommandant
parent: CP14SpawnPointJobBase
name: commandant
categories:
- Spawner
components:
- type: SpawnPoint
job_id: CP14Commandant
- type: Sprite
layers:
- state: green
- state: commandant
- type: entity
id: CP14SpawnPointMerchant
parent: CP14SpawnPointJobBase
name: merchant
categories:
- Spawner
components:
- type: SpawnPoint
job_id: CP14Merchant
- type: Sprite
layers:
- state: green
- state: merchant
# Mercenary
- type: entity
@@ -114,6 +84,20 @@
- state: green
- state: workman #TODO Replace
- type: entity
id: CP14SpawnPointMerchant
parent: CP14SpawnPointJobBase
name: merchant
categories:
- Spawner
components:
- type: SpawnPoint
job_id: CP14Merchant
- type: Sprite
layers:
- state: green
- state: merchant
- type: entity
id: CP14SpawnPointAlchemist
parent: CP14SpawnPointJobBase

View File

@@ -1,41 +1,3 @@
- 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
- type: entity
id: CP14TravelingStoreshipAnchor
parent: MarkerBase
categories: [ ForkFiltered ]
name: traveling storeship anchor
description: the point of adhesion of a traveling storeship to the surface. Keep your eyes to the sky so you don't get crushed!
placement:
mode: SnapgridCenter
components:
- type: Sprite
layers:
- state: pink
- sprite: _CP14/Structures/Shuttle/traveling_storeship_anchor.rsi
state: base
- type: Transform
anchored: true
- type: CP14TravelingStoreShipFTLTarget
- type: FTLSmashImmune
- type: entity
parent: MarkerBase
id: CP14DemiplaneEntryPointMarker

View File

@@ -1,48 +0,0 @@
- type: entity
parent: CP14BaseKey
id: CP14KeyBankEntrance
suffix: Bank Entrance
components:
- type: CP14Key
autoGenerateShape: BankEntrance
- type: entity
parent: CP14BaseKey
id: CP14KeyBankStaff
suffix: Bank Staff
components:
- type: CP14Key
autoGenerateShape: BankStaff
- type: entity
parent: CP14BaseKey
id: CP14KeyBankVault
name: golden key
suffix: Bank Vault
components:
- type: Sprite
layers:
- state: vault_key
map: [ "random" ]
- type: RandomSprite
available:
- random:
vault_key: ""
- type: CP14Key
autoGenerateShape: BankVault
- type: entity
parent: CP14BaseKey
id: CP14KeyBankCommandantRoom
suffix: Commandant
components:
- type: CP14Key
autoGenerateShape: BankCommandantRoom
- type: entity
parent: CP14BaseKey
id: CP14KeyBankSafe
suffix: Bank Safes
components:
- type: CP14Key
autoGenerateShape: BankSafe

View File

@@ -82,26 +82,11 @@
- type: entity
parent: CP14BaseKeyRing
id: CP14KeyRingMerchant
suffix: Banker
suffix: Merchant
components:
- type: StorageFill
contents:
- id: CP14KeyBankEntrance
- id: CP14KeyBankStaff
- id: CP14KeyBankSafe
- type: entity
parent: CP14BaseKeyRing
id: CP14KeyRingCommandant
suffix: Commandant
components:
- type: StorageFill
contents:
- id: CP14KeyBankCommandantRoom
- id: CP14KeyBankVault
- id: CP14KeyBankEntrance
- id: CP14KeyBankStaff
- id: CP14KeyBankSafe
- id: CP14KeyTavernMerchantShopAbstract
- type: entity
parent: CP14BaseKeyRing

View File

@@ -0,0 +1,31 @@
- type: entity
parent: CP14BaseKey
id: CP14KeyTavernMerchantShopAbstract
suffix: Abstract Merchant shop
components:
- type: CP14AbstractKey
group: Merchant
- type: entity
parent: CP14BaseKey
id: CP14KeyMercantShop1
suffix: Merchant shop 1
components:
- type: CP14Key
autoGenerateShape: Shop1
- type: entity
parent: CP14BaseKey
id: CP14KeyMercantShop2
suffix: Merchant shop 2
components:
- type: CP14Key
autoGenerateShape: Shop2
- type: entity
parent: CP14BaseKey
id: CP14KeyMercantShop3
suffix: Merchant shop 3
components:
- type: CP14Key
autoGenerateShape: Shop3

View File

@@ -26,6 +26,7 @@
color: "#bd2b26"
- type: Tag
tags:
- CP14Dye
- CP14DyeRed
- type: entity
@@ -40,6 +41,7 @@
color: "#ffe269"
- type: Tag
tags:
- CP14Dye
- CP14DyeYellow
- type: entity
@@ -54,6 +56,7 @@
color: "#5eabeb"
- type: Tag
tags:
- CP14Dye
- CP14DyeBlue
- type: entity
@@ -68,6 +71,7 @@
color: "#85903e"
- type: Tag
tags:
- CP14Dye
- CP14DyeGreen
- type: entity
@@ -82,6 +86,7 @@
color: "#8241cc"
- type: Tag
tags:
- CP14Dye
- CP14DyePurple
- type: entity
@@ -96,4 +101,5 @@
color: "#242329"
- type: Tag
tags:
- CP14Dye
- CP14DyeBlack

View File

@@ -0,0 +1,107 @@
- type: entity
id: CP14VialSmallHealingBrute
parent: CP14VialSmall
name: "brad's healing potion"
suffix: Healing brute 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectHealBrute
Quantity: 1
- type: entity
id: CP14VialSmallHealingPoison
parent: CP14VialSmall
name: "brad's antidote potion"
suffix: Healing poison 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectHealPoison
Quantity: 1
- type: entity
id: CP14VialSmallHealingAirloss
parent: CP14VialSmall
name: "brad's airloss healing potion"
suffix: Healing airloss 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectHealAirloss
Quantity: 1
- type: entity
id: CP14VialSmallHealingBlood
parent: CP14VialSmall
name: "brad's blood restoration potion"
suffix: Blood restore 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectBloodRestore
Quantity: 1
- type: entity
id: CP14VialSmallHealingMana
parent: CP14VialSmall
name: "brad's mana potion"
suffix: Mana restore 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectHealMana
Quantity: 1
- type: entity
id: CP14VialSmallSpeedUp
parent: CP14VialSmall
name: "brad's accseleration potion"
suffix: Speed up 10%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 9
- ReagentId: CP14BasicEffectSpeedUp
Quantity: 1
- type: entity
id: CP14VialSmallRainbow
parent: CP14VialSmall
name: "brad's funny potion"
suffix: Rainbow and Drunk 20%
components:
- type: SolutionContainerManager
solutions:
vial:
reagents:
- ReagentId: CP14BasicEffectEmpty
Quantity: 6
- ReagentId: CP14BasicEffectRainbow
Quantity: 2
- ReagentId: CP14BasicEffectDrunk
Quantity: 2

View File

@@ -7,16 +7,9 @@
- BaseStationJobsSpawning
- BaseStationAlertLevels #Checks fail without it
- BaseStationRecords # Required for lobby manifest + cryo leave
- CP14BaseStationTrading
- CP14BaseStationCommonObjectives
- CP14BaseStationSalary
- type: entity
id: CP14BaseStationTrading
abstract: true
components:
- type: CP14StationTravelingStoreShipTarget
- type: entity
id: CP14BaseStationCommonObjectives
abstract: true

View File

@@ -2,7 +2,7 @@
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorTavernAlchemy1
id: CP14WoodenDoorAlchemy1
suffix: Alchemy 1
components:
- type: CP14Lock
@@ -12,14 +12,14 @@
- type: entity
parent:
- CP14WoodenDoorTavernAlchemy1
- CP14WoodenDoorAlchemy1
- CP14WoodenDoorMirrored
id: CP14WoodenDoorTavernAlchemyMirrored1
id: CP14WoodenDoorAlchemyMirrored1
suffix: Alchemy 1, Mirrored
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorTavernAlchemy2
id: CP14WoodenDoorAlchemy2
suffix: Alchemy 2
components:
- type: CP14Lock
@@ -29,14 +29,14 @@
- type: entity
parent:
- CP14WoodenDoorTavernAlchemy2
- CP14WoodenDoorAlchemy2
- CP14WoodenDoorMirrored
id: CP14WoodenDoorTavernAlchemyMirrored2
id: CP14WoodenDoorAlchemyMirrored2
suffix: Alchemy 2, Mirrored
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorTavernAlchemy3
id: CP14WoodenDoorAlchemy3
suffix: Alchemy 3
components:
- type: CP14Lock
@@ -46,7 +46,7 @@
- type: entity
parent:
- CP14WoodenDoorTavernAlchemy3
- CP14WoodenDoorAlchemy3
- CP14WoodenDoorMirrored
id: CP14WoodenDoorTavernAlchemyMirrored3
id: CP14WoodenDoorAlchemyMirrored3
suffix: Alchemy 3, Mirrored

View File

@@ -1,75 +0,0 @@
# Iron
- 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: CP14IronDoorBankSafe
suffix: Bank Safe
components:
- type: CP14Lock
autoGenerateShape: BankSafe
- type: Lock
locked: true
- type: entity
parent: CP14IronDoor
id: CP14IronDoorBankCommandantRoom
suffix: Bank Commandant room
components:
- type: CP14Lock
autoGenerateShape: BankCommandantRoom
- type: Lock
locked: true
# Iron Windowed
- 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

View File

@@ -0,0 +1,52 @@
# Wooden
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorMerchantShop1
suffix: Merchant shop 1
components:
- type: CP14Lock
autoGenerateShape: Shop1
- type: Lock
locked: true
- type: entity
parent:
- CP14WoodenDoorMerchantShop1
- CP14WoodenDoorMirrored
id: CP14WoodenDoorMerchantShopMirrored1
suffix: Merchant shop 1, Mirrored
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorMerchantShop2
suffix: Merchant shop 2
components:
- type: CP14Lock
autoGenerateShape: Shop2
- type: Lock
locked: true
- type: entity
parent:
- CP14WoodenDoorMerchantShop2
- CP14WoodenDoorMirrored
id: CP14WoodenDoorMerchantShopMirrored2
suffix: Merchant shop 2, Mirrored
- type: entity
parent: CP14WoodenDoor
id: CP14WoodenDoorMerchantShop3
suffix: Merchant shop 3
components:
- type: CP14Lock
autoGenerateShape: Shop3
- type: Lock
locked: true
- type: entity
parent:
- CP14WoodenDoorMerchantShop3
- CP14WoodenDoorMirrored
id: CP14WoodenDoorMerchantShopMirrored3
suffix: Merchant shop 3, Mirrored

View File

@@ -31,7 +31,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardEarth
suffix: Terra
name: terra quartz shard
components:
- type: Sprite
color: "#70533f"
@@ -43,7 +43,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardFire
suffix: Ignis
name: ignis quartz shard
components:
- type: Sprite
color: "#d9741c"
@@ -55,7 +55,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardWater
suffix: Ignis
name: aqua quartz shard
components:
- type: Sprite
color: "#1c94d9"
@@ -67,7 +67,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardAir
suffix: Aer
name: aer quartz shard
components:
- type: Sprite
color: "#def9ff"
@@ -79,7 +79,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardOrder
suffix: Ordo
name: ordo quartz shard
components:
- type: Sprite
color: "#d9d9d9"
@@ -91,7 +91,7 @@
- type: entity
parent: CP14CrystalShardBase
id: CP14CrystalShardChaos
suffix: Perditio
name: perditio quartz shard
components:
- type: Sprite
color: "#5c5c5c"

View File

@@ -212,7 +212,6 @@
- state: barrel
- type: Transform
anchored: true
noRot: true
- type: Pullable
- type: Physics
bodyType: Static

View File

@@ -108,12 +108,4 @@
acts: [ "Destruction" ]
- type: Construction
graph: CP14WoodenCabinet
node: CP14WoodenCabinet
- type: entity
parent: CP14IronCabinet
id: CP14IronCabinetCargo
name: trade box
description: An armored vault for storing money for trade with the city. City workers will unload their earnings here, or take them from here when you want to buy something.
components:
- type: CP14CargoMoneyBox
node: CP14WoodenCabinet

View File

@@ -95,129 +95,4 @@
graph: CP14WoodenCloset
node: CP14WoodenCloset
containers:
- entity_storage
- type: entity
name: safe
parent:
- CP14ClosetBase
id: CP14Safe
description: A giant iron box for storing your most precious possessions. Extremely heavy and extremely strong.
components:
- type: Sprite
sprite: _CP14/Structures/Storage/Dressers/vault.rsi
state: base
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.05,0.45,0.45"
density: 2000
mask:
- MachineMask
layer:
- MachineLayer
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 500
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 350
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
params:
volume: -6
- type: Lock
locked: true
- type: CP14Lock
autoGenerateShape: BankSafe
- type: entity
parent: CP14Safe
id: CP14SafeVault
name: vault safe
components:
- type: CP14Lock
autoGenerateShape: BankVault
- type: entity
id: CP14ClosetGlassShowcase
parent: CP14ClosetBase
name: glass showcase
description: Something of value can be placed here without fear of it being discreetly stolen!
components:
- type: Sprite
drawdepth: Mobs
snapCardinals: true
sprite: _CP14/Structures/Storage/glass_showcase.rsi
state: base
- type: EntityStorage
isCollidableWhenOpen: true
enteringOffset: 0, 0
capacity: 5
showContents: true
occludesLight: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.40,-0.40,0.40,0.40"
density: 75
mask:
- MachineMask
layer:
- MachineLayer
- type: MeleeSound
soundGroups:
Brute:
collection: GlassSmack
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 150 #excess damage (nuke?). avoid computational cost of spawning entities.
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: WindowShatter
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WindowShatter
- !type:SpawnEntitiesBehavior
spawn:
CP14GlassShard:
min: 1
max: 2
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: ContainerContainer
containers:
entity_storage: !type:Container
showEnts: True
occludes: False
paper_label: !type:ContainerSlot
showEnts: False
occludes: True
- entity_storage

View File

@@ -0,0 +1,103 @@
- type: entity
id: CP14ClosetGlassShowcase
parent: CP14ClosetBase
name: glass showcase
description: Something of value can be placed here without fear of it being discreetly stolen!
abstract: true
components:
- type: Sprite
drawdepth: Mobs
snapCardinals: true
sprite: _CP14/Structures/Storage/glass_showcase.rsi
state: base
- type: EntityStorage
isCollidableWhenOpen: true
enteringOffset: 0, 0
capacity: 5
showContents: true
occludesLight: false
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.40,-0.40,0.40,0.40"
density: 75
mask:
- MachineMask
layer:
- MachineLayer
- type: MeleeSound
soundGroups:
Brute:
collection: GlassSmack
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Glass
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 150 #excess damage (nuke?). avoid computational cost of spawning entities.
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: WindowShatter
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WindowShatter
- !type:SpawnEntitiesBehavior
spawn:
CP14GlassShard:
min: 1
max: 2
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: ContainerContainer
containers:
entity_storage: !type:Container
showEnts: True
occludes: False
paper_label: !type:ContainerSlot
showEnts: False
occludes: True
- type: Lock
locked: true
- type: entity
parent: CP14ClosetGlassShowcase
id: CP14ClosetGlassShowcaseGuildmaster
name: guildmaster showcase
components:
- type: CP14Lock
autoGenerateShape: Guildmaster
- type: entity
parent: CP14ClosetGlassShowcase
id: CP14ClosetGlassShowcaseMerchant1
name: merchant shop 1 showcase
components:
- type: CP14Lock
autoGenerateShape: Shop1
- type: entity
parent: CP14ClosetGlassShowcase
id: CP14ClosetGlassShowcaseMerchant2
name: merchant shop 2 showcase
components:
- type: CP14Lock
autoGenerateShape: Shop2
- type: entity
parent: CP14ClosetGlassShowcase
id: CP14ClosetGlassShowcaseMerchant3
name: merchant shop 3 showcase
components:
- type: CP14Lock
autoGenerateShape: Shop3

View File

@@ -60,7 +60,6 @@
parent: CP14WoodenPallet
name: selling wooden pallet
components:
- type: CP14SellingPalett
- type: Sprite
layers:
- state: wooden
@@ -71,7 +70,6 @@
parent: CP14WoodenPallet
name: buying wooden pallet
components:
- type: CP14BuyingPalett
- type: Sprite
layers:
- state: wooden

View File

@@ -0,0 +1,70 @@
- type: entity
name: safe
parent:
- CP14ClosetBase
id: CP14Safe
abstract: true
description: A giant iron box for storing your most precious possessions. Extremely heavy and extremely strong.
components:
- type: Sprite
sprite: _CP14/Structures/Storage/Dressers/vault.rsi
state: base
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.05,0.45,0.45"
density: 2000
mask:
- MachineMask
layer:
- MachineLayer
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 500
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 350
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
params:
volume: -6
- type: Lock
locked: true
- type: entity
parent: CP14Safe
id: CP14SafeMerchant1
name: merchant shop 1 safe
components:
- type: CP14Lock
autoGenerateShape: Shop1
- type: entity
parent: CP14Safe
id: CP14SafeMerchant2
name: merchant shop 2 safe
components:
- type: CP14Lock
autoGenerateShape: Shop2
- type: entity
parent: CP14Safe
id: CP14SafeMerchant3
name: merchant shop 3 safe
components:
- type: CP14Lock
autoGenerateShape: Shop3

View File

@@ -0,0 +1,23 @@
- type: entity
parent: BaseStructure
id: CP14TradingBoardBase
name: trading information board
description: Allows you to track what is selling and buying right now.
categories: [ ForkFiltered ]
components:
- type: Sprite
snapCardinals: true
sprite: _CP14/Structures/Furniture/workbench.rsi
state: filler
- type: Icon
sprite: _CP14/Structures/Furniture/workbench.rsi
state: filler
- type: ActivatableUI
key: enum.CP14StoreUiKey.Key
- type: Clickable
- type: InteractionOutline
- type: CP14TradingInfoBoard
- type: UserInterface
interfaces:
enum.CP14StoreUiKey.Key:
type: CP14StoreBoundUserInterface

View File

@@ -0,0 +1,113 @@
- type: entity
parent: BaseStructure
id: CP14TradingPortalBase
abstract: true
name: trade cabinet
description: A dimensional closet connected to a similar closet elsewhere. Not capable of moving living creatures, but great for trading at a distance.
categories: [ ForkFiltered ]
components:
- type: Icon
sprite: _CP14/Structures/Specific/Economy/trade_portal.rsi
state: base
- type: Sprite
drawdepth: Mobs
sprite: _CP14/Structures/Specific/Economy/trade_portal.rsi
- type: Clickable
- type: InteractionOutline
- type: CP14TradingPortal
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.4,0.4,0.29"
density: 50
mask:
- SmallMobMask #this is so they can go under plastic flaps
layer:
- MachineLayer
- type: ResistLocker
- type: Appearance
- type: ContainerContainer
containers:
entity_storage: !type:Container
- type: EntityStorage
open: true
isCollidableWhenOpen: true
closeSound:
path: /Audio/Effects/woodenclosetclose.ogg
openSound:
path: /Audio/Effects/woodenclosetopen.ogg
enteringOffset: 0, -0.4
enteringRange: 0.20
- type: PlaceableSurface
isPlaceable: false # defaults to closed.
- type: EntityStorageVisuals
stateBaseClosed: base
stateDoorOpen: base_open
stateDoorClosed: base_door
- type: entity
parent: CP14TradingPortalBase
id: CP14TradingPortalSylphoria
suffix: Sylphoria
components:
- type: Sprite
layers:
- state: base
map: ["enum.StorageVisualLayers.Base"]
- state: base_door
map: ["enum.StorageVisualLayers.Door"]
shader: unshaded
- state: flag_sylphoria
- type: CP14TradingPortal
faction: Sylphoria
- type: entity
parent: CP14TradingPortalBase
id: CP14TradingPortalHelmirWeapon
suffix: HelmirWeapon
components:
- type: Sprite
layers:
- state: base
map: ["enum.StorageVisualLayers.Base"]
- state: base_door
map: ["enum.StorageVisualLayers.Door"]
shader: unshaded
- state: flag_helmir
- type: CP14TradingPortal
faction: HelmirWeapon
- type: entity
parent: CP14TradingPortalBase
id: CP14TradingPortalBradFamily
suffix: BradFamily
components:
- type: Sprite
layers:
- state: base
map: ["enum.StorageVisualLayers.Base"]
- state: base_door
map: ["enum.StorageVisualLayers.Door"]
shader: unshaded
- state: flag_bard
- type: CP14TradingPortal
faction: BradFamily
specialSellPositionCount: 3
- type: entity
parent: CP14TradingPortalBase
id: CP14TradingPortalSpiceStream
suffix: SpiceStream
components:
- type: Sprite
layers:
- state: base
map: ["enum.StorageVisualLayers.Base"]
- state: base_door
map: ["enum.StorageVisualLayers.Door"]
shader: unshaded
- state: flag_spice
- type: CP14TradingPortal
faction: SpiceStream

View File

@@ -1,27 +1,3 @@
- type: entity
parent: BaseStructure
id: CP14TravelingShop
name: city trading information board
description: Allows you to track what the city is selling and buying right now.
categories: [ ForkFiltered ]
components:
- type: Sprite
snapCardinals: true
sprite: _CP14/Structures/Furniture/workbench.rsi
state: filler
- type: Icon
sprite: _CP14/Structures/Furniture/workbench.rsi
state: filler
- type: ActivatableUI
key: enum.CP14StoreUiKey.Key
- type: Clickable
- type: InteractionOutline
- type: CP14CargoStore
- type: UserInterface
interfaces:
enum.CP14StoreUiKey.Key:
type: CP14StoreBoundUserInterface
- type: entity
id: CP14DPSMeter
parent: BaseStructureDynamic

View File

@@ -14,8 +14,6 @@
departmentObjectives:
CP14Command:
- CP14TownSendObjectiveGroup
CP14Bank:
- CP14BankEarningObjectiveGroup
- type: CP14PersonalObjectivesRule
roleObjectives:
CP14Guildmaster:
@@ -30,6 +28,8 @@
- CP14PersonalCurrencyCollectObjectiveGroup
CP14Innkeeper:
- CP14PersonalCurrencyCollectObjectiveGroup
CP14Merchant:
- CP14PersonalObjectiveRichestMerchantGroup
# event schedulers

View File

@@ -8,4 +8,7 @@
id: Alchemist
- type: CP14LockGroup
id: PersonalHouse
id: PersonalHouse
- type: CP14LockGroup
id: Merchant

View File

@@ -1,30 +1,3 @@
# Bank
- type: CP14LockType
id: BankEntrance
complexity: 3
name: cp14-lock-shape-bank-entrance
- type: CP14LockType
id: BankStaff
complexity: 3
name: cp14-lock-shape-bank-staff
- type: CP14LockType
id: BankCommandantRoom
complexity: 4
name: cp14-lock-shape-bank-commandant
- type: CP14LockType
id: BankSafe
complexity: 5
name: cp14-lock-shape-bank-safe
- type: CP14LockType
id: BankVault
complexity: 6
name: cp14-lock-shape-bank-vault
# Tavern
- type: CP14LockType
@@ -105,6 +78,24 @@
complexity: 4
name: cp14-lock-shape-blacksmith3
- type: CP14LockType
id: Shop1
group: Merchant
complexity: 6
name: cp14-lock-shape-merchant1
- type: CP14LockType
id: Shop2
group: Merchant
complexity: 6
name: cp14-lock-shape-merchant2
- type: CP14LockType
id: Shop3
group: Merchant
complexity: 6
name: cp14-lock-shape-merchant3
# Mercenary
- type: CP14LockType

View File

@@ -21,9 +21,7 @@
CP14Alchemist: [ 2, 2 ]
CP14Blacksmith: [ 2, 2 ]
CP14Innkeeper: [ 3, 4 ]
#Traders
CP14Commandant: [1, 1]
CP14Merchant: [3, 4]
CP14Merchant: [2, 2]
#Guard
CP14Guard: [8, 8]
CP14GuardCommander: [1, 1]

View File

@@ -21,9 +21,7 @@
CP14Alchemist: [ 2, 2 ]
CP14Blacksmith: [ 2, 2 ]
CP14Innkeeper: [ 3, 4 ]
#Traders
CP14Commandant: [1, 1]
CP14Merchant: [3, 4]
CP14Merchant: [2, 2]
#Guard
CP14Guard: [8, 8]
CP14GuardCommander: [1, 1]
@@ -38,6 +36,8 @@
- Alchemy2
- Blacksmith1
- Blacksmith2
- Shop1
- Shop2
- PersonalHouse1
- PersonalHouse2
#- PersonalHouse3 #TODO: return
@@ -46,7 +46,7 @@
- PersonalHouse6
- PersonalHouse7
- PersonalHouse8
- PersonalHouse9
#- PersonalHouse9 #TODO: return
- PersonalHouse10
- PersonalHouse11
- PersonalHouse12

View File

@@ -55,40 +55,6 @@
CP14TownSendMoleObjective: 1
CP14TownSendBoarObjective: 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: CP14TownBankEarningObjectiveMedium
components:
- type: CP14CurrencyStoredCondition
currency: 20000
- type: entity
parent: CP14BaseTownBankEarningObjective
id: CP14TownBankEarningObjectiveBig
components:
- type: CP14CurrencyStoredCondition
currency: 30000
- type: weightedRandom
id: CP14BankEarningObjectiveGroup
weights:
CP14TownBankEarningObjectiveMedium: 0.6
CP14TownBankEarningObjectiveBig: 0.3
# No Demiplane death objective
- type: entity
parent: CP14BaseTownObjective

View File

@@ -36,4 +36,22 @@
- type: weightedRandom
id: CP14PersonalCurrencyCollectObjectiveGroup
weights:
CP14PersonalCurrencyCollectObjective: 1
CP14PersonalCurrencyCollectObjective: 1
#Richest merchant objective
- type: entity
parent: CP14BasePersonalObjective
id: CP14PersonalObjectiveRichestMerchant
components:
- type: CP14RichestJobCondition
job: CP14Merchant
objectiveText: cp14-objective-personal-richest-merchant-title
objectiveDescription: cp14-objective-personal-richest-merchant-desc
objectiveSprite:
sprite: /Textures/_CP14/Objects/Economy/pp_coin.rsi
state: coin10
- type: weightedRandom
id: CP14PersonalObjectiveRichestMerchantGroup
weights:
CP14PersonalObjectiveRichestMerchant: 1

View File

@@ -1,26 +0,0 @@
- type: job
id: CP14Commandant
name: cp14-job-name-commandant
description: cp14-job-desc-commandant
playTimeTracker: CP14JobCommandant
startingGear: CP14CommandantGear
icon: "CP14JobIconCommandant"
requireAdminNotify: true
joinNotifyCrew: true
canBeAntag: false
supervisors: cp14-job-supervisors-command
weight: 2
requirements:
- !type:DepartmentTimeRequirement
department: CP14Bank
time: 7800 # 2 hours
special:
- !type:CP14AddKnowledgeSpecial
knowledge:
- WoodWork
- type: startingGear
id: CP14CommandantGear
equipment:
belt1: CP14WalletFilledTest
keys: CP14KeyRingCommandant

View File

@@ -6,7 +6,6 @@
weight: 10
color: "#3ec8fa"
roles:
- CP14Commandant
- CP14GuardCommander
- CP14Guildmaster
@@ -20,16 +19,6 @@
- CP14GuardCommander
- CP14Guard
- type: department
id: CP14Bank
name: department-CP14Bank
description: department-CP14Bank-desc
weight: 8
color: "#fadb3e"
roles:
- CP14Commandant
- CP14Merchant
- type: department
id: CP14Artisan
name: department-CP14Artisan
@@ -37,6 +26,7 @@
weight: 7
color: "#834833"
roles:
- CP14Merchant
- CP14Alchemist
- CP14Blacksmith
- CP14Apprentice

View File

@@ -53,14 +53,6 @@
state: Guard
jobName: cp14-job-name-guard
- type: jobIcon
parent: CP14JobIcon
id: CP14JobIconCommandant
icon:
sprite: /Textures/_CP14/Interface/Misc/job_icons.rsi
state: Commandant
jobName: cp14-job-name-commandant
- type: jobIcon
parent: CP14JobIcon
id: CP14JobIconMerchant

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Some files were not shown because too many files have changed in this diff Show More