diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Windows/directional.yml b/Resources/Prototypes/_CP14/Entities/Structures/Windows/directional.yml new file mode 100644 index 0000000000..98ae08977e --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Structures/Windows/directional.yml @@ -0,0 +1,86 @@ +- type: entity + id: CP14WindowDirectional + parent: BaseStructure + name: directional window + description: Don't smudge up the glass down there. + placement: + mode: SnapgridCenter + snap: + - Window + components: + - type: WallMount + arc: 360 # interact despite grilles + - type: MeleeSound + soundGroups: + Brute: + collection: GlassSmack + - type: Sprite + drawdepth: Mobs + sprite: _CP14/Structures/Windows/directional.rsi + layers: + - state: wooden_frame + - state: default_glass + - type: Icon + sprite: _CP14/Structures/Windows/directional.rsi + state: wooden_frame + - type: InteractionPopup + interactSuccessString: comp-window-knock + messagePerceivedByOthers: comp-window-knock + interactSuccessSound: + path: /Audio/Effects/glass_knock.ogg + - type: Physics + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.32,0.49,0" + density: 1500 + mask: + - FullTileMask + layer: + - GlassLayer + - type: Repairable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Glass + - type: ExaminableDamage + messages: WindowMessages + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 150 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:PlaySoundBehavior + sound: + collection: WindowShatter + - trigger: + !type:DamageTrigger + damage: 25 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: WindowShatter + - !type:SpawnEntitiesBehavior + spawn: + ShardGlass: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Airtight + noAirWhenFullyAirBlocked: false + airBlockedDirection: + - South + - type: Appearance + - type: DamageVisuals + thresholds: [4, 8, 12] + damageDivisor: 3.333 + trackAllDamage: true + damageOverlay: + sprite: Structures/Windows/cracks_directional.rsi + - type: StaticPrice + price: 10 diff --git a/Resources/Textures/_CP14/Structures/Windows/directional.rsi/default_glass.png b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/default_glass.png new file mode 100644 index 0000000000..5bc4133314 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/default_glass.png differ diff --git a/Resources/Textures/_CP14/Structures/Windows/directional.rsi/meta.json b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/meta.json new file mode 100644 index 0000000000..70bfd7803b --- /dev/null +++ b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/meta.json @@ -0,0 +1,19 @@ +{ + "version": 1, + "license": "All rights reserved for the CrystallPunk14 project only", + "copyright": "Created by Jaraten (discord/Github) for CrystallPunk 14", + "size": { + "x": 32, + "y": 80 + }, + "states": [ + { + "name": "wooden_frame", + "directions": 4 + }, + { + "name": "default_glass", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_CP14/Structures/Windows/directional.rsi/wooden_frame.png b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/wooden_frame.png new file mode 100644 index 0000000000..5a0543bcf2 Binary files /dev/null and b/Resources/Textures/_CP14/Structures/Windows/directional.rsi/wooden_frame.png differ