From 8f8db391d8c1e589d7703d50de142ce6f20fceb9 Mon Sep 17 00:00:00 2001 From: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com> Date: Sun, 7 Sep 2025 00:56:37 -0700 Subject: [PATCH] Atmospherics Delta-Pressure YAML refactor (#40174) --- .../airalarms.yml} | 0 .../Atmospherics/Thresholds/deltapressure.yml | 85 +++++++++++++++++++ .../Entities/Objects/Misc/inflatable_wall.yml | 13 +-- .../Structures/Doors/Shutter/shutters.yml | 21 +---- .../Doors/Windoors/base_structurewindoors.yml | 36 ++------ .../Entities/Structures/Windows/plasma.yml | 13 +-- .../Structures/Windows/reinforced.yml | 11 +-- .../Entities/Structures/Windows/rplasma.yml | 13 +-- .../Entities/Structures/Windows/ruranium.yml | 13 +-- .../Entities/Structures/Windows/shuttle.yml | 7 +- .../Entities/Structures/Windows/uranium.yml | 13 +-- .../Entities/Structures/Windows/window.yml | 13 +-- 12 files changed, 109 insertions(+), 129 deletions(-) rename Resources/Prototypes/Atmospherics/{thresholds.yml => Thresholds/airalarms.yml} (100%) create mode 100644 Resources/Prototypes/Atmospherics/Thresholds/deltapressure.yml diff --git a/Resources/Prototypes/Atmospherics/thresholds.yml b/Resources/Prototypes/Atmospherics/Thresholds/airalarms.yml similarity index 100% rename from Resources/Prototypes/Atmospherics/thresholds.yml rename to Resources/Prototypes/Atmospherics/Thresholds/airalarms.yml diff --git a/Resources/Prototypes/Atmospherics/Thresholds/deltapressure.yml b/Resources/Prototypes/Atmospherics/Thresholds/deltapressure.yml new file mode 100644 index 0000000000..e82beec6f6 --- /dev/null +++ b/Resources/Prototypes/Atmospherics/Thresholds/deltapressure.yml @@ -0,0 +1,85 @@ +## Base prototypes for DeltaPressureComponent settings, to make it easy to just +## parent to them and just them globally here. + +## For reinforced plasma windows +- type: entity + abstract: true + id: BaseDeltaPressureReinforcedPlasma + components: + - type: DeltaPressure + minPressure: 150000 + minPressureDelta: 100000 + scalingType: Linear + scalingPower: 0.0001 + +## For quarter reinforced plasma windows +- type: entity + abstract: true + id: BaseDeltaPressureReinforcedPlasmaQuarter + components: + - type: DeltaPressure + minPressure: 37500 + minPressureDelta: 25000 + scalingType: Threshold + +## For plasma windows +- type: entity + abstract: true + id: BaseDeltaPressurePlasma + components: + - type: DeltaPressure + minPressure: 75000 + minPressureDelta: 50000 + scalingType: Linear + scalingPower: 0.0005 + +## For quarter plasma windows +- type: entity + abstract: true + id: BaseDeltaPressurePlasmaQuarter + components: + - type: DeltaPressure + minPressure: 18750 + minPressureDelta: 12500 + scalingType: Threshold + +## For reinforced glass windows +- type: entity + abstract: true + id: BaseDeltaPressureReinforcedGlass + components: + - type: DeltaPressure + minPressure: 15000 + minPressureDelta: 10000 + scalingType: Threshold + +## For quarter reinforced glass windows +- type: entity + abstract: true + id: BaseDeltaPressureReinforcedGlassQuarter + components: + - type: DeltaPressure + minPressure: 3750 + minPressureDelta: 2500 + +## For glass windows +- type: entity + abstract: true + id: BaseDeltaPressureGlass + components: + - type: DeltaPressure + minPressure: 1000 + minPressureDelta: 750 + scalingType: Linear + scalingPower: 0.0005 + +## For quarter glass windows +- type: entity + abstract: true + id: BaseDeltaPressureGlassQuarter + components: + - type: DeltaPressure + minPressure: 250 + minPressureDelta: 187.5 + scalingType: Threshold + diff --git a/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml b/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml index 176c7f79ff..2bb93c682b 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/inflatable_wall.yml @@ -1,4 +1,5 @@ - type: entity + parent: BaseDeltaPressureGlass id: InflatableWall name: inflatable barricade description: An inflated membrane. Activate to deflate. Do not puncture. @@ -35,11 +36,6 @@ disassembleTime: 3 - type: InflatableSafeDisassembly - type: Airtight - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 - type: Transform anchored: true placement: @@ -48,7 +44,7 @@ - type: entity id: InflatableDoor name: inflatable door - parent: BaseMaterialDoor + parent: [BaseMaterialDoor, BaseDeltaPressureGlass] description: An inflated membrane. Activate to deflate. Now with a door. Do not puncture. components: - type: Clickable @@ -90,8 +86,3 @@ - type: InflatableSafeDisassembly - type: Occluder enabled: false - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 diff --git a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml index fc1bc2285a..7d559a7f98 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml @@ -107,7 +107,7 @@ - type: entity id: ShuttersNormal - parent: BaseShutter + parent: [BaseShutter, BaseDeltaPressureGlass] components: - type: Occluder - type: Construction @@ -115,11 +115,6 @@ node: Shutters containers: - board - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 - type: entity id: ShuttersNormalOpen @@ -139,7 +134,7 @@ - type: entity id: ShuttersRadiation - parent: BaseShutter + parent: [BaseShutter, BaseDeltaPressureGlass] name: radiation shutters description: Why did they make these shutters radioactive? components: @@ -156,11 +151,6 @@ node: ShuttersRadiation containers: - board - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 - type: RadiationBlocker resistance: 4 @@ -182,7 +172,7 @@ - type: entity id: ShuttersWindow - parent: BaseShutter + parent: [BaseShutter, BaseDeltaPressureGlass] name: window shutters description: The Best (TM) place to see your friends explode! components: @@ -198,11 +188,6 @@ node: ShuttersWindow containers: - board - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 - type: RadiationBlocker resistance: 1 diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml index 07618243d4..9e25bb830e 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml @@ -1,7 +1,7 @@ #Normal windoors - type: entity id: BaseWindoor - parent: BaseStructure + parent: [BaseStructure, BaseDeltaPressureGlassQuarter] abstract: true placement: mode: SnapgridCenter @@ -163,10 +163,6 @@ noAirWhenFullyAirBlocked: false airBlockedDirection: - South - - type: DeltaPressure - minPressure: 250 - minPressureDelta: 187.5 - scalingType: Threshold - type: Construction graph: Windoor node: windoor @@ -178,7 +174,7 @@ - type: entity id: BaseSecureWindoor - parent: BaseWindoor + parent: [BaseWindoor, BaseDeltaPressureReinforcedGlassQuarter] abstract: true components: - type: Sprite @@ -239,10 +235,6 @@ - type: Construction graph: Windoor node: windoorSecure - - type: DeltaPressure - minPressure: 3750 - minPressureDelta: 2500 - scalingType: Threshold - type: StaticPrice price: 350 - type: Tag @@ -254,7 +246,7 @@ #Plasma Windoors - type: entity id: BasePlasmaWindoor - parent: BaseWindoor + parent: [BaseWindoor, BaseDeltaPressurePlasmaQuarter] abstract: true components: - type: Sprite @@ -312,10 +304,6 @@ - type: Construction graph: Windoor node: pwindoor - - type: DeltaPressure - minPressure: 18750 - minPressureDelta: 12500 - scalingType: Threshold - type: StaticPrice price: 500 - type: RadiationBlocker @@ -323,7 +311,7 @@ - type: entity id: BaseSecurePlasmaWindoor - parent: BaseSecureWindoor + parent: [BaseSecureWindoor, BaseDeltaPressureReinforcedPlasmaQuarter] abstract: true components: - type: Sprite @@ -382,10 +370,6 @@ - type: Construction graph: Windoor node: pwindoorSecure - - type: DeltaPressure - minPressure: 37500 - minPressureDelta: 25000 - scalingType: Threshold - type: StaticPrice price: 500 - type: RadiationBlocker @@ -399,7 +383,7 @@ #Uranium Windoors - type: entity id: BaseUraniumWindoor - parent: BaseWindoor + parent: [BaseWindoor, BaseDeltaPressurePlasmaQuarter] abstract: true components: - type: Sprite @@ -454,10 +438,6 @@ max: 2 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 18750 - minPressureDelta: 12500 - scalingType: Threshold - type: Construction graph: Windoor node: uwindoor @@ -468,7 +448,7 @@ - type: entity id: BaseSecureUraniumWindoor - parent: BaseSecureWindoor + parent: [BaseSecureWindoor, BaseDeltaPressureReinforcedPlasmaQuarter] abstract: true components: - type: Sprite @@ -524,10 +504,6 @@ max: 2 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 37500 - minPressureDelta: 25000 - scalingType: Threshold - type: Construction graph: Windoor node: uwindoorSecure diff --git a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml index d6761239a8..9ec7c323ac 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml @@ -1,7 +1,7 @@ - type: entity id: PlasmaWindow name: plasma window - parent: WindowRCDResistant + parent: [WindowRCDResistant, BaseDeltaPressurePlasma] components: - type: Sprite drawdepth: WallTops @@ -48,11 +48,6 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 75000 - minPressureDelta: 50000 - scalingType: Linear - scalingPower: 0.0005 - type: StaticPrice price: 100 - type: RadiationBlocker @@ -60,7 +55,7 @@ - type: entity id: PlasmaWindowDirectional - parent: WindowDirectionalRCDResistant + parent: [WindowDirectionalRCDResistant, BaseDeltaPressurePlasmaQuarter] name: directional plasma window description: Don't smudge up the glass down there. placement: @@ -109,10 +104,6 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 18750 - minPressureDelta: 12500 - scalingType: Threshold - type: StaticPrice price: 50 - type: RadiationBlocker diff --git a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml index 912313c13d..3b490dc4ce 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml @@ -1,7 +1,7 @@ - type: entity id: ReinforcedWindow name: reinforced window - parent: Window + parent: [Window, BaseDeltaPressureReinforcedGlass] components: - type: Sprite drawdepth: WallTops @@ -55,14 +55,10 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 15000 - minPressureDelta: 10000 - scalingType: Threshold - type: entity id: WindowReinforcedDirectional - parent: WindowDirectional + parent: [WindowDirectional, BaseDeltaPressureReinforcedGlassQuarter] name: directional reinforced window description: Don't smudge up the glass down there. placement: @@ -117,9 +113,6 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 3750 - minPressureDelta: 2500 - type: StaticPrice price: 22.5 diff --git a/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml b/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml index 2506560572..7aee043ac7 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml @@ -1,7 +1,7 @@ - type: entity id: ReinforcedPlasmaWindow name: reinforced plasma window - parent: WindowRCDResistant + parent: [WindowRCDResistant, BaseDeltaPressureReinforcedPlasma] components: - type: Sprite drawdepth: WallTops @@ -53,17 +53,12 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 150000 - minPressureDelta: 100000 - scalingType: Linear - scalingPower: 0.0001 - type: StaticPrice price: 132 - type: entity id: PlasmaReinforcedWindowDirectional - parent: WindowDirectionalRCDResistant + parent: [WindowDirectionalRCDResistant, BaseDeltaPressureReinforcedPlasmaQuarter] name: directional reinforced plasma window description: Don't smudge up the glass down there. placement: @@ -116,10 +111,6 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 37500 - minPressureDelta: 25000 - scalingType: Threshold - type: StaticPrice price: 66 diff --git a/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml b/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml index 943c9c66b7..445ad20a3b 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml @@ -1,7 +1,7 @@ - type: entity id: ReinforcedUraniumWindow name: reinforced uranium window - parent: WindowRCDResistant + parent: [WindowRCDResistant, BaseDeltaPressureReinforcedPlasma] components: - type: Sprite drawdepth: WallTops @@ -48,11 +48,6 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 150000 - minPressureDelta: 100000 - scalingType: Linear - scalingPower: 0.0001 - type: StaticPrice price: 215 - type: RadiationBlocker @@ -60,7 +55,7 @@ - type: entity id: UraniumReinforcedWindowDirectional - parent: WindowDirectionalRCDResistant + parent: [WindowDirectionalRCDResistant, BaseDeltaPressureReinforcedPlasmaQuarter] name: directional reinforced uranium window description: Don't smudge up the glass down there. placement: @@ -111,10 +106,6 @@ max: 2 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 37500 - minPressureDelta: 25000 - scalingType: Threshold - type: StaticPrice price: 110 - type: RadiationBlocker diff --git a/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml b/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml index fde110faf8..f3cae2a247 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml @@ -1,7 +1,7 @@ - type: entity id: ShuttleWindow name: shuttle window - parent: WindowRCDResistant + parent: [WindowRCDResistant, BaseDeltaPressureReinforcedGlass] components: - type: Sprite drawdepth: WallTops @@ -51,11 +51,6 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 15000 - minPressureDelta: 10000 - scalingType: Linear - scalingPower: 0.0005 - type: StaticPrice price: 150 diff --git a/Resources/Prototypes/Entities/Structures/Windows/uranium.yml b/Resources/Prototypes/Entities/Structures/Windows/uranium.yml index 00645ca1f0..292410054d 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/uranium.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/uranium.yml @@ -1,7 +1,7 @@ - type: entity id: UraniumWindow name: uranium window - parent: WindowRCDResistant + parent: [WindowRCDResistant, BaseDeltaPressurePlasma] components: - type: Sprite drawdepth: WallTops @@ -46,11 +46,6 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: DeltaPressure - minPressure: 75000 - minPressureDelta: 50000 - scalingType: Linear - scalingPower: 0.0005 - type: StaticPrice price: 200 - type: RadiationBlocker @@ -58,7 +53,7 @@ - type: entity id: UraniumWindowDirectional - parent: WindowDirectionalRCDResistant + parent: [WindowDirectionalRCDResistant, BaseDeltaPressurePlasmaQuarter] name: directional uranium window description: Don't smudge up the glass down there. placement: @@ -104,10 +99,6 @@ max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DeltaPressure - minPressure: 18750 - minPressureDelta: 12500 - scalingType: Threshold - type: StaticPrice price: 100 - type: RadiationBlocker diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index 99c19c1a70..b20299daab 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -1,6 +1,6 @@ - type: entity id: Window - parent: BaseStructure + parent: [BaseStructure, BaseDeltaPressureGlass] name: window description: Don't smudge up the glass down there. placement: @@ -75,11 +75,6 @@ - !type:DoActsBehavior acts: [ "Destruction" ] - type: Airtight - - type: DeltaPressure - minPressure: 1000 - minPressureDelta: 750 - scalingType: Linear - scalingPower: 0.0005 - type: IconSmooth key: windows base: window @@ -131,7 +126,7 @@ - type: entity id: WindowDirectional - parent: BaseStructure + parent: [BaseStructure, BaseDeltaPressureGlassQuarter] name: directional window description: Don't smudge up the glass down there. placement: @@ -211,10 +206,6 @@ noAirWhenFullyAirBlocked: false airBlockedDirection: - South - - type: DeltaPressure - minPressure: 250 - minPressureDelta: 187.5 - scalingType: Threshold - type: Construction graph: WindowDirectional node: windowDirectional -- 2.51.2