- type: entity
- id: GlassBoxLaser
- name: glass box
- description: A sturdy showcase for an expensive exhibit.
+ id: BaseGlassBox
parent: BaseStructureDynamic
+ abstract: true
placement:
mode: SnapgridCenter
components:
- - type: Anchorable
- delay: 4
- type: Transform
anchored: true
- - type: Damageable
- damageContainer: Inorganic
- damageModifierSet: Glass
- - type: MeleeSound
- soundGroups:
- Brute:
- collection: GlassSmash
- type: Physics
bodyType: Static
- type: Clickable
- type: InteractionOutline
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeAabb
+ bounds: "-0.45,-0.45,0.45,0.45"
+ density: 1000
+ mask:
+ - MachineMask
+ layer:
+ - MidImpassable
+ - LowImpassable
+ - type: ItemSlots
+ - type: ContainerContainer
+ containers:
+ ItemCabinet: !type:ContainerSlot
+ - type: Anchorable
+ delay: 4
+ - type: Appearance
+
+- type: entity
+ id: GlassBox
+ name: glass box
+ description: A sturdy showcase for an expensive exhibit.
+ parent: BaseGlassBox
+ abstract: true # TODO: Temporarily abstract. Remove it after item scaling in cabinets is implemented.
+ components:
- type: Sprite
+ noRot: true
sprite: Structures/Storage/glassbox.rsi
layers:
- - state: glassbox
- - state: caplaser
+ - state: base
+ - state: caplaser # TODO: Remove it after item scaling in cabinets is implemented.
map: ["enum.ItemCabinetVisualLayers.ContainsItem"]
visible: true
- state: glass
map: ["enum.ItemCabinetVisualLayers.Door"]
- - type: ItemCabinet
- cabinetSlot:
- ejectOnInteract: true
- whitelist:
- tags:
- - WeaponAntiqueLaser
- doorSound:
- path: /Audio/Machines/machine_switch.ogg
- openState: glass-up
- closedState: glass
- - type: Lock
+ - state: locked
+ shader: unshaded
+ map: ["enum.LockVisualLayers.Lock"]
+ - type: Fixtures
+ fixtures:
+ fix1:
+ shape:
+ !type:PhysShapeAabb
+ bounds: "-0.45,-0.45,0.45,0.45"
+ density: 1000
+ mask:
+ - MachineMask
+ layer:
+ - LowImpassable
+ - MidImpassable
+ - BulletImpassable
- type: AccessReader
- access: [["Captain"]]
- - type: ItemSlots
- - type: ContainerContainer
- containers:
- ItemCabinet: !type:ContainerSlot
- type: Repairable
- - type: Appearance
+ fuelCost: 15
+ doAfterDelay: 5
+ - type: Lock
+ - type: LockVisuals
- type: DamageVisuals
- thresholds: [4, 8, 12]
+ thresholds: [4, 8, 12] # TODO: Fix damage visuals on open state.
damageDivisor: 7.555
trackAllDamage: true
damageOverlay:
sprite: Structures/Storage/glassbox.rsi
+ - type: Damageable
+ damageContainer: Inorganic
+ damageModifierSet: Glass
+ - type: MeleeSound
+ soundGroups:
+ Brute:
+ collection: GlassSmash
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 150
behaviors:
- - !type:EmptyAllContainersBehaviour
- - !type:PlaySoundBehavior
- sound:
- collection: WindowShatter
- - !type:SpawnEntitiesBehavior
- spawn:
- ShardGlassReinforced:
- min: 1
- max: 1
- GlassBoxLaserBroken:
- min: 1
- max: 1
- - !type:DoActsBehavior
- acts: [ "Destruction" ]
+ - !type:EmptyAllContainersBehaviour
+ - !type:PlaySoundBehavior
+ sound:
+ collection: WindowShatter
+ - !type:PlaySoundBehavior
+ sound:
+ path: /Audio/Machines/warning_buzzer.ogg
+ params:
+ volume: 10
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ ShardGlassReinforced:
+ min: 1
+ max: 2
+ - !type:ChangeConstructionNodeBehavior
+ node: brokenGlassBox
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
- type: entity
- id: GlassBoxLaserOpen
- parent: GlassBoxLaser
- suffix: Open
+ id: GlassBoxLaser
+ parent: GlassBox
+ suffix: AntiqueLaser
components:
+ - type: AccessReader
+ access: [["Captain"]]
+ - type: Construction
+ graph: GlassBox
+ node: glassBox
- type: ItemCabinet
- opened: true
+ cabinetSlot:
+ ejectOnInteract: true
+ whitelist:
+ tags:
+ - WeaponAntiqueLaser
doorSound:
path: /Audio/Machines/machine_switch.ogg
openState: glass-up
closedState: glass
+- type: entity
+ id: GlassBoxLaserOpen
+ parent: GlassBoxLaser
+ suffix: AntiqueLaser, Open
+ components:
+ - type: Lock
+ locked: false
+ - type: ItemCabinet
+ opened: true
+
- type: entity
id: GlassBoxLaserFilled
parent: GlassBoxLaser
- suffix: Filled
+ suffix: AntiqueLaser, Filled
components:
- type: ItemCabinet
cabinetSlot:
whitelist:
tags:
- WeaponAntiqueLaser
- doorSound:
- path: /Audio/Machines/machine_switch.ogg
- openState: glass-up
- closedState: glass
- type: entity
id: GlassBoxLaserFilledOpen
parent: GlassBoxLaserFilled
- suffix: Filled, Open
+ suffix: AntiqueLaser, Filled, Open
components:
+ - type: Lock
+ locked: false
- type: ItemCabinet
opened: true
- doorSound:
- path: /Audio/Machines/machine_switch.ogg
- openState: glass-up
- closedState: glass
- type: entity
- id: GlassBoxLaserBroken
+ id: GlassBoxFrame
+ name: glass box frame
+ description: A glassless sturdy showcase for an expensive exhibit.
+ parent: BaseGlassBox
+ suffix: Frame
+ components:
+ - type: Sprite
+ noRot: true
+ sprite: Structures/Storage/glassbox.rsi
+ layers:
+ - state: base
+ - type: Construction
+ graph: GlassBox
+ node: boxMissingWires
+ - type: Climbable
+ - type: Damageable
+ damageModifierSet: Wood
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 100
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: WoodDestroy
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ MaterialWoodPlank1:
+ min: 2
+ max: 5
+ - !type:DoActsBehavior
+ acts: ["Destruction"]
+
+- type: entity
+ id: GlassBoxBroken
name: broken glass box
description: A broken showcase for a stolen expensive exhibit.
- parent: BaseStructureDynamic
+ parent: GlassBoxFrame
suffix: Broken
- placement:
- mode: SnapgridCenter
components:
- - type: Transform
- anchored: true
- - type: Physics
- bodyType: Static
- type: Sprite
sprite: Structures/Storage/glassbox.rsi
layers:
- - state: glassbox
- - state: glass-4
- - type: Clickable
- - type: InteractionOutline
+ - state: base
+ - state: glass-broken
+ - type: Construction
+ graph: GlassBox
+ node: brokenGlassBox
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 100
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: WoodDestroy
+ - !type:SpawnEntitiesBehavior
+ spawn:
+ ShardGlassReinforced:
+ min: 1
+ max: 1
+ MaterialWoodPlank1:
+ min: 2
+ max: 5
+ - !type:DoActsBehavior
+ acts: ["Destruction"]
--- /dev/null
+- type: constructionGraph
+ id: GlassBox
+ start: start
+ graph:
+ - node: start
+ actions:
+ - !type:DeleteEntity
+ edges:
+ - to: boxMissingWires
+ completed:
+ - !type:SetAnchor
+ value: false
+ steps:
+ - material: WoodPlank
+ amount: 10
+ doAfter: 5
+
+ - node: boxMissingWires
+ entity: GlassBoxFrame
+ edges:
+ - to: boxMissingTrigger
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - material: Cable
+ amount: 2
+ doAfter: 0.5
+
+ - to: start
+ steps:
+ - tool: Prying
+ doAfter: 5
+ completed:
+ - !type:SpawnPrototype
+ prototype: MaterialWoodPlank1
+ amount: 10
+
+ - node: boxMissingTrigger
+ edges:
+ - to: boxTriggerUnsecured
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tag: SignalTrigger
+ name: a Signal Trigger
+ icon:
+ sprite: Objects/Devices/signaltrigger.rsi
+ state: signaltrigger
+ doAfter: 0.5
+
+ - to: boxMissingWires
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Cutting
+ doAfter: 0.25
+ completed:
+ - !type:SpawnPrototype
+ prototype: CableApcStack1
+ amount: 2
+
+ - node: boxTriggerUnsecured
+ edges:
+ - to: boxMissingRGlass
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Screwing
+ doAfter: 0.5
+
+ - to: boxMissingTrigger
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Prying
+ doAfter: 0.5
+ completed:
+ - !type:SpawnPrototype
+ prototype: SignalTrigger
+ amount: 1
+
+ - node: boxMissingRGlass
+ edges:
+ - to: boxRGlassUnsecured
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - material: ReinforcedGlass
+ amount: 5
+ doAfter: 2.5
+
+ - to: boxTriggerUnsecured
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Screwing
+ doAfter: 0.5
+
+ - node: boxRGlassUnsecured
+ edges:
+ - to: glassBox
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Screwing
+ doAfter: 0.5
+
+ - to: boxMissingRGlass
+ conditions:
+ - !type:EntityAnchored
+ steps:
+ - tool: Prying
+ doAfter: 2
+ completed:
+ - !type:SpawnPrototype
+ prototype: SheetRGlass1
+ amount: 5
+
+ - node: brokenGlassBox
+ entity: GlassBoxBroken
+ edges:
+ - to: boxMissingWires
+ steps:
+ - tool: Prying
+ doAfter: 2
+ completed:
+ - !type:SpawnPrototype
+ prototype: ShardGlassReinforced
+ amount: 1
+
+ - node: glassBox
+ entity: GlassBoxLaser
+ edges:
+ - to: boxMissingWires
+ steps:
+ - tool: Screwing
+ doAfter: 4
+ - tool: Pulsing
+ doAfter: 2
+ - tool: Cutting
+ doAfter: 2
+ - tool: Screwing
+ doAfter: 2
+ - tool: Welding
+ doAfter: 10
+ - tool: Anchoring
+ doAfter: 2
+ - tool: Prying
+ doAfter: 2
+ completed:
+ - !type:EmptyAllContainers
+ - !type:SpawnPrototype
+ prototype: CableApcStack1
+ amount: 2
+ - !type:SpawnPrototype
+ prototype: SignalTrigger
+ amount: 1
+ - !type:SpawnPrototype
+ prototype: SheetRGlass1
+ amount: 5
{
"version": 1,
"license": "CC-BY-SA-3.0",
- "copyright": "Taken from tgstation https://github.com/tgstation/tgstation/commit/0129a094635aac51e00fdc7aa3b4248affc1f49d Sprite modified and updated by Nimfar11 (Github), Shatter resprite by KREKS",
+ "copyright": "Taken from tgstation https://github.com/tgstation/tgstation/commit/0129a094635aac51e00fdc7aa3b4248affc1f49d Sprite modified and updated by Nimfar11 (Github), Shatter resprite by KREKS and modified by MilenVolf (GitHub)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
- "name": "glass"
- },
- {
- "name": "DamageOverlay_4"
+ "name": "base"
},
{
- "name": "DamageOverlay_8"
+ "name": "glass"
},
{
- "name": "DamageOverlay_12"
+ "name": "glass-up"
},
{
- "name": "glass-4"
+ "name": "glass-broken"
},
{
- "name": "glass-up"
+ "name": "caplaser"
},
{
"name": "locked"
},
- {
- "name": "caplaser"
- },
{
"name": "unlocked"
},
{
- "name": "glassbox"
+ "name": "icon"
},
{
- "name": "glassbox-empty-open"
+ "name": "DamageOverlay_4"
},
{
- "name": "glassbox-filled-closed"
+ "name": "DamageOverlay_8"
},
{
- "name": "glassbox-filled-open"
+ "name": "DamageOverlay_12"
}
]
}
\ No newline at end of file