From 30d7da4b2b34f95e188de457a91ab70b1056fa53 Mon Sep 17 00:00:00 2001 From: Red <96445749+TheShuEd@users.noreply.github.com> Date: Sun, 6 Jul 2025 17:35:49 +0300 Subject: [PATCH] Ed 06 07 2025 guards trading (#1505) * guard trading * Refactor trading reputation special and update guard assets Renamed CP14AddGlobalReputationSpecial to CP14AddTradingReputationSpecial and updated its logic to use a configurable set of factions. Updated job prototypes for guard, guard commander, investigator, and merchant to use the new special and specify relevant factions. Also updated guard helmet textures and metadata. --- ....cs => CP14AddTradingReputationSpecial.cs} | 8 ++-- .../Locale/en-US/_CP14/trading/factions.ftl | 1 + .../Locale/ru-RU/_CP14/trading/factions.ftl | 1 + .../_CP14/Catalog/Fills/dresser.yml | 2 +- .../Objects/Economy/trade_contracts.yml | 13 +++++- .../Ranged/Ammunition/crossbowBolts.yml | 34 ++++---------- .../Objects/Weapons/Ranged/crossbow.yml | 3 ++ .../_CP14/Roles/Jobs/Guard/guard.yml | 3 ++ .../Roles/Jobs/Guard/guard_commander.yml | 3 ++ .../_CP14/Roles/Jobs/Guard/investigator.yml | 4 ++ .../_CP14/Roles/Jobs/Traders/merchant.yml | 12 ++++- .../_CP14/Trading/BuyPositions/guards.yml | 44 ++++++++++++++++++ .../Prototypes/_CP14/Trading/contracts.yml | 1 - .../Prototypes/_CP14/Trading/factions.yml | 7 ++- .../Guard/helmet.rsi/equipped-HELMET.png | Bin 916 -> 1028 bytes .../Head/Roles/Guard/helmet.rsi/icon.png | Bin 358 -> 406 bytes .../Head/Roles/Guard/helmet.rsi/meta.json | 2 +- .../Economy/trade_contracts.rsi/guard.png | Bin 0 -> 584 bytes .../Economy/trade_contracts.rsi/meta.json | 33 ++++++------- 19 files changed, 118 insertions(+), 53 deletions(-) rename Content.Shared/_CP14/Trading/{CP14AddGlobalReputationSpecial.cs => CP14AddTradingReputationSpecial.cs} (69%) create mode 100644 Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml create mode 100644 Resources/Textures/_CP14/Objects/Specific/Economy/trade_contracts.rsi/guard.png diff --git a/Content.Shared/_CP14/Trading/CP14AddGlobalReputationSpecial.cs b/Content.Shared/_CP14/Trading/CP14AddTradingReputationSpecial.cs similarity index 69% rename from Content.Shared/_CP14/Trading/CP14AddGlobalReputationSpecial.cs rename to Content.Shared/_CP14/Trading/CP14AddTradingReputationSpecial.cs index 4e04bf5ef4..fe8491a9e5 100644 --- a/Content.Shared/_CP14/Trading/CP14AddGlobalReputationSpecial.cs +++ b/Content.Shared/_CP14/Trading/CP14AddTradingReputationSpecial.cs @@ -5,18 +5,20 @@ using Robust.Shared.Prototypes; namespace Content.Shared._CP14.Trading; -public sealed partial class CP14AddGlobalReputationSpecial : JobSpecial +public sealed partial class CP14AddTradingReputationSpecial : JobSpecial { [DataField] public float Reputation = 1f; + [DataField] + public HashSet> Factions = new(); + public override void AfterEquip(EntityUid mob) { var entMan = IoCManager.Resolve(); - var protoMan = IoCManager.Resolve(); var tradeSys = entMan.System(); - foreach (var faction in protoMan.EnumeratePrototypes()) + foreach (var faction in Factions) { tradeSys.AddReputation(mob, faction, Reputation); } diff --git a/Resources/Locale/en-US/_CP14/trading/factions.ftl b/Resources/Locale/en-US/_CP14/trading/factions.ftl index c8cec8ee15..3822603724 100644 --- a/Resources/Locale/en-US/_CP14/trading/factions.ftl +++ b/Resources/Locale/en-US/_CP14/trading/factions.ftl @@ -8,3 +8,4 @@ cp14-trade-faction-horticulture = Horticulture Consortium cp14-trade-faction-butchers = Master Butchers Union cp14-trade-faction-dairy = Golden Udder Dairy cp14-trade-faction-tailors = Silk & Needle Tailors Guild +cp14-trade-faction-guard = Imperial Guard \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/trading/factions.ftl b/Resources/Locale/ru-RU/_CP14/trading/factions.ftl index 615c4933a1..33bb08107a 100644 --- a/Resources/Locale/ru-RU/_CP14/trading/factions.ftl +++ b/Resources/Locale/ru-RU/_CP14/trading/factions.ftl @@ -8,3 +8,4 @@ cp14-trade-faction-horticulture = Консорциум садоводов cp14-trade-faction-butchers = Союз мастеровых мясников cp14-trade-faction-dairy = Молочная ферма 'Златовымя' cp14-trade-faction-tailors = Гильдия портных 'Шелк и игла' +cp14-trade-faction-guard = Имперская стража \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Catalog/Fills/dresser.yml b/Resources/Prototypes/_CP14/Catalog/Fills/dresser.yml index 777a19fbe7..4f7f285b17 100644 --- a/Resources/Prototypes/_CP14/Catalog/Fills/dresser.yml +++ b/Resources/Prototypes/_CP14/Catalog/Fills/dresser.yml @@ -106,6 +106,7 @@ components: - type: StorageFill contents: + - id: CP14TradeContractGuards - id: CP14GuidebookImperialLaws - id: CP14ClothingHeadGuardHelmet prob: 0.7 @@ -131,4 +132,3 @@ prob: 1 - id: CP14ClothingOuterClothingGreenVest prob: 0.6 - diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Economy/trade_contracts.yml b/Resources/Prototypes/_CP14/Entities/Objects/Economy/trade_contracts.yml index 5b0425215e..a06511fe7c 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Economy/trade_contracts.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Economy/trade_contracts.yml @@ -114,4 +114,15 @@ - type: Sprite state: tailors - type: CP14TradingContract - faction: Tailors \ No newline at end of file + faction: Tailors + +- type: entity + parent: CP14TradeContractBase + id: CP14TradeContractGuards + description: Trading contract with the "Imperial Guard". Allows you to purchase items that are important for maintaining law and order. + suffix: Guards + components: + - type: Sprite + state: guard + - type: CP14TradingContract + faction: Guards \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml index fd9cee09f4..7be90e9981 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml @@ -4,6 +4,11 @@ categories: [ ForkFiltered ] abstract: true components: + - type: Projectile + deleteOnCollide: false + onlyCollideWhenShot: true + - type: Sprite + sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi - type: Item size: Tiny shape: @@ -18,6 +23,11 @@ categories: [ ForkFiltered ] abstract: true components: + - type: Projectile + deleteOnCollide: false + onlyCollideWhenShot: true + - type: Sprite + sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi - type: Item size: Small shape: @@ -33,13 +43,10 @@ description: Rod with a pointed spike in iron. No plumage, they're not bows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 20 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: rod - state: solution1 @@ -56,13 +63,10 @@ description: Rod with a pointed spike in gold. No plumage, they're not bows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 15 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: rod color: "#ffe269" @@ -80,13 +84,10 @@ description: Rod with a pointed spike in copper. No plumage, they're not bows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 15 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: rod color: "#e28f08" @@ -104,13 +105,10 @@ description: Rod with a pointed spike in mithril. No plumage, they're not bows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 25 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: rod color: "#38f0b3" @@ -128,13 +126,10 @@ description: A large rod without plumage, for large crossbows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 35 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: big_rod - type: PhysicalComposition @@ -148,13 +143,10 @@ description: A large rod without plumage, for large crossbows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 25 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: big_rod color: "#ffe269" @@ -169,13 +161,10 @@ description: A large rod without plumage, for large crossbows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 25 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: big_rod color: "#e28f08" @@ -190,13 +179,10 @@ description: A large rod without plumage, for large crossbows. components: - type: Projectile - deleteOnCollide: false - onlyCollideWhenShot: true damage: types: Piercing: 40 - type: Sprite - sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi layers: - state: big_rod color: "#38f0b3" diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/crossbow.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/crossbow.yml index bec7918dff..826613027e 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/crossbow.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/crossbow.yml @@ -60,3 +60,6 @@ whitelist: tags: - CP14BigCrossbowBolt + - type: PhysicalComposition + materialComposition: + CP14Iron: 50 diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml index b7361c0d0e..c962c3f5b8 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml @@ -15,6 +15,9 @@ components: - type: CP14SalaryCounter salary: 50 + - !type:CP14AddTradingReputationSpecial + factions: + - Guards - type: startingGear id: CP14GuardGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml index db96bffc67..1e6ca65be6 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml @@ -23,6 +23,9 @@ components: - type: CP14SalaryCounter salary: 400 + - !type:CP14AddTradingReputationSpecial + factions: + - Guards - type: startingGear id: CP14GuardCommanderGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/investigator.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/investigator.yml index 205cf822e6..4f29c50967 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/investigator.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/investigator.yml @@ -20,6 +20,10 @@ components: - type: CP14SalaryCounter salary: 75 + - !type:CP14AddTradingReputationSpecial + factions: + - Guards + - Thaumaturgy - type: startingGear id: CP14InvestigatorGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Traders/merchant.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Traders/merchant.yml index 337f986836..5d40dd6ac8 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Traders/merchant.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Traders/merchant.yml @@ -11,7 +11,17 @@ - !type:OverallPlaytimeRequirement time: 3600 # 1 hours special: - - !type:CP14AddGlobalReputationSpecial + - !type:CP14AddTradingReputationSpecial + factions: + - VictoriaGardens + - BradPotions + - DwarfMining + - Thaumaturgy + - HomeDecor + - Horticulture + - Butchers + - Dairy + - Tailors - !type:CP14LearnSkillsSpecial skills: - TraderWit diff --git a/Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml b/Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml new file mode 100644 index 0000000000..8ee4be425b --- /dev/null +++ b/Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml @@ -0,0 +1,44 @@ +# Rep 0 + +- type: cp14TradingPosition + id: CP14TradeContractGuards + faction: Guards + uiPosition: 0 + icon: + sprite: _CP14/Objects/Specific/Economy/trade_contracts.rsi + state: guard + service: !type:CP14BuyItemsService + product: CP14TradeContractGuards + +- type: cp14TradingPosition + id: CP14BaseCrossbow + faction: Guards + uiPosition: 1 + icon: + sprite: _CP14/Objects/Weapons/Ranged/crossbow.rsi + state: unwielded + service: !type:CP14BuyItemsService + product: CP14BaseCrossbow + +- type: cp14TradingPosition + id: CP14BigCrossboltIron + faction: Guards + uiPosition: 2 + icon: + sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi + state: big_rod + service: !type:CP14BuyItemsService + product: CP14BigCrossboltIron + count: 5 + +- type: cp14TradingPosition + id: Bola + faction: Guards + uiPosition: 3 + priceMarkup: 10 + icon: + sprite: Objects/Weapons/Throwable/bola.rsi + state: icon + service: !type:CP14BuyItemsService + product: Bola + count: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Trading/contracts.yml b/Resources/Prototypes/_CP14/Trading/contracts.yml index 3f3266db6f..8014c27ce6 100644 --- a/Resources/Prototypes/_CP14/Trading/contracts.yml +++ b/Resources/Prototypes/_CP14/Trading/contracts.yml @@ -86,7 +86,6 @@ product: CP14TradeContractDairy count: 1 - - type: cp14TradingPosition id: CP14TradeContractTailors faction: ContractGuild diff --git a/Resources/Prototypes/_CP14/Trading/factions.yml b/Resources/Prototypes/_CP14/Trading/factions.yml index fb95c4c2b7..710cba49f1 100644 --- a/Resources/Prototypes/_CP14/Trading/factions.yml +++ b/Resources/Prototypes/_CP14/Trading/factions.yml @@ -46,4 +46,9 @@ - type: cp14TradingFaction id: Tailors color: "#d67fd6" - name: cp14-trade-faction-tailors \ No newline at end of file + name: cp14-trade-faction-tailors + +- type: cp14TradingFaction + id: Guards + color: "#385573" + name: cp14-trade-faction-guard \ No newline at end of file diff --git a/Resources/Textures/_CP14/Clothing/Head/Roles/Guard/helmet.rsi/equipped-HELMET.png b/Resources/Textures/_CP14/Clothing/Head/Roles/Guard/helmet.rsi/equipped-HEL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3)ebKKK>ihiVa> zzBbqER}SqIKKv*n;sxu*Rd<%NY^z<~v06&5P44lw?{;-d_CNmo$!Z(F-$ZZKCEqpw zW|-c+uQ^LPJ5i@;-w$VF?`igZ$D9~9mOOKvdz%~Rsh>Gqtv*t7O*3Z{ifsMU6w_XR z*WuRNxV8>dP>;-g(Y7JD>_TYY)h&A#r0d6VFAypD_~kXzn@O@MXDqA!EASkB$;7ay z`tv2bO2=Q1m>V9I9GoGWQhIFTt8V^~bDnB1Su^A%#H;Rj8?ImYykeh{^@&$K$!{&^ zwHNBWWqy3ATVX51F~(<`HGA%Aw?>DgvqwgLt&ceVPIbchWvAYs)@!=L^g_~F-CBA^ zMwC8#*^?kiiD>QBa@p6fG$k*}lm$vKoO{j@J8cV-P5mbihNX;IFV_}@O_(RY#D2{= zi!j@}slOkHL{+Wc^W#@c>V&e?d|o%#n5!SY9oA=9+8tS%(<}Qj(7NhINO`oa+a$f3 zn3+?J^fNQ97l?d+dgx9ZV_kpHzo+_rZMnt&)~B7Z{8TM+=B=o~q!Pt-S^xikD4p@{ wy-3-vhr3n)Q|+?f*7FVdQ&MBb@0RC&B=Kufz diff --git a/Resources/Textures/_CP14/Clothing/Head/Roles/Guard/helmet.rsi/icon.png b/Resources/Textures/_CP14/Clothing/Head/Roles/Guard/helmet.rsi/icon.png index 7a025a2edce57341fad091168106a95374a7d185..dc97cf744a10cd481ea5eb93e601e8946249028a 100644 GIT binary patch delta 366 zcmV-!0g?XZ0+s`iF@I1=L_t(&f$i13O2beX#__*mI78LRilJaDgbW!v2^PAvt6jQe z>5^+Gy?|0Wix<+xwUd(&r$8y4suDY-SY4D(8RBHYp}M?5koUI)at`M?4<{d>lu}A5 zrIb?YAL=&iS>74Dc`e*+*0am={oG6JNiSIQdl`UhB96)@xPQrFb1xiS?MUZ|o@FUc~^sJwAN9u2*p`B}7kPy^0A;gkxKT z;R1j#T;SLifr&QdB#9LWOvJD<#j!2=qZt76Bn6;9n&H?M!^)JvL{gCeh`m(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