Cargo price tweaks 2 (#11307)

* Cargo price tweaks 2

* Allow cargo selling dead organics
This commit is contained in:
metalgearsloth
2022-09-16 03:29:07 +10:00
committed by GitHub
parent d8754b2014
commit ed442a7d3b
22 changed files with 63 additions and 45 deletions

View File

@@ -15,5 +15,5 @@ public sealed class StationBankAccountComponent : Component
/// How much the bank balance goes up per second, every Delay period. Rounded down when multiplied. /// How much the bank balance goes up per second, every Delay period. Rounded down when multiplied.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("increasePerSecond")] [ViewVariables(VVAccess.ReadWrite), DataField("increasePerSecond")]
public int IncreasePerSecond = 2; public int IncreasePerSecond = 1;
} }

View File

@@ -1,6 +1,7 @@
using System.Linq; using System.Linq;
using Content.Server.Cargo.Components; using Content.Server.Cargo.Components;
using Content.Server.Labels.Components; using Content.Server.Labels.Components;
using Content.Server.MobState;
using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events; using Content.Server.Shuttles.Events;
using Content.Server.UserInterface; using Content.Server.UserInterface;
@@ -39,6 +40,7 @@ public sealed partial class CargoSystem
[Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly PricingSystem _pricing = default!; [Dependency] private readonly PricingSystem _pricing = default!;
[Dependency] private readonly ShuttleConsoleSystem _console = default!; [Dependency] private readonly ShuttleConsoleSystem _console = default!;
[Dependency] private readonly ShuttleSystem _shuttle = default!; [Dependency] private readonly ShuttleSystem _shuttle = default!;
@@ -534,8 +536,8 @@ public sealed partial class CargoSystem
while (childEnumerator.MoveNext(out var child)) while (childEnumerator.MoveNext(out var child))
{ {
if (mobQuery.HasComponent(child.Value) || if ((mobQuery.TryGetComponent(child.Value, out var mobState) && !_mobState.IsDead(child.Value, mobState))
FoundOrganics(child.Value, mobQuery, xformQuery)) return true; || FoundOrganics(child.Value, mobQuery, xformQuery)) return true;
} }
return false; return false;

View File

@@ -4,7 +4,7 @@
sprite: Objects/Weapons/Guns/SMGs/wt550.rsi sprite: Objects/Weapons/Guns/SMGs/wt550.rsi
state: icon state: icon
product: CrateArmorySMG product: CrateArmorySMG
cost: 8000 cost: 3000
category: Armory category: Armory
group: market group: market
@@ -14,6 +14,6 @@
sprite: Objects/Weapons/Guns/Shotguns/enforcer.rsi sprite: Objects/Weapons/Guns/Shotguns/enforcer.rsi
state: icon state: icon
product: CrateArmoryShotgun product: CrateArmoryShotgun
cost: 8000 cost: 2500
category: Armory category: Armory
group: market group: market

View File

@@ -14,7 +14,7 @@
sprite: Objects/Specific/Hydroponics/galaxythistle.rsi sprite: Objects/Specific/Hydroponics/galaxythistle.rsi
state: seed state: seed
product: CrateHydroponicsSeedsMedicinal product: CrateHydroponicsSeedsMedicinal
cost: 1000 cost: 500
category: Hydroponics category: Hydroponics
group: market group: market
@@ -24,7 +24,7 @@
sprite: Objects/Tools/Hydroponics/hoe.rsi sprite: Objects/Tools/Hydroponics/hoe.rsi
state: icon state: icon
product: CrateHydroponicsTools product: CrateHydroponicsTools
cost: 1500 cost: 500
category: Hydroponics category: Hydroponics
group: market group: market
@@ -34,6 +34,6 @@
sprite: Objects/Specific/Hydroponics/apple.rsi sprite: Objects/Specific/Hydroponics/apple.rsi
state: seed state: seed
product: CrateHydroponicsSeeds product: CrateHydroponicsSeeds
cost: 1000 cost: 500
category: Hydroponics category: Hydroponics
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Clothing/Head/Helmets/bombsuit.rsi sprite: Clothing/Head/Helmets/bombsuit.rsi
state: icon state: icon
product: CrateEmergencyExplosive product: CrateEmergencyExplosive
cost: 1500 cost: 500
category: Emergency category: Emergency
group: market group: market
@@ -24,7 +24,7 @@
sprite: Clothing/Mask/breath.rsi sprite: Clothing/Mask/breath.rsi
state: icon state: icon
product: CrateEmergencyInternals product: CrateEmergencyInternals
cost: 1000 cost: 500
category: Emergency category: Emergency
group: market group: market
@@ -34,7 +34,7 @@
sprite: Structures/Wallmounts/signs.rsi sprite: Structures/Wallmounts/signs.rsi
state: radiation state: radiation
product: CrateEmergencyRadiation product: CrateEmergencyRadiation
cost: 1000 cost: 500
category: Emergency category: Emergency
group: market group: market
@@ -44,6 +44,6 @@
sprite: Objects/Misc/inflatable_wall.rsi sprite: Objects/Misc/inflatable_wall.rsi
state: item_wall state: item_wall
product: CrateEmergencyInflatablewall product: CrateEmergencyInflatablewall
cost: 1000 cost: 500
category: Emergency category: Emergency
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Tools/cable-coils.rsi sprite: Objects/Tools/cable-coils.rsi
state: coillv-30 state: coillv-30
product: CrateEngineeringCableLV product: CrateEngineeringCableLV
cost: 1000 cost: 300
category: Engineering category: Engineering
group: market group: market
@@ -14,7 +14,7 @@
sprite: Objects/Tools/cable-coils.rsi sprite: Objects/Tools/cable-coils.rsi
state: coilmv-30 state: coilmv-30
product: CrateEngineeringCableMV product: CrateEngineeringCableMV
cost: 1500 cost: 300
category: Engineering category: Engineering
group: market group: market
@@ -24,7 +24,7 @@
sprite: Objects/Tools/cable-coils.rsi sprite: Objects/Tools/cable-coils.rsi
state: coilhv-30 state: coilhv-30
product: CrateEngineeringCableHV product: CrateEngineeringCableHV
cost: 2000 cost: 300
category: Engineering category: Engineering
group: market group: market
@@ -34,7 +34,7 @@
sprite: Objects/Tools/cable-coils.rsi sprite: Objects/Tools/cable-coils.rsi
state: coilall-30 state: coilall-30
product: CrateEngineeringCableBulk product: CrateEngineeringCableBulk
cost: 3000 cost: 500
category: Engineering category: Engineering
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Power/AME/ame_part.rsi sprite: Objects/Power/AME/ame_part.rsi
state: box state: box
product: CrateEngineeringAMEShielding product: CrateEngineeringAMEShielding
cost: 10000 cost: 6000
category: Engineering category: Engineering
group: market group: market
@@ -76,7 +76,7 @@
sprite: Structures/Power/Generation/PA/control_box.rsi sprite: Structures/Power/Generation/PA/control_box.rsi
state: boxc state: boxc
product: CrateEngineeringParticleAccelerator product: CrateEngineeringParticleAccelerator
cost: 10000 cost: 2000
category: Engineering category: Engineering
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Consumable/Food/Baked/pizza.rsi sprite: Objects/Consumable/Food/Baked/pizza.rsi
state: margherita state: margherita
product: CrateFoodPizza product: CrateFoodPizza
cost: 1000 cost: 500
category: Food category: Food
group: market group: market
@@ -14,7 +14,7 @@
sprite: Objects/Consumable/Food/snacks.rsi sprite: Objects/Consumable/Food/snacks.rsi
state: nutribrick state: nutribrick
product: CrateFoodMRE product: CrateFoodMRE
cost: 4000 cost: 1000
category: Food category: Food
group: market group: market
@@ -24,7 +24,7 @@
sprite: Objects/Consumable/Food/ingredients.rsi sprite: Objects/Consumable/Food/ingredients.rsi
state: flour-big state: flour-big
product: CrateFoodCooking product: CrateFoodCooking
cost: 5000 cost: 1500
category: Food category: Food
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Fun/Instruments/accordion.rsi sprite: Objects/Fun/Instruments/accordion.rsi
state: icon state: icon
product: CrateFunInstruments product: CrateFunInstruments
cost: 5000 cost: 3000
category: Fun category: Fun
group: market group: market
@@ -14,7 +14,7 @@
sprite: Objects/Fun/Instruments/structureinstruments.rsi sprite: Objects/Fun/Instruments/structureinstruments.rsi
state: tuba state: tuba
product: CrateFunBrass product: CrateFunBrass
cost: 3500 cost: 2500
category: Fun category: Fun
group: market group: market
@@ -24,7 +24,7 @@
sprite: Objects/Fun/crayons.rsi sprite: Objects/Fun/crayons.rsi
state: box state: box
product: CrateFunArtSupplies product: CrateFunArtSupplies
cost: 1000 cost: 500
category: Fun category: Fun
group: market group: market
@@ -34,7 +34,7 @@
sprite: Objects/Fun/toys.rsi sprite: Objects/Fun/toys.rsi
state: plushie_h state: plushie_h
product: CrateFunPlushie product: CrateFunPlushie
cost: 5000 cost: 1000
category: Fun category: Fun
group: market group: market

View File

@@ -94,7 +94,7 @@
sprite: Mobs/Animals/gorilla.rsi sprite: Mobs/Animals/gorilla.rsi
state: icon state: icon
product: CrateNPCGorilla product: CrateNPCGorilla
cost: 2000 cost: 1000
category: Livestock category: Livestock
group: market group: market
@@ -104,7 +104,7 @@
sprite: Mobs/Animals/monkey.rsi sprite: Mobs/Animals/monkey.rsi
state: monkey state: monkey
product: CrateNPCMonkeyCube product: CrateNPCMonkeyCube
cost: 1500 cost: 2000
category: Livestock category: Livestock
group: market group: market
@@ -134,7 +134,7 @@
sprite: Mobs/Animals/penguin.rsi sprite: Mobs/Animals/penguin.rsi
state: penguin state: penguin
product: CrateNPCPenguin product: CrateNPCPenguin
cost: 2000 cost: 1500
category: Livestock category: Livestock
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Materials/Sheets/glass.rsi sprite: Objects/Materials/Sheets/glass.rsi
state: glass_3 state: glass_3
product: CrateMaterialGlass product: CrateMaterialGlass
cost: 1500 cost: 1000
category: Materials category: Materials
group: market group: market
@@ -14,7 +14,7 @@
sprite: Objects/Materials/Sheets/metal.rsi sprite: Objects/Materials/Sheets/metal.rsi
state: steel_3 state: steel_3
product: CrateMaterialSteel product: CrateMaterialSteel
cost: 1500 cost: 1000
category: Materials category: Materials
group: market group: market
@@ -34,7 +34,7 @@
sprite: Objects/Materials/Sheets/metal.rsi sprite: Objects/Materials/Sheets/metal.rsi
state: plasteel_3 state: plasteel_3
product: CrateMaterialPlasteel product: CrateMaterialPlasteel
cost: 6000 cost: 3000
category: Materials category: Materials
group: market group: market
@@ -44,7 +44,7 @@
sprite: Objects/Materials/Sheets/other.rsi sprite: Objects/Materials/Sheets/other.rsi
state: plasma_3 state: plasma_3
product: CrateMaterialPlasma product: CrateMaterialPlasma
cost: 5000 cost: 2000
category: Materials category: Materials
group: market group: market

View File

@@ -4,6 +4,6 @@
sprite: Structures/Storage/Crates/artifact.rsi sprite: Structures/Storage/Crates/artifact.rsi
state: artifact_container_icon state: artifact_container_icon
product: CrateArtifactContainer product: CrateArtifactContainer
cost: 2000 cost: 500
category: Science category: Science
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Clothing/OuterClothing/Vests/oldarmor.rsi sprite: Clothing/OuterClothing/Vests/oldarmor.rsi
state: icon state: icon
product: CrateSecurityArmor product: CrateSecurityArmor
cost: 1500 cost: 500
category: Security category: Security
group: market group: market
@@ -14,7 +14,7 @@
sprite: Clothing/Head/Helmets/security.rsi sprite: Clothing/Head/Helmets/security.rsi
state: icon state: icon
product: CrateSecurityHelmet product: CrateSecurityHelmet
cost: 1000 cost: 500
category: Security category: Security
group: market group: market
@@ -34,7 +34,7 @@
sprite: Objects/Weapons/Guns/Battery/laser_cannon.rsi sprite: Objects/Weapons/Guns/Battery/laser_cannon.rsi
state: icon state: icon
product: CrateSecurityLaser product: CrateSecurityLaser
cost: 2000 cost: 1600
category: Security category: Security
group: market group: market
@@ -44,7 +44,7 @@
sprite: Clothing/OuterClothing/Armor/riot.rsi sprite: Clothing/OuterClothing/Armor/riot.rsi
state: icon state: icon
product: CrateSecurityRiot product: CrateSecurityRiot
cost: 10000 cost: 2000
category: Security category: Security
group: market group: market
@@ -54,7 +54,7 @@
sprite: Objects/Storage/boxes.rsi sprite: Objects/Storage/boxes.rsi
state: box_security state: box_security
product: CrateSecuritySupplies product: CrateSecuritySupplies
cost: 1500 cost: 500
category: Security category: Security
group: market group: market
@@ -64,6 +64,6 @@
sprite: Objects/Misc/handcuffs.rsi sprite: Objects/Misc/handcuffs.rsi
state: handcuff state: handcuff
product: CrateRestraints product: CrateRestraints
cost: 1500 cost: 1000
category: Security category: Security
group: market group: market

View File

@@ -4,7 +4,7 @@
sprite: Objects/Specific/Janitorial/janitorial.rsi sprite: Objects/Specific/Janitorial/janitorial.rsi
state: cleaner state: cleaner
product: CrateServiceJanitorialSupplies product: CrateServiceJanitorialSupplies
cost: 1000 cost: 500
category: Service category: Service
group: market group: market
@@ -14,7 +14,7 @@
sprite: Objects/Power/light_bulb.rsi sprite: Objects/Power/light_bulb.rsi
state: normal state: normal
product: CrateServiceReplacementLights product: CrateServiceReplacementLights
cost: 1000 cost: 600
category: Service category: Service
group: market group: market
@@ -24,7 +24,7 @@
sprite: Objects/Devices/mousetrap.rsi sprite: Objects/Devices/mousetrap.rsi
state: mousetrap state: mousetrap
product: CrateMousetrapBoxes product: CrateMousetrapBoxes
cost: 1000 cost: 500
category: Service category: Service
group: market group: market
@@ -34,7 +34,7 @@
sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi
state: closed state: closed
product: CrateServiceSmokeables product: CrateServiceSmokeables
cost: 2000 cost: 1500
category: Service category: Service
group: market group: market

View File

@@ -66,6 +66,8 @@
useDelay: 1.0 useDelay: 1.0
event: !type:ToggleJetpackEvent event: !type:ToggleJetpackEvent
- type: Appearance - type: Appearance
- type: StaticPrice
price: 100
#Empty blue #Empty blue
- type: entity - type: entity

View File

@@ -71,6 +71,8 @@
# Gravity generator is a large machine, not casting shadows is fine within the radius set above. # Gravity generator is a large machine, not casting shadows is fine within the radius set above.
castShadows: false castShadows: false
color: "#a8ffd9" color: "#a8ffd9"
- type: StaticPrice
price: 5000
- type: entity - type: entity
id: GravityGeneratorMini id: GravityGeneratorMini
@@ -106,3 +108,5 @@
activePower: 500 activePower: 500
lightRadiusMin: 0.75 lightRadiusMin: 0.75
lightRadiusMax: 2.5 lightRadiusMax: 2.5
- type: StaticPrice
price: 2000

View File

@@ -69,6 +69,8 @@
- type: Actions - type: Actions
- type: SentienceTarget - type: SentienceTarget
flavorKind: mechanical flavorKind: mechanical
- type: StaticPrice
price: 200
- type: entity - type: entity
parent: VendingMachine parent: VendingMachine

View File

@@ -16,6 +16,8 @@
nodeGroupID: Pipe nodeGroupID: Pipe
pipeDirection: South pipeDirection: South
- type: CollideOnAnchor - type: CollideOnAnchor
- type: StaticPrice
price: 200
- type: entity - type: entity
parent: GasUnaryBase parent: GasUnaryBase

View File

@@ -53,6 +53,8 @@
- type: ContainerContainer - type: ContainerContainer
containers: containers:
DisposalTube: !type:Container DisposalTube: !type:Container
- type: StaticPrice
price: 100
- type: entity - type: entity
id: DisposalHolder id: DisposalHolder

View File

@@ -36,6 +36,8 @@
behaviors: behaviors:
- !type:DoActsBehavior - !type:DoActsBehavior
acts: ["Destruction"] acts: ["Destruction"]
- type: StaticPrice
price: 1000
placement: placement:
mode: SnapgridCenter mode: SnapgridCenter
@@ -111,6 +113,8 @@
autoRot: true autoRot: true
offset: "0, 0.1" # shine from the top, not bottom of the computer offset: "0, 0.1" # shine from the top, not bottom of the computer
color: "#4246b3" color: "#4246b3"
- type: StaticPrice
price: 2000
- type: entity - type: entity
id: DebugGyroscope id: DebugGyroscope

View File

@@ -50,3 +50,5 @@
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Climbable - type: Climbable
- type: StaticPrice
price: 150

View File

@@ -682,8 +682,6 @@
- type: IconSmooth - type: IconSmooth
key: walls key: walls
base: solid base: solid
- type: StaticPrice
price: 1 # total material cost. If you change the recipe for the wall you should recalculate this.
- type: entity - type: entity
parent: BaseWall parent: BaseWall