* add an emergency light node to the LightFixture construction graph
* add a recipe entry to the construction menu for emergency light
* make emergency light entity at the emergency light node on the graph
* Make emergency light destroy to 1 steel and 1 glass shard to match
the construction recipe
Co-authored-by: BooleanBuckeye <booleanbuckeye@gmail.com>
- type: RCDDeconstructable
cost: 4
delay: 2
- fx: EffectRCDDeconstruct2
+ fx: EffectRCDDeconstruct2
- type: Destructible
thresholds:
- trigger:
mode: SnapgridCenter
snap:
- Wallmount
-
+
- type: entity
name: light
description: "A light fixture. Draws power and produces light when equipped with a light tube."
shader: "unshaded"
visible: false
- type: Appearance
+ - type: Construction
+ graph: LightFixture
+ node: emergencyLight
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 100
+ behaviors: #excess damage, don't spawn entities.
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - !type:PlaySoundBehavior
+ sound:
+ collection: GlassBreak
+ - trigger:
+ !type:DamageTrigger
+ damage: 25
+ behaviors:
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ SheetSteel1:
+ min: 1
+ max: 1
+ ShardGlass:
+ min: 1
+ max: 1
+ - !type:DoActsBehavior
+ acts: ["Destruction"]
+ - !type:PlaySoundBehavior
+ sound:
+ collection: GlassBreak
placement:
mode: SnapgridCenter
snap:
- material: Steel
amount: 1
doAfter: 2.0
+ - to: emergencyLight
+ steps:
+ - material: Steel
+ amount: 1
+ doAfter: 1.0
+ - material: Glass
+ amount: 1
+ doAfter: 1.0
- node: tubeLight
entity: PoweredlightEmpty
edges:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 1
- - !type:DeleteEntity {}
\ No newline at end of file
+ - !type:DeleteEntity {}
+ - node: emergencyLight
+ entity: EmergencyLight
+ edges:
+ - to: start
+ steps:
+ - tool: Screwing
+ doAfter: 2.0
+ completed:
+ - !type:SpawnPrototype
+ prototype: SheetSteel1
+ amount: 1
+ - !type:SpawnPrototype
+ prototype: SheetGlass1
+ amount: 1
+ - !type:DeleteEntity {}
# Same here. - 20kdc
- !type:TileNotBlocked
+- type: construction
+ name: emergency light
+ id: EmergencyLightFixture
+ graph: LightFixture
+ startNode: start
+ targetNode: emergencyLight
+ category: construction-category-structures
+ description: An emergency light.
+ icon:
+ sprite: Structures/Wallmounts/Lighting/emergency_light.rsi
+ state: base
+ objectType: Structure
+ placementMode: SnapgridCenter
+ canRotate: true
+ canBuildInImpassable: false
+ conditions:
+ - !type:TileNotBlocked
+
- type: construction
name: ground light post
id: LightGroundFixture