diff --git a/Resources/Audio/Machines/warning_buzzer.ogg b/Resources/Audio/Machines/warning_buzzer.ogg index 55bb179f57..bef16f46fb 100644 Binary files a/Resources/Audio/Machines/warning_buzzer.ogg and b/Resources/Audio/Machines/warning_buzzer.ogg differ diff --git a/Resources/Prototypes/Entities/Objects/Devices/Electronics/triggers.yml b/Resources/Prototypes/Entities/Objects/Devices/Electronics/triggers.yml index 43ed20c694..2cb9b5233d 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Electronics/triggers.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Electronics/triggers.yml @@ -18,6 +18,8 @@ state: timer - type: Item size: Small + - type: StaticPrice + price: 40 - type: PayloadTrigger components: - type: OnUseTimerTrigger @@ -28,8 +30,6 @@ path: /Audio/Machines/Nuke/general_beep.ogg params: volume: -2 - - type: StaticPrice - price: 40 - type: entity parent: TimerTrigger @@ -40,6 +40,11 @@ - type: Sprite sprite: Objects/Devices/signaltrigger.rsi state: signaltrigger + - type: StaticPrice + price: 40 + - type: Tag + tags: + - SignalTrigger - type: PayloadTrigger components: - type: TriggerOnSignal @@ -49,8 +54,6 @@ - type: WirelessNetworkConnection range: 200 - type: DeviceLinkSink - - type: StaticPrice - price: 40 - type: entity parent: BaseItem @@ -61,11 +64,11 @@ - type: Sprite sprite: Objects/Devices/voice.rsi state: voice - - type: PayloadTrigger - components: - - type: TriggerOnVoice - type: StaticPrice price: 40 - type: Tag tags: - VoiceTrigger + - type: PayloadTrigger + components: + - type: TriggerOnVoice diff --git a/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml b/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml index bdb02d2bc3..8177b6b6f0 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml @@ -1,15 +1,81 @@ - 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: 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: 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"] + - 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 + - type: Repairable + fuelCost: 15 + doAfterDelay: 5 + - type: Lock + - type: LockVisuals + - type: DamageVisuals + 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 @@ -17,19 +83,41 @@ soundGroups: Brute: collection: GlassSmash - - type: Physics - bodyType: Static - - type: Clickable - - type: InteractionOutline - - type: Sprite - sprite: Structures/Storage/glassbox.rsi - layers: - - state: glassbox - - state: caplaser - map: ["enum.ItemCabinetVisualLayers.ContainsItem"] - visible: true - - state: glass - map: ["enum.ItemCabinetVisualLayers.Door"] + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 150 + behaviors: + - !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: GlassBoxLaser + parent: GlassBox + suffix: AntiqueLaser + components: + - type: AccessReader + access: [["Captain"]] + - type: Construction + graph: GlassBox + node: glassBox - type: ItemCabinet cabinetSlot: ejectOnInteract: true @@ -40,58 +128,21 @@ path: /Audio/Machines/machine_switch.ogg openState: glass-up closedState: glass - - type: Lock - - type: AccessReader - access: [["Captain"]] - - type: ItemSlots - - type: ContainerContainer - containers: - ItemCabinet: !type:ContainerSlot - - type: Repairable - - type: Appearance - - type: DamageVisuals - thresholds: [4, 8, 12] - damageDivisor: 7.555 - trackAllDamage: true - damageOverlay: - sprite: Structures/Storage/glassbox.rsi - - 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: entity id: GlassBoxLaserOpen parent: GlassBoxLaser - suffix: Open + suffix: AntiqueLaser, 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: GlassBoxLaserFilled parent: GlassBoxLaser - suffix: Filled + suffix: AntiqueLaser, Filled components: - type: ItemCabinet cabinetSlot: @@ -100,40 +151,83 @@ 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"] diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/glassbox.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/glassbox.yml new file mode 100644 index 0000000000..081f22ea8d --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/glassbox.yml @@ -0,0 +1,160 @@ +- 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 diff --git a/Resources/Prototypes/Recipes/Construction/storage.yml b/Resources/Prototypes/Recipes/Construction/storage.yml index 41abf881b6..c8edebc509 100644 --- a/Resources/Prototypes/Recipes/Construction/storage.yml +++ b/Resources/Prototypes/Recipes/Construction/storage.yml @@ -49,3 +49,21 @@ canBuildInImpassable: false conditions: - !type:TileNotBlocked + +# ItemCabinets +- type: construction + id: ShowCase + name: showcase + description: A sturdy showcase for an expensive exhibit. + graph: GlassBox + startNode: start + targetNode: glassBox + category: construction-category-storage + icon: + sprite: Structures/Storage/glassbox.rsi + state: icon + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 5545e21ee7..f544cd95ef 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -1110,6 +1110,9 @@ - type: Tag id: Sidearm +- type: Tag + id: SignalTrigger + - type: Tag id: SkeletonMotorcycleKeys diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png index cce6fe0ba3..a82bb8b233 100644 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png and b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_4.png b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_4.png index 08b6f66449..054f1f520c 100644 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_4.png and b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_4.png differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png index 6d980d1c67..e1c2297468 100644 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png and b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png b/Resources/Textures/Structures/Storage/glassbox.rsi/base.png similarity index 100% rename from Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png rename to Resources/Textures/Structures/Storage/glassbox.rsi/base.png diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glass-broken.png similarity index 100% rename from Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png rename to Resources/Textures/Structures/Storage/glassbox.rsi/glass-broken.png diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png deleted file mode 100644 index b558cf5212..0000000000 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png and /dev/null differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-open.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-open.png deleted file mode 100644 index 48db8e88e5..0000000000 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-open.png and /dev/null differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png deleted file mode 100644 index 3a3bf591ca..0000000000 Binary files a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png and /dev/null differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/icon.png b/Resources/Textures/Structures/Storage/glassbox.rsi/icon.png new file mode 100644 index 0000000000..9d1c8c8685 Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/icon.png differ diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json b/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json index 5ce653f37b..33decc4009 100644 --- a/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json +++ b/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json @@ -1,15 +1,36 @@ { "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": "base" + }, { "name": "glass" }, + { + "name": "glass-up" + }, + { + "name": "glass-broken" + }, + { + "name": "caplaser" + }, + { + "name": "locked" + }, + { + "name": "unlocked" + }, + { + "name": "icon" + }, { "name": "DamageOverlay_4" }, @@ -18,33 +39,6 @@ }, { "name": "DamageOverlay_12" - }, - { - "name": "glass-4" - }, - { - "name": "glass-up" - }, - { - "name": "locked" - }, - { - "name": "caplaser" - }, - { - "name": "unlocked" - }, - { - "name": "glassbox" - }, - { - "name": "glassbox-empty-open" - }, - { - "name": "glassbox-filled-closed" - }, - { - "name": "glassbox-filled-open" } ] } \ No newline at end of file diff --git a/Resources/migration.yml b/Resources/migration.yml index bf18cfe555..84203370e9 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -327,5 +327,8 @@ WeaponPistolN1984Nonlethal: WeaponPistolN1984 WeaponSubMachineGunVectorRubber: WeaponSubMachineGunVector WeaponSubMachineGunDrozdRubber: WeaponSubMachineGunDrozd WeaponRifleLecterRubber: WeaponRifleLecter + +# 2024-04-26 +GlassBoxLaserBroken: GlassBoxBroken ReinforcementRadioSyndicateMonkey: ReinforcementRadioSyndicateAncestor ReinforcementRadioSyndicateMonkeyNukeops: ReinforcementRadioSyndicateAncestorNukeops