directional window (#401)

* pu-pu-piri-pu

* fx remove
This commit is contained in:
Jaraten
2024-08-10 03:10:22 +05:00
committed by GitHub
parent f70e3051ed
commit 32ce8f2164
4 changed files with 105 additions and 0 deletions

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

View File

@@ -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
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B