From 85793e181ecb2f9c3fd152b416310d7e61b15ec2 Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Sun, 19 Jan 2025 00:09:30 +0300 Subject: [PATCH 1/3] Bank Special sell positions (bounty system?) (#782) * fix round end * remove closet skeleton event * special positions --- .../CP14StoreProductControl.xaml | 19 +-- .../CP14StoreProductControl.xaml.cs | 17 +-- .../_CP14/Cargo/CP14CargoSystem.UI.cs | 44 ++++-- Content.Server/_CP14/Cargo/CP14CargoSystem.cs | 37 ++++- .../_CP14/RoundEnd/CP14RoundEndSystem.cs | 21 ++- .../_CP14/CCvar/CCvars.CP14Demiplanes.cs | 9 ++ ...tationTravelingStoreShipTargetComponent.cs | 6 + Content.Shared/_CP14/Cargo/CP14StoreUI.cs | 4 +- .../BuyServices/CP14BuyItemsService.cs | 5 - .../BuyServices/CP14UnlockPositionsService.cs | 24 ---- .../CP14StoreBuyPositionPrototype.cs | 14 +- .../CP14StoreSellPositionPrototype.cs | 16 +-- .../SellServices/CP14SellStackService.cs | 5 - .../SellServices/CP14SellWhitelistService.cs | 5 - .../travelingStoreship/positions_sell.ftl | 6 - .../positions_sell_special.ftl | 23 ++++ .../position_sell_special.ftl | 23 ++++ .../travelingStoreship/positions_sell.ftl | 6 - .../ru-RU/_CP14/travelingStoreship/ui.ftl | 2 +- .../_CP14/Catalog/Cargo/Store/sell.yml | 32 ----- .../Catalog/Cargo/Store/sell_special.yml | 129 ++++++++++++++++++ .../_CP14/Entities/Actions/Spells/scrolls.yml | 1 + .../Entities/Objects/Consumable/Food/meat.yml | 6 + .../_CP14/Entities/Objects/Tools/torch.yml | 3 + .../Prototypes/_CP14/GameRules/events.yml | 22 +-- .../Demiplane/Modifiers/Fun/lol.yml | 24 ++++ Resources/Prototypes/_CP14/tags.yml | 12 ++ 27 files changed, 358 insertions(+), 157 deletions(-) create mode 100644 Content.Shared/_CP14/CCvar/CCvars.CP14Demiplanes.cs create mode 100644 Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell_special.ftl create mode 100644 Resources/Locale/ru-RU/_CP14/travelingStoreship/position_sell_special.ftl create mode 100644 Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell_special.yml diff --git a/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml b/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml index 12c8ac7ceb..a599bca8f7 100644 --- a/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml +++ b/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml @@ -1,15 +1,16 @@ diff --git a/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml.cs b/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml.cs index 77e1f65f3b..b8d73542cb 100644 --- a/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml.cs +++ b/Content.Client/_CP14/TravelingStoreShip/CP14StoreProductControl.xaml.cs @@ -21,24 +21,15 @@ public sealed partial class CP14StoreProductControl : Control _sprite = _entity.System(); - UpdateName(entry.Name); - UpdateView(entry.Icon); - UpdatePrice(entry.Price); - } - - private void UpdatePrice(int price) - { PriceHolder.RemoveAllChildren(); - PriceHolder.AddChild(new CP14PriceControl(price)); - } + PriceHolder.AddChild(new CP14PriceControl(entry.Price)); + ProductName.Text = $"[bold]{entry.Name}[/bold]"; - private void UpdateName(string name) - { - ProductName.Text = $"[bold]{name}[/bold]"; + SpecialLabel.Visible = entry.Special; + View.Texture = _sprite.Frame0(entry.Icon); } private void UpdateView(SpriteSpecifier spriteSpecifier) { - View.Texture = _sprite.Frame0(spriteSpecifier); } } diff --git a/Content.Server/_CP14/Cargo/CP14CargoSystem.UI.cs b/Content.Server/_CP14/Cargo/CP14CargoSystem.UI.cs index 3afb297936..eb05710309 100644 --- a/Content.Server/_CP14/Cargo/CP14CargoSystem.UI.cs +++ b/Content.Server/_CP14/Cargo/CP14CargoSystem.UI.cs @@ -53,32 +53,50 @@ public sealed partial class CP14CargoSystem var prodBuy = new HashSet(); var prodSell = new HashSet(); - foreach (var proto in ent.Comp.Station.Value.Comp.CurrentBuyPositions) + //Add special buy positions + foreach (var (proto, price) in ent.Comp.Station.Value.Comp.CurrentSpecialBuyPositions) { - - var name = Loc.GetString(proto.Key.Name); + var name = Loc.GetString(proto.Name); var desc = new StringBuilder(); - desc.Append(Loc.GetString(proto.Key.Desc) + "\n"); - foreach (var service in proto.Key.Services) - { - desc.Append(service.GetDescription(_proto, EntityManager)); - } + 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("\n" + Loc.GetString("cp14-store-buy-hint", ("name", Loc.GetString(proto.Key.Name)), ("code", "[color=yellow][bold]#" + proto.Key.Code + "[/bold][/color]"))); - - prodBuy.Add(new CP14StoreUiProductEntry(proto.Key.ID, proto.Key.Icon, name, desc.ToString(), proto.Value)); + prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, true)); } + //Add static buy positions + foreach (var (proto, price) in ent.Comp.Station.Value.Comp.CurrentBuyPositions) + { + var name = Loc.GetString(proto.Name); + 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]"))); + + prodBuy.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, false)); + } + + //Add special sell positions + foreach (var (proto, price) in ent.Comp.Station.Value.Comp.CurrentSpecialSellPositions) + { + var name = Loc.GetString(proto.Name); + + 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)))); + + prodSell.Add(new CP14StoreUiProductEntry(proto.ID, proto.Icon, name, desc.ToString(), price, true)); + } + + //Add static sell positions foreach (var proto in ent.Comp.Station.Value.Comp.CurrentSellPositions) { var name = Loc.GetString(proto.Key.Name); var desc = new StringBuilder(); desc.Append(Loc.GetString(proto.Key.Desc) + "\n"); - desc.Append(proto.Key.Service.GetDescription(_proto, EntityManager) + "\n"); desc.Append("\n" + Loc.GetString("cp14-store-sell-hint", ("name", Loc.GetString(proto.Key.Name)))); - prodSell.Add(new CP14StoreUiProductEntry(proto.Key.ID, proto.Key.Icon, name, desc.ToString(), proto.Value)); + prodSell.Add(new CP14StoreUiProductEntry(proto.Key.ID, proto.Key.Icon, name, desc.ToString(), proto.Value, false)); } var stationComp = ent.Comp.Station.Value.Comp; diff --git a/Content.Server/_CP14/Cargo/CP14CargoSystem.cs b/Content.Server/_CP14/Cargo/CP14CargoSystem.cs index 0eb8f4b294..f312b4d794 100644 --- a/Content.Server/_CP14/Cargo/CP14CargoSystem.cs +++ b/Content.Server/_CP14/Cargo/CP14CargoSystem.cs @@ -137,14 +137,47 @@ public sealed partial class CP14CargoSystem : CP14SharedCargoSystem { station.Comp.CurrentBuyPositions.Clear(); station.Comp.CurrentSellPositions.Clear(); + station.Comp.CurrentSpecialBuyPositions.Clear(); + station.Comp.CurrentSpecialSellPositions.Clear(); + var availableSpecialSellPositions = new List(); + var availableSpecialBuyPositions = new List(); + + //Add static positions + cash special ones foreach (var buyPos in station.Comp.AvailableBuyPosition) { - station.Comp.CurrentBuyPositions.Add(buyPos, buyPos.Price.Next(_random)/10*10); + if (buyPos.Special) + availableSpecialBuyPositions.Add(buyPos); + else + station.Comp.CurrentBuyPositions.Add(buyPos, buyPos.Price.Next(_random)/10*10); } foreach (var sellPos in station.Comp.AvailableSellPosition) { - station.Comp.CurrentSellPositions.Add(sellPos, sellPos.Price.Next(_random)/10*10); + if (sellPos.Special) + availableSpecialSellPositions.Add(sellPos); + else + station.Comp.CurrentSellPositions.Add(sellPos, sellPos.Price.Next(_random)/10*10); + } + + //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); + + foreach (var buyPos in availableSpecialBuyPositions) + { + if (station.Comp.CurrentSpecialBuyPositions.Count >= currentSpecialBuyPositions) + break; + station.Comp.CurrentSpecialBuyPositions.Add(buyPos, buyPos.Price.Next(_random)/10*10); + } + + foreach (var sellPos in availableSpecialSellPositions) + { + if (station.Comp.CurrentSpecialSellPositions.Count >= currentSpecialSellPositions) + break; + station.Comp.CurrentSpecialSellPositions.Add(sellPos, sellPos.Price.Next(_random)/10*10); } } diff --git a/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.cs b/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.cs index 91da4b5a09..1dc3374f5a 100644 --- a/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.cs +++ b/Content.Server/_CP14/RoundEnd/CP14RoundEndSystem.cs @@ -1,7 +1,10 @@ using Content.Server._CP14.Demiplane; using Content.Server.Chat.Systems; using Content.Server.GameTicking; +using Content.Server.RoundEnd; using Content.Shared._CP14.MagicEnergy; +using Content.Shared.CCVar; +using Robust.Shared.Configuration; using Robust.Shared.Audio; using Robust.Shared.Timing; @@ -13,10 +16,12 @@ public sealed partial class CP14RoundEndSystem : EntitySystem [Dependency] private readonly ChatSystem _chatSystem = default!; [Dependency] private readonly GameTicker _gameTicker = default!; [Dependency] private readonly CP14DemiplaneSystem _demiplane = default!; + [Dependency] private readonly RoundEndSystem _roundEnd = default!; + [Dependency] private readonly IConfigurationManager _configManager = default!; - private readonly TimeSpan _roundEndDelay = TimeSpan.FromMinutes(1); private TimeSpan _roundEndMoment = TimeSpan.Zero; + //TODO: вообще нет поддержки нескольких кристаллов на карте. public override void Initialize() { base.Initialize(); @@ -60,18 +65,20 @@ public sealed partial class CP14RoundEndSystem : EntitySystem private void StartRoundEndTimer() { - _roundEndMoment = _timing.CurTime + _roundEndDelay; + var roundEndDelay = TimeSpan.FromMinutes(_configManager.GetCVar(CCVars.CP14RoundEndMinutes)); - var time = _roundEndDelay.Minutes; + _roundEndMoment = _timing.CurTime + roundEndDelay; + + var time = roundEndDelay.Minutes; string unitsLocString; - if (_roundEndDelay.TotalSeconds < 60) + if (roundEndDelay.TotalSeconds < 60) { - time = _roundEndDelay.Seconds; + time = roundEndDelay.Seconds; unitsLocString = "eta-units-seconds"; } else { - time = _roundEndDelay.Minutes; + time = roundEndDelay.Minutes; unitsLocString = "eta-units-minutes"; } @@ -99,7 +106,7 @@ public sealed partial class CP14RoundEndSystem : EntitySystem _chatSystem.DispatchGlobalAnnouncement(Loc.GetString("cp14-round-end"), announcementSound: new SoundPathSpecifier("/Audio/_CP14/Ambience/event_boom.ogg")); _roundEndMoment = TimeSpan.Zero; - _gameTicker.EndRound(); + _roundEnd.EndRound(); _demiplane.DeleteAllDemiplanes(safe: false); } } diff --git a/Content.Shared/_CP14/CCvar/CCvars.CP14Demiplanes.cs b/Content.Shared/_CP14/CCvar/CCvars.CP14Demiplanes.cs new file mode 100644 index 0000000000..3ed2e7d3a7 --- /dev/null +++ b/Content.Shared/_CP14/CCvar/CCvars.CP14Demiplanes.cs @@ -0,0 +1,9 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef CP14RoundEndMinutes = + CVarDef.Create("cp14_demiplane.round_end_minutes", 15, CVar.SERVERONLY); +} diff --git a/Content.Shared/_CP14/Cargo/CP14StationTravelingStoreShipTargetComponent.cs b/Content.Shared/_CP14/Cargo/CP14StationTravelingStoreShipTargetComponent.cs index d27b674ec4..699c5b8508 100644 --- a/Content.Shared/_CP14/Cargo/CP14StationTravelingStoreShipTargetComponent.cs +++ b/Content.Shared/_CP14/Cargo/CP14StationTravelingStoreShipTargetComponent.cs @@ -50,12 +50,18 @@ public sealed partial class CP14StationTravelingStoreShipTargetComponent : Compo [DataField] public Dictionary CurrentBuyPositions = new(); //Proto, price + [DataField] + public Dictionary CurrentSpecialBuyPositions = new(); //Proto, price + [DataField] public MinMax SpecialBuyPositionCount = new(1, 2); [DataField] public Dictionary CurrentSellPositions = new(); //Proto, price + [DataField] + public Dictionary CurrentSpecialSellPositions = new(); //Proto, price + [DataField] public MinMax SpecialSellPositionCount = new(1, 2); diff --git a/Content.Shared/_CP14/Cargo/CP14StoreUI.cs b/Content.Shared/_CP14/Cargo/CP14StoreUI.cs index cac6bf0cf5..4b845bee61 100644 --- a/Content.Shared/_CP14/Cargo/CP14StoreUI.cs +++ b/Content.Shared/_CP14/Cargo/CP14StoreUI.cs @@ -37,14 +37,16 @@ public readonly struct CP14StoreUiProductEntry : IEquatable 0) - sb.Append(Loc.GetString("cp14-store-service-unlock-buy") + "\n"); - foreach (var buy in AddBuyPositions) - { - if (!prototype.TryIndex(buy, out var indexedBuy)) - continue; - - sb.Append(Loc.GetString(indexedBuy.Name) + "\n"); - } - if (AddSellPositions.Count > 0) - sb.Append(Loc.GetString("cp14-store-service-unlock-sell") + "\n"); - foreach (var sell in AddSellPositions) - { - if (!prototype.TryIndex(sell, out var indexedSell)) - continue; - - sb.Append(Loc.GetString("cp14-store-service-unlock-sell") + " " + Loc.GetString(indexedSell.Name) + "\n"); - } - return sb.ToString(); - } } diff --git a/Content.Shared/_CP14/Cargo/Prototype/CP14StoreBuyPositionPrototype.cs b/Content.Shared/_CP14/Cargo/Prototype/CP14StoreBuyPositionPrototype.cs index 7d4626ebde..87967289a0 100644 --- a/Content.Shared/_CP14/Cargo/Prototype/CP14StoreBuyPositionPrototype.cs +++ b/Content.Shared/_CP14/Cargo/Prototype/CP14StoreBuyPositionPrototype.cs @@ -14,12 +14,6 @@ public sealed partial class CP14StoreBuyPositionPrototype : IPrototype [IdDataField, ViewVariables] public string ID { get; private set; } = default!; - /// - /// if true, this item becomes available for purchase only after unlocking by other purchases - /// - [DataField] - public bool Unlockable = false; - [DataField(required: true)] public MinMax Price = new(); @@ -43,6 +37,12 @@ public sealed partial class CP14StoreBuyPositionPrototype : IPrototype [DataField] public bool RoundstartAvailable = true; + + /// + /// If true, this item will randomly appear under the ‘Special Offer’ heading. With a chance to show up every time the ship arrives. + /// + [DataField] + public bool Special = false; } [ImplicitDataDefinitionForInheritors] @@ -50,6 +50,4 @@ public sealed partial class CP14StoreBuyPositionPrototype : IPrototype public abstract partial class CP14StoreBuyService { public abstract void Buy(EntityManager entManager, IPrototypeManager prototype, Entity station); - - public abstract string? GetDescription(IPrototypeManager prototype, IEntityManager entSys); } diff --git a/Content.Shared/_CP14/Cargo/Prototype/CP14StoreSellPositionPrototype.cs b/Content.Shared/_CP14/Cargo/Prototype/CP14StoreSellPositionPrototype.cs index 7167efd2ac..76fbf19ef4 100644 --- a/Content.Shared/_CP14/Cargo/Prototype/CP14StoreSellPositionPrototype.cs +++ b/Content.Shared/_CP14/Cargo/Prototype/CP14StoreSellPositionPrototype.cs @@ -3,7 +3,7 @@ using JetBrains.Annotations; using Robust.Shared.Prototypes; using Robust.Shared.Utility; -namespace Content.Shared._CP14.Cargo; +namespace Content.Shared._CP14.Cargo.Prototype; /// /// Stores the price and product/service pair that players can buy. @@ -14,12 +14,6 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype [IdDataField, ViewVariables] public string ID { get; private set; } = default!; - /// - /// if true, this item becomes available for purchase only after unlocking by other purchases - /// - [DataField] - public bool Unlockable = false; - [DataField(required: true)] public MinMax Price = new(); @@ -37,6 +31,12 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype [DataField] public bool RoundstartAvailable = true; + + /// + /// If true, this item will randomly appear under the ‘Special Offer’ heading. With a chance to show up every time the ship arrives. + /// + [DataField] + public bool Special = false; } [ImplicitDataDefinitionForInheritors] @@ -44,6 +44,4 @@ public sealed partial class CP14StoreSellPositionPrototype : IPrototype public abstract partial class CP14StoreSellService { public abstract bool TrySell(EntityManager entManager, HashSet entities); - - public abstract string? GetDescription(IPrototypeManager prototype, IEntityManager entSys); } diff --git a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellStackService.cs b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellStackService.cs index 79dc0dfed3..71148ab440 100644 --- a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellStackService.cs +++ b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellStackService.cs @@ -49,9 +49,4 @@ public sealed partial class CP14SellStackService : CP14StoreSellService return true; } - - public override string? GetDescription(IPrototypeManager prototype, IEntityManager entSys) - { - return null; - } } diff --git a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs index 0277f438a8..ad6afc1ac6 100644 --- a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs +++ b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs @@ -44,9 +44,4 @@ public sealed partial class CP14SellWhitelistService : CP14StoreSellService return true; } - - public override string? GetDescription(IPrototypeManager prototype, IEntityManager entSys) - { - return null; - } } diff --git a/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell.ftl b/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell.ftl index 2fbb6c087a..8b5c27927c 100644 --- a/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell.ftl +++ b/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell.ftl @@ -9,12 +9,6 @@ cp14-store-sell-ironbar-desc = Iron is an indispensable material in the manufact 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-wheat-name = 10 sheaves of wheat -cp14-store-sell-wheat-desc = If there's one thing that's permanent in this world, it's empire and wheat! Please don't use wheat as currency.... - -cp14-store-sell-dye-name = 10 dyes -cp14-store-sell-dye-desc = Textile workers will gladly buy dyes from you to satisfy the whims of the rich. And the sailors are tired of cleaning the ship of broken vials. - 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. diff --git a/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell_special.ftl b/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell_special.ftl new file mode 100644 index 0000000000..b6d885b5d8 --- /dev/null +++ b/Resources/Locale/en-US/_CP14/travelingStoreship/positions_sell_special.ftl @@ -0,0 +1,23 @@ +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-flora-name = 15 flora material +cp14-store-sell-special-flora-desc = Battle HQ 14 requesting support! Orders have been received to 'Green the area surrounding the HQ'. Unfortunately, the HQ is located in the desert. Requesting grass to spread all over the area. + +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. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/travelingStoreship/position_sell_special.ftl b/Resources/Locale/ru-RU/_CP14/travelingStoreship/position_sell_special.ftl new file mode 100644 index 0000000000..5e0cfa5d39 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/travelingStoreship/position_sell_special.ftl @@ -0,0 +1,23 @@ +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-flora-name = 15 растительного волокна +cp14-store-sell-special-flora-desc = Боевой штаб 14 запрашивает поддержку! Поступил приказ 'Озеленить прилегающую к штабу территорию'. К сожалению, штаб расположен в пустыне. Запрашиваем траву, чтобы раскидать ее по всей территории. + +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 = Нам на самом деле не важно какие именно заклинания находятся в свитках, они нам только для отчетности магического процветания поселения перед местным Комендантом. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/travelingStoreship/positions_sell.ftl b/Resources/Locale/ru-RU/_CP14/travelingStoreship/positions_sell.ftl index 4eccfe941d..3a1cd17d11 100644 --- a/Resources/Locale/ru-RU/_CP14/travelingStoreship/positions_sell.ftl +++ b/Resources/Locale/ru-RU/_CP14/travelingStoreship/positions_sell.ftl @@ -9,12 +9,6 @@ cp14-store-sell-ironbar-desc = Железо - незаменимый матер cp14-store-sell-copperbar-name = 10 медных слитков cp14-store-sell-copperbar-desc = Хоть медь и используется в основном как материал для монет но и в разных сплавах он часто нравится кузнецам. -cp14-store-sell-wheat-name = 10 снопов пшеницы -cp14-store-sell-wheat-desc = Если и есть что то постоянное в этом мире так это империя и пшеница! Пожалуйста не используйте пшеницу как валюту... - -cp14-store-sell-dye-name = 10 красителей -cp14-store-sell-dye-desc = Текстильщики с радостью купят у вас красители для ублажения прихотей богатеньких. А ещё моряки устали отмывать корабль от разбитых склянок. - cp14-store-sell-wood-name = 30 деревянных досок cp14-store-sell-wood-desc = Вы правда думаете что хоть кому то нужны доски с далекого острова? Что ж вы правы, надеемся у вашего поселения есть чем греться зимой. diff --git a/Resources/Locale/ru-RU/_CP14/travelingStoreship/ui.ftl b/Resources/Locale/ru-RU/_CP14/travelingStoreship/ui.ftl index 224759a3c5..c900adf870 100644 --- a/Resources/Locale/ru-RU/_CP14/travelingStoreship/ui.ftl +++ b/Resources/Locale/ru-RU/_CP14/travelingStoreship/ui.ftl @@ -6,4 +6,4 @@ cp14-store-ui-next-travel-in = До прибытия: cp14-store-ui-tab-buy = Покупка cp14-store-ui-tab-sell = Продажа -cp14-store-ui-tab-special = [bold][color=red]Временное предложение![/color][/bold] +cp14-store-ui-tab-special = [bold][color=#eba346]Временное предложение![/color][/bold] diff --git a/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell.yml b/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell.yml index 49da02fb28..e3ee736205 100644 --- a/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell.yml +++ b/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell.yml @@ -40,38 +40,6 @@ stackId: CP14GoldBar count: 10 -- type: storePositionSell - id: Wheat - name: cp14-store-sell-wheat-name - desc: cp14-store-sell-wheat-desc - icon: - sprite: _CP14/Objects/Flora/Farm/wheat.rsi - state: base1 - price: - min: 10 - max: 50 - service: !type:CP14SellWhitelistService - whitelist: - tags: - - CP14Wheat - count: 10 - -- type: storePositionSell - id: Dye - name: cp14-store-sell-dye-name - desc: cp14-store-sell-dye-desc - icon: - sprite: _CP14/Objects/Materials/dye.rsi - state: preview - price: - min: 50 - max: 100 - service: !type:CP14SellWhitelistService - whitelist: - tags: - - CP14Dye - count: 10 - - type: storePositionSell id: Wood name: cp14-store-sell-wood-name diff --git a/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell_special.yml b/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell_special.yml new file mode 100644 index 0000000000..4808511120 --- /dev/null +++ b/Resources/Prototypes/_CP14/Catalog/Cargo/Store/sell_special.yml @@ -0,0 +1,129 @@ +- 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: + min: 100 + max: 200 + 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: + min: 100 + max: 300 + 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: + min: 100 + max: 300 + 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: + min: 100 + max: 300 + service: !type:CP14SellWhitelistService + whitelist: + tags: + - CP14Torch + count: 20 + +- type: storePositionSell + id: BountyFloraMaterial + special: true + name: cp14-store-sell-special-flora-name + desc: cp14-store-sell-special-flora-desc + icon: + sprite: _CP14/Objects/Materials/flora.rsi + state: grass_material1 + price: + min: 100 + max: 300 + service: !type:CP14SellStackService + stackId: CP14FloraMaterial + count: 15 + +- 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: + min: 100 + max: 300 + 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: + min: 100 + max: 250 + 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: + min: 300 + max: 650 + service: !type:CP14SellStackService + stackId: CP14LucensWoodenPlanks + count: 10 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml index 46b7722223..e0be9de88b 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/scrolls.yml @@ -52,6 +52,7 @@ - type: Tag tags: - Document + - CP14SpellScroll - type: CP14SpellStorageAccessHolding - type: CP14SpellStorageUseDamage damagePerMana: diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/meat.yml index 926bfbe63a..1c884da6ce 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Consumable/Food/meat.yml @@ -27,6 +27,9 @@ - type: InternalTemperature thickness: 0.02 area: 0.02 # arbitrary number that sounds right for a slab of meat + - type: Tag + tags: + - CP14Meat - type: entity id: CP14FoodMeatSliceBase @@ -48,6 +51,9 @@ - type: InternalTemperature thickness: 0.006 area: 0.006 # 1\3 of meat value + - type: Tag + tags: + - CP14MeatSlice # Lamb Meat diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Tools/torch.yml b/Resources/Prototypes/_CP14/Entities/Objects/Tools/torch.yml index 631209bea8..96a0a32c86 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Tools/torch.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Tools/torch.yml @@ -87,6 +87,9 @@ params: variation: 0.05 volume: 10 + - type: Tag + tags: + - CP14Torch - type: entity parent: CP14Torch diff --git a/Resources/Prototypes/_CP14/GameRules/events.yml b/Resources/Prototypes/_CP14/GameRules/events.yml index 372fcab3d5..6dd63d960d 100644 --- a/Resources/Prototypes/_CP14/GameRules/events.yml +++ b/Resources/Prototypes/_CP14/GameRules/events.yml @@ -12,21 +12,21 @@ id: CP14BasicCalmEventsTable table: !type:AllSelector children: - - id: CP14ClosetSkeleton + #- id: CP14ClosetSkeleton - id: CP14ZombiesSpawn - id: CP14HydrasSpawn - id: CP14MosquitoSpawn -- type: entity - parent: CP14BaseGameRule - id: CP14ClosetSkeleton - components: - - type: StationEvent - weight: 5 - duration: 1 - minimumPlayers: 10 - - type: RandomEntityStorageSpawnRule - prototype: CP14MobUndeadSkeletonCloset +#- type: entity +# parent: CP14BaseGameRule +# id: CP14ClosetSkeleton +# components: +# - type: StationEvent +# weight: 5 +# duration: 1 +# minimumPlayers: 10 +# - type: RandomEntityStorageSpawnRule +# prototype: CP14MobUndeadSkeletonCloset - type: entity parent: CP14BaseStationEventShortDelay diff --git a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Fun/lol.yml b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Fun/lol.yml index eccca9874d..5da1425850 100644 --- a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Fun/lol.yml +++ b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Fun/lol.yml @@ -20,4 +20,28 @@ entity: CP14RoyalPumpkin count: 10 minGroupSize: 1 + maxGroupSize: 1 + +- type: cp14DemiplaneModifier + id: LucenTree + tiers: + - 1 + - 2 + - 3 + generationWeight: 0.1 + generationProb: 0.1 + categories: + Fun: 1 + requiredTags: + - CP14DemiplaneHerbals + - CP14DemiplaneOpenSky + layers: + - !type:OreDunGen + tileMask: + - CP14FloorGrass + - CP14FloorGrassLight + - CP14FloorGrassTall + entity: CP14BaseLucensTreeLarge + count: 10 + minGroupSize: 1 maxGroupSize: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/tags.yml b/Resources/Prototypes/_CP14/tags.yml index 47ff7ab017..22b42e7671 100644 --- a/Resources/Prototypes/_CP14/tags.yml +++ b/Resources/Prototypes/_CP14/tags.yml @@ -66,3 +66,15 @@ - type: Tag id: CP14Dye + +- type: Tag + id: CP14Meat + +- type: Tag + id: CP14MeatSlice + +- type: Tag + id: CP14Torch + +- type: Tag + id: CP14SpellScroll From 2dd5c48c75038eb12a79b887258b828a73757f08 Mon Sep 17 00:00:00 2001 From: Nim <128169402+Nimfar11@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:10:56 +0200 Subject: [PATCH 2/3] cut clothes (#781) Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> --- Resources/Prototypes/_CP14/Entities/Clothing/Pants/base.yml | 5 +++++ Resources/Prototypes/_CP14/Entities/Clothing/Shirt/base.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Pants/base.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Pants/base.yml index 7e393c228c..d0207799f0 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Pants/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Pants/base.yml @@ -12,6 +12,11 @@ - pants - type: Sprite state: icon + - type: Butcherable + butcheringType: Knife + spawned: + - id: CP14Cloth1 + amount: 1 - type: entity parent: CP14ClothingPantsBase diff --git a/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/base.yml b/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/base.yml index b516f9eb26..588cb55c16 100644 --- a/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Clothing/Shirt/base.yml @@ -12,3 +12,8 @@ - shirt - type: Sprite state: icon + - type: Butcherable + butcheringType: Knife + spawned: + - id: CP14Cloth1 + amount: 2 From f7c7c54a7e6cbc57ada3a2c7c33407118327a2eb Mon Sep 17 00:00:00 2001 From: Nim <128169402+Nimfar11@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:12:13 +0200 Subject: [PATCH 3/3] More harvest and other little things (#780) * harvest * fix potato --- Resources/Prototypes/_CP14/Catalog/Cargo/crates.yml | 2 +- .../_CP14/Entities/Objects/Specific/Farming/seeds.yml | 2 +- .../Structures/Flora/Gatherable/Farm/cucumber.yml | 4 ++-- .../Structures/Flora/Gatherable/Farm/potato.yml | 4 ++-- .../Structures/Flora/Gatherable/Farm/pumpkin.yml | 4 ++-- .../Structures/Flora/Gatherable/Farm/tomatoes.yml | 4 ++-- .../Structures/Flora/Gatherable/Farm/wheat.yml | 4 ++-- .../_CP14/Recipes/Workbench/cooking_table.yml | 10 +++++++++- 8 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Resources/Prototypes/_CP14/Catalog/Cargo/crates.yml b/Resources/Prototypes/_CP14/Catalog/Cargo/crates.yml index c5f3d5bab1..f0f520789b 100644 --- a/Resources/Prototypes/_CP14/Catalog/Cargo/crates.yml +++ b/Resources/Prototypes/_CP14/Catalog/Cargo/crates.yml @@ -158,4 +158,4 @@ - type: StorageFill contents: - id: CP14FoodCheeseWheel - amount: 5 \ No newline at end of file + amount: 5 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Farming/seeds.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Farming/seeds.yml index 6be3baede0..d8a6a9b80a 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Farming/seeds.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Farming/seeds.yml @@ -72,4 +72,4 @@ - state: bag - state: tomato - type: CP14Seed - plantProto: CP14PlantTomatoes \ No newline at end of file + plantProto: CP14PlantTomatoes diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/cucumber.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/cucumber.yml index 9b3de579a6..00e48f8918 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/cucumber.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/cucumber.yml @@ -65,5 +65,5 @@ id: CP14GatherCucumber entries: - id: CP14FoodCucumber - amount: 2 - maxAmount: 3 \ No newline at end of file + amount: 3 + maxAmount: 5 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/potato.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/potato.yml index e2fa235ac4..a893392bbb 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/potato.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/potato.yml @@ -65,5 +65,5 @@ id: CP14GatherPotato entries: - id: CP14FoodPotato - amount: 2 - maxAmount: 4 \ No newline at end of file + amount: 3 + maxAmount: 5 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/pumpkin.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/pumpkin.yml index c7f232ecda..70999a040a 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/pumpkin.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/pumpkin.yml @@ -65,5 +65,5 @@ id: CP14GatherPumpkin entries: - id: CP14FoodPumpkin - amount: 1 - maxAmount: 2 \ No newline at end of file + amount: 2 + maxAmount: 3 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/tomatoes.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/tomatoes.yml index 536d3cdaa5..81a15f2f55 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/tomatoes.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/tomatoes.yml @@ -65,5 +65,5 @@ id: CP14GatherTomatoes entries: - id: CP14FoodTomatoes - amount: 1 - maxAmount: 3 \ No newline at end of file + amount: 3 + maxAmount: 5 diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/wheat.yml b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/wheat.yml index 0708165f95..09a3dcd4d6 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/wheat.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Flora/Gatherable/Farm/wheat.yml @@ -69,5 +69,5 @@ id: CP14GatherWheat entries: - id: CP14Wheat - amount: 2 - maxAmount: 4 \ No newline at end of file + amount: 3 + maxAmount: 5 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/cooking_table.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/cooking_table.yml index 73f4197095..9bb8aa1cdb 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/cooking_table.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/cooking_table.yml @@ -65,4 +65,12 @@ craftTime: 1 entities: CP14FoodTomatoesSlice: 1 - result: CP14SeedTomato \ No newline at end of file + result: CP14SeedTomato + +- type: CP14Recipe + id: CP14SeedCabbage + tag: CP14RecipeCooking + craftTime: 1 + entities: + CP14FoodCabbageSlice: 1 + result: CP14SeedCabbage