From 6a52de86ffe76d1462744b74c97e01e5bb27109c Mon Sep 17 00:00:00 2001 From: Unisol <1929445+Unisol@users.noreply.github.com> Date: Wed, 28 Aug 2024 22:15:00 -0400 Subject: [PATCH] Added plastitanium walls and windows (#31178) * added plastitanium walls and windows * Changed crack sprite on diagonal window from square to diagonal --- .../Entities/Structures/Walls/walls.yml | 70 +++++++++ .../Structures/Windows/plastitanium.yml | 148 +++++++++++++++--- 2 files changed, 196 insertions(+), 22 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 0e98b0a803..f48a12de33 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -507,6 +507,76 @@ - type: Icon sprite: Structures/Walls/plastitanium_diagonal.rsi state: state0 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 2000 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:PlaySoundBehavior + sound: + collection: MetalSlam + - trigger: + !type:DamageTrigger + damage: 1000 + behaviors: + - !type:ChangeConstructionNodeBehavior + node: girder + - !type:PlaySoundBehavior + sound: + collection: MetalSlam + - !type:DoActsBehavior + acts: ["Destruction"] + +- type: entity + id: WallPlastitaniumDiagonalIndestructible + name: plastitanium wall + suffix: diagonal, indestructible + description: Keeps the air in and the greytide out. + placement: + mode: SnapgridCenter + snap: + - Wall + components: + - type: Transform + anchored: true + - type: Clickable + - type: Tag + tags: + - Wall + - type: Sprite + drawdepth: Walls + sprite: Structures/Walls/plastitanium_diagonal.rsi + state: state0 + - type: IconSmooth + mode: Diagonal + key: walls + base: state + - type: Icon + sprite: Structures/Walls/plastitanium_diagonal.rsi + state: state0 + - type: Physics + bodyType: Static + - type: Airtight + noAirWhenFullyAirBlocked: false + airBlockedDirection: + - South + - East + - type: Fixtures + fixtures: + fix1: + shape: + !type:PolygonShape + vertices: + - "-0.5,-0.5" + - "0.5,0.5" + - "0.5,-0.5" + mask: + - FullTileMask + layer: + - WallLayer - type: entity parent: BaseWall diff --git a/Resources/Prototypes/Entities/Structures/Windows/plastitanium.yml b/Resources/Prototypes/Entities/Structures/Windows/plastitanium.yml index cb05f80cd1..2134cfe892 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/plastitanium.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/plastitanium.yml @@ -1,19 +1,77 @@ - type: entity - id: PlastitaniumWindow + id: PlastitaniumWindowBase + parent: BaseStructure + abstract: true name: plastitanium window - parent: Window + description: Don't smudge up the glass down there. + placement: + mode: SnapgridCenter + snap: + - Window + components: + - type: RCDDeconstructable + deconstructable: false + - type: MeleeSound + soundGroups: + Brute: + collection: GlassSmack + - type: WallMount + arc: 360 # interact despite grilles + - type: Tag + tags: + - ForceFixRotations + - Window + - type: Physics + bodyType: Static + - type: ExaminableDamage + messages: WindowMessages + - type: InteractionPopup + interactSuccessString: comp-window-knock + messagePerceivedByOthers: comp-window-knock + interactSuccessSound: + path: /Audio/Effects/glass_knock.ogg + - type: Appearance + - type: StaticPrice + price: 100 + - type: BlockWeather + +- type: entity + id: PlastitaniumWindowSquareBase + abstract: true + name: plastitanium window + parent: PlastitaniumWindowBase components: - type: Sprite drawdepth: WallTops sprite: Structures/Windows/plastitanium_window.rsi - type: Icon sprite: Structures/Windows/plastitanium_window.rsi - - type: Repairable - fuelCost: 15 - doAfterDelay: 3 - - type: Damageable - damageContainer: StructuralInorganic - damageModifierSet: RGlass + state: full + - type: IconSmooth + key: windows + base: ptwindow + - type: Airtight + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb {} + mask: + - FullTileMask + layer: + - GlassLayer + +- type: entity + id: PlastitaniumWindowIndestructible + name: plastitanium window + parent: PlastitaniumWindowSquareBase + suffix: indestructible + +- type: entity + id: PlastitaniumWindow + name: plastitanium window + parent: PlastitaniumWindowSquareBase + components: - type: Destructible thresholds: - trigger: @@ -39,38 +97,37 @@ max: 2 - !type:DoActsBehavior acts: [ "Destruction" ] - - type: IconSmooth - base: ptwindow - - type: Appearance - type: DamageVisuals thresholds: [4, 8, 12] damageDivisor: 28 trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi - - type: StaticPrice - price: 100 + - type: Repairable + fuelCost: 15 + doAfterDelay: 3 + - type: Damageable + damageContainer: StructuralInorganic + damageModifierSet: RGlass - type: entity - parent: ShuttleWindow - id: PlastitaniumWindowDiagonal + id: PlastitaniumWindowDiagonalBase + abstract: true + name: plastitanium window + parent: PlastitaniumWindowBase suffix: diagonal - placement: - mode: SnapgridCenter - snap: - - Window components: - type: Sprite drawdepth: WallTops sprite: Structures/Windows/plastitanium_window_diagonal.rsi state: state0 + - type: Icon + sprite: Structures/Windows/plastitanium_window_diagonal.rsi + state: state0 - type: IconSmooth mode: Diagonal key: windows base: state - - type: Icon - sprite: Structures/Windows/plastitanium_window_diagonal.rsi - state: state0 - type: Fixtures fixtures: fix1: @@ -89,6 +146,53 @@ airBlockedDirection: - South - East + +- type: entity + id: PlastitaniumWindowDiagonalIndestructible + name: plastitanium window + parent: PlastitaniumWindowDiagonalBase + suffix: diagonal, indestructible + +- type: entity + id: PlastitaniumWindowDiagonal + name: plastitanium window + parent: PlastitaniumWindowDiagonalBase + suffix: diagonal + components: + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1000 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 500 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: WindowShatter + - !type:SpawnEntitiesBehavior + spawn: + ShardGlassReinforced: + min: 1 + max: 2 + PartRodMetal: + min: 1 + max: 2 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: DamageVisuals + thresholds: [4, 8, 12] + damageDivisor: 28 + trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks_diagonal.rsi + - type: Repairable + fuelCost: 15 + doAfterDelay: 3 + - type: Damageable + damageContainer: StructuralInorganic + damageModifierSet: RGlass -- 2.51.2