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.
This commit is contained in:
@@ -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<ProtoId<CP14TradingFactionPrototype>> Factions = new();
|
||||
|
||||
public override void AfterEquip(EntityUid mob)
|
||||
{
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||
var tradeSys = entMan.System<CP14SharedTradingPlatformSystem>();
|
||||
|
||||
foreach (var faction in protoMan.EnumeratePrototypes<CP14TradingFactionPrototype>())
|
||||
foreach (var faction in Factions)
|
||||
{
|
||||
tradeSys.AddReputation(mob, faction, Reputation);
|
||||
}
|
||||
@@ -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
|
||||
@@ -8,3 +8,4 @@ cp14-trade-faction-horticulture = Консорциум садоводов
|
||||
cp14-trade-faction-butchers = Союз мастеровых мясников
|
||||
cp14-trade-faction-dairy = Молочная ферма 'Златовымя'
|
||||
cp14-trade-faction-tailors = Гильдия портных 'Шелк и игла'
|
||||
cp14-trade-faction-guard = Имперская стража
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -114,4 +114,15 @@
|
||||
- type: Sprite
|
||||
state: tailors
|
||||
- type: CP14TradingContract
|
||||
faction: Tailors
|
||||
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
|
||||
@@ -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"
|
||||
|
||||
@@ -60,3 +60,6 @@
|
||||
whitelist:
|
||||
tags:
|
||||
- CP14BigCrossbowBolt
|
||||
- type: PhysicalComposition
|
||||
materialComposition:
|
||||
CP14Iron: 50
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
components:
|
||||
- type: CP14SalaryCounter
|
||||
salary: 50
|
||||
- !type:CP14AddTradingReputationSpecial
|
||||
factions:
|
||||
- Guards
|
||||
|
||||
- type: startingGear
|
||||
id: CP14GuardGear
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
components:
|
||||
- type: CP14SalaryCounter
|
||||
salary: 400
|
||||
- !type:CP14AddTradingReputationSpecial
|
||||
factions:
|
||||
- Guards
|
||||
|
||||
- type: startingGear
|
||||
id: CP14GuardCommanderGear
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
components:
|
||||
- type: CP14SalaryCounter
|
||||
salary: 75
|
||||
- !type:CP14AddTradingReputationSpecial
|
||||
factions:
|
||||
- Guards
|
||||
- Thaumaturgy
|
||||
|
||||
- type: startingGear
|
||||
id: CP14InvestigatorGear
|
||||
|
||||
@@ -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
|
||||
|
||||
44
Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml
Normal file
44
Resources/Prototypes/_CP14/Trading/BuyPositions/guards.yml
Normal file
@@ -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
|
||||
@@ -86,7 +86,6 @@
|
||||
product: CP14TradeContractDairy
|
||||
count: 1
|
||||
|
||||
|
||||
- type: cp14TradingPosition
|
||||
id: CP14TradeContractTailors
|
||||
faction: ContractGuild
|
||||
|
||||
@@ -46,4 +46,9 @@
|
||||
- type: cp14TradingFaction
|
||||
id: Tailors
|
||||
color: "#d67fd6"
|
||||
name: cp14-trade-faction-tailors
|
||||
name: cp14-trade-faction-tailors
|
||||
|
||||
- type: cp14TradingFaction
|
||||
id: Guards
|
||||
color: "#385573"
|
||||
name: cp14-trade-faction-guard
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 406 B |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-4.0",
|
||||
"copyright": "Created by TheShuEd",
|
||||
"copyright": "Created by TheShuEd, edited by dinazewwr",
|
||||
"size": {
|
||||
"x": 48,
|
||||
"y": 48
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 584 B |
@@ -8,44 +8,37 @@
|
||||
"copyright": "Created by TheShuEd (Github) and PhantomRU (Diary, Butchers, horticulture)",
|
||||
"states": [
|
||||
{
|
||||
"name": "blank",
|
||||
"description": "Empty contract template"
|
||||
"name": "blank"
|
||||
},
|
||||
{
|
||||
"name": "victoria_garden",
|
||||
"description": "Victoria Gardens trade contract"
|
||||
"name": "victoria_garden"
|
||||
},
|
||||
{
|
||||
"name": "brad_potions",
|
||||
"description": "Brad's Potions trade contract"
|
||||
"name": "brad_potions"
|
||||
},
|
||||
{
|
||||
"name": "dwarf_mining",
|
||||
"description": "Dwarf Mining trade contract"
|
||||
"name": "dwarf_mining"
|
||||
},
|
||||
{
|
||||
"name": "magic",
|
||||
"description": "Thaumaturgy trade contract"
|
||||
"name": "guard"
|
||||
},
|
||||
{
|
||||
"name": "house",
|
||||
"description": "Home Decor trade contract"
|
||||
"name": "magic"
|
||||
},
|
||||
{
|
||||
"name": "horticulture",
|
||||
"description": "Horticulture trade contract"
|
||||
"name": "house"
|
||||
},
|
||||
{
|
||||
"name": "butchers",
|
||||
"description": "Butchers trade contract"
|
||||
"name": "horticulture"
|
||||
},
|
||||
{
|
||||
"name": "dairy",
|
||||
"description": "Dairy trade contract"
|
||||
"name": "butchers"
|
||||
},
|
||||
{
|
||||
"name": "tailors",
|
||||
"description": "Tailors trade contract"
|
||||
"name": "dairy"
|
||||
},
|
||||
{
|
||||
"name": "tailors"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user