Prettier window breaking (#2368)

* Put the damage in the windows

* add crack overlays

* Window cracking

* glass related sounds

* let's use a valid state

* run optipng on these for posterity

* Examine damage descriptions

* add "Constructible" to dictionary

* Downmix stereo effects to mono

* breaking and knocking

* Add shard etc. sprites

* shard inhands

* more sprite wrangling

* Expand destructiblecomponent drop system + implement it for windows

* Shard descriptions

* Random sprite component

* no nullbabby

* Random destroysounds

* random offset on destructible drops

* fix fucked yaml

* sound collections

* random pitch for knocking

* Localization

* hascomponent

* better spawnondestroy

* missed one
This commit is contained in:
Peter Wedder
2020-10-29 21:42:11 +02:00
committed by GitHub
parent 68078e626a
commit bd4f2b41df
86 changed files with 1447 additions and 61 deletions

View File

@@ -22,7 +22,10 @@
- type: Destructible
deadThreshold: 30
destroySound: /Audio/Effects/woodhit.ogg
spawnOnDestroy: WoodPlank
spawnOnDestroy:
WoodPlank:
Min: 1
Max: 1
resistances: metallicResistances
- type: Occluder
sizeX: 32

View File

@@ -21,7 +21,10 @@
- type: Destructible
deadThreshold: 30
destroySound: /Audio/Effects/metalbreak.ogg
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
resistances: metallicResistances
- type: entity
@@ -47,5 +50,8 @@
- type: Destructible
deadThreshold: 30
destroySound: /Audio/Effects/metalbreak.ogg
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
resistances: metallicResistances

View File

@@ -39,7 +39,10 @@
deadThreshold: 15
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: entity
id: TableFrame
@@ -55,7 +58,10 @@
deadThreshold: 1
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: entity
id: TableBar
@@ -71,7 +77,10 @@
deadThreshold: 1
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: entity
id: TableMetal
@@ -87,7 +96,10 @@
deadThreshold: 15
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: entity
id: TableR
@@ -103,7 +115,10 @@
deadThreshold: 75
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: entity
id: TableGlass
@@ -117,8 +132,12 @@
sprite: Constructible/Structures/Tables/glass.rsi
- type: Destructible
deadThreshold: 5
destroySound: /Audio/Effects/glassbreak2.ogg
destroySound: /Audio/Effects/glass_break2.ogg
resistances: metallicResistances
spawnOnDestroy:
ShardGlass:
Min: 1
Max: 1
- type: entity
id: TableGlassR
@@ -132,8 +151,12 @@
sprite: Constructible/Structures/Tables/r_glass.rsi
- type: Destructible
deadThreshold: 20
destroySound: /Audio/Effects/glassbreak2.ogg
destroySound: /Audio/Effects/glass_break2.ogg
resistances: metallicResistances
spawnOnDestroy:
ShardGlass:
Min: 1
Max: 1
- type: entity
id: TableWood
@@ -149,7 +172,10 @@
deadThreshold: 15
destroySound: /Audio/Effects/woodhit.ogg
resistances: metallicResistances
spawnOnDestroy: WoodPlank
spawnOnDestroy:
WoodPlank:
Min: 1
Max: 1
- type: entity
id: TableCarpet
@@ -165,7 +191,10 @@
deadThreshold: 15
destroySound: /Audio/Effects/woodhit.ogg
resistances: metallicResistances
spawnOnDestroy: WoodPlank
spawnOnDestroy:
WoodPlank:
Min: 1
Max: 1
- type: entity
id: TableStone

View File

@@ -24,7 +24,10 @@
- type: Destructible
maxHP: 500
resistances: metallicResistances
spawnOnDestroy: AMEPart
spawnOnDestroy:
AMEPart:
Min: 1
Max: 1
- type: SnapGrid
offset: Center
- type: Airtight

View File

@@ -46,7 +46,10 @@
wireType: HighVoltage
- type: Destructible
resistances: metallicResistances
spawnOnDestroy: HVWireStack1
spawnOnDestroy:
HVWireStack1:
Min: 1
Max: 1
- type: entity
parent: WireBase
@@ -73,7 +76,10 @@
wireType: MediumVoltage
- type: Destructible
resistances: metallicResistances
spawnOnDestroy: MVWireStack1
spawnOnDestroy:
MVWireStack1:
Min: 1
Max: 1
- type: entity
parent: WireBase
@@ -102,4 +108,7 @@
wireType: Apc
- type: Destructible
resistances: metallicResistances
spawnOnDestroy: ApcExtensionCableStack1
spawnOnDestroy:
ApcExtensionCableStack1:
Min: 1
Max: 1

View File

@@ -32,7 +32,10 @@
offset: Center
- type: Destructible
deadThreshold: 50
spawnOnDestroy: chem_master_broken
spawnOnDestroy:
chem_master_broken:
Min: 1
Max: 1
- type: UserInterface
interfaces:
- key: enum.ChemMasterUiKey.Key
@@ -71,7 +74,10 @@
offset: Center
- type: Destructible
deadThreshold: 25
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: UserInterface
interfaces:
- key: enum.ChemMasterUiKey.Key

View File

@@ -31,7 +31,10 @@
- type: Destructible
deadThreshold: 50
resistances: metallicResistances
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
- type: SnapGrid
offset: Edge
placement:

View File

@@ -46,7 +46,10 @@
sprite: Constructible/Structures/Walls/brick.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -63,7 +66,10 @@
sprite: Constructible/Structures/Walls/clock.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -80,7 +86,10 @@
sprite: Constructible/Structures/Walls/clown.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -98,7 +107,10 @@
sprite: Constructible/Structures/Walls/cult.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -115,7 +127,10 @@
sprite: Constructible/Structures/Walls/debug.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -132,7 +147,10 @@
sprite: Constructible/Structures/Walls/diamond.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -150,7 +168,10 @@
sprite: Constructible/Structures/Walls/gold.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -167,7 +188,10 @@
sprite: Constructible/Structures/Walls/ice.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -184,7 +208,10 @@
sprite: Constructible/Structures/Walls/metal.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -201,7 +228,10 @@
sprite: Constructible/Structures/Walls/plasma.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -218,7 +248,10 @@
sprite: Constructible/Structures/Walls/plastic.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -262,7 +295,10 @@
sprite: Constructible/Structures/Walls/riveted.rsi
- type: Destructible
deadThreshold: 1000
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -279,7 +315,10 @@
sprite: Constructible/Structures/Walls/sandstone.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -296,7 +335,10 @@
sprite: Constructible/Structures/Walls/silver.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -335,7 +377,10 @@
sprite: Constructible/Structures/Walls/uranium.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls
@@ -352,7 +397,10 @@
sprite: Constructible/Structures/Walls/wood.rsi
- type: Destructible
deadThreshold: 300
spawnOnDestroy: Girder
spawnOnDestroy:
Girder:
Min: 1
Max: 1
resistances: metallicResistances
- type: IconSmooth
key: walls

View File

@@ -29,6 +29,11 @@
- type: Destructible
deadThreshold: 15
resistances: metallicResistances
destroySoundCollection: WindowBreak
spawnOnDestroy:
ShardGlass:
Min: 1
Max: 3
- type: SnapGrid
offset: Center
- type: Airtight
@@ -37,6 +42,9 @@
- type: Construction
graph: window
node: window
- type: Appearance
visuals:
- type: WindowVisualizer
- type: entity
id: ReinforcedWindow
@@ -75,3 +83,10 @@
- type: Construction
graph: window
node: phoronWindow
- type: soundCollection
id: WindowBreak
files:
- /Audio/Effects/glass_break1.ogg
- /Audio/Effects/glass_break2.ogg
- /Audio/Effects/glass_break3.ogg

View File

@@ -126,8 +126,11 @@
- type: Anchorable
- type: Destructible
deadThreshold: 10
spawnOnDestroy: FloodlightBroken
destroySound: /Audio/Effects/glassbreak1.ogg
spawnOnDestroy:
FloodlightBroken:
Min: 1
Max: 1
destroySound: /Audio/Effects/glass_break1.ogg
resistances: metallicResistances
- type: Appearance
visuals:
@@ -145,7 +148,10 @@
- type: Anchorable
- type: Destructible
deadThreshold: 20
spawnOnDestroy: SteelSheet1
spawnOnDestroy:
SteelSheet1:
Min: 1
Max: 1
destroySound: /Audio/Effects/metalbreak.ogg
resistances: metallicResistances
- type: Physics

View File

@@ -0,0 +1,53 @@
- type: entity
id: ShardBase
name: shard
description: It's a shard of some unknown material.
parent: BaseItem
abstract: true
components:
- type: Sprite
sprite: Objects/Materials/Shards/shard.rsi
state: shard1
- type: RandomSpriteState
spriteStates:
- shard1
- shard2
- shard3
- type: ItemCooldown
- type: MeleeWeapon
damageType: Slash
- type: Item
sprite: Objects/Materials/Shards/shard.rsi
- type: entity
id: ShardGlass
name: glass shard
description: A small piece of glass. It looks sharp, you wouldn't want to step on it barefoot.
parent: ShardBase
components:
- type: Sprite
color: "#bbeeff"
- type: Item
color: "#bbeeff"
- type: entity
id: ShardGlassReinforced
name: reinforced glass shard
description: A small piece of reinforced glass. It looks sharp, you wouldn't want to step on it barefoot.
parent: ShardBase
components:
- type: Sprite
color: "#96cdef"
- type: Item
color: "#96cdef"
- type: entity
id: ShardGlassPhoron
name: phoron glass shard
description: A small piece of phoron glass. It looks sharp, you wouldn't want to step on it barefoot.
parent: ShardBase
components:
- type: Sprite
color: "#f3b489"
- type: Item
color: "#f3b489"