]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Glass box for antique laser pistol (#25104)
authorNim <128169402+Nimfar11@users.noreply.github.com>
Sat, 10 Feb 2024 23:36:18 +0000 (01:36 +0200)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2024 23:36:18 +0000 (15:36 -0800)
* glassbox

* fix

17 files changed:
Resources/Prototypes/Catalog/Fills/Lockers/heads.yml
Resources/Prototypes/Entities/Structures/Storage/glass_box.yml [new file with mode: 0644]
Resources/Prototypes/tags.yml
Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_4.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/caplaser.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glass-up.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glass.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-open.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/locked.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Storage/glassbox.rsi/unlocked.png [new file with mode: 0644]

index 973cbaba3f2d00f1a71f5df8593815266f8c2666..714ba0158226d6a3589927efe6a1e644d1ff1898 100644 (file)
@@ -48,7 +48,7 @@
 
 - type: entity
   id: LockerCaptainFilled
-  suffix: Filled
+  suffix: Filled, AntiqueLaser
   parent: LockerCaptain
   components:
   - type: StorageFill
       - id: JetpackCaptainFilled
       - id: MedalCase
 
+- type: entity
+  id: LockerCaptainFilledNoLaser
+  suffix: Filled
+  parent: LockerCaptain
+  components:
+  - type: StorageFill
+    contents:
+      - id: ClothingOuterArmorCaptainCarapace
+      - id: NukeDisk
+      - id: PinpointerNuclear
+      - id: CaptainIDCard
+      - id: WeaponDisabler
+      - id: CommsComputerCircuitboard
+      - id: ClothingHeadsetAltCommand
+      - id: SpaceCash1000
+      - id: PlushieNuke
+        prob: 0.1
+      - id: CigarGoldCase
+        prob: 0.25
+      - id: ClothingBeltSheathFilled
+      - id: DoorRemoteCommand
+      - id: RubberStampCaptain
+      - id: JetpackCaptainFilled
+      - id: MedalCase
+
 - type: entity
   id: LockerHeadOfPersonnelFilled
   suffix: Filled
diff --git a/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml b/Resources/Prototypes/Entities/Structures/Storage/glass_box.yml
new file mode 100644 (file)
index 0000000..bdb02d2
--- /dev/null
@@ -0,0 +1,139 @@
+- type: entity
+  id: GlassBoxLaser
+  name: glass box
+  description: A sturdy showcase for an expensive exhibit.
+  parent: BaseStructureDynamic
+  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: Sprite
+    sprite: Structures/Storage/glassbox.rsi
+    layers:
+    - state: glassbox
+    - state: caplaser
+      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
+  - 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
+  components:
+  - type: ItemCabinet
+    opened: true
+    doorSound:
+      path: /Audio/Machines/machine_switch.ogg
+    openState: glass-up
+    closedState: glass
+
+- type: entity
+  id: GlassBoxLaserFilled
+  parent: GlassBoxLaser
+  suffix: Filled
+  components:
+  - type: ItemCabinet
+    cabinetSlot:
+      startingItem: WeaponAntiqueLaser
+      ejectOnInteract: true
+      whitelist:
+        tags:
+        - WeaponAntiqueLaser
+    doorSound:
+      path: /Audio/Machines/machine_switch.ogg
+    openState: glass-up
+    closedState: glass
+
+- type: entity
+  id: GlassBoxLaserFilledOpen
+  parent: GlassBoxLaserFilled
+  suffix: Filled, Open
+  components:
+  - type: ItemCabinet
+    opened: true
+    doorSound:
+      path: /Audio/Machines/machine_switch.ogg
+    openState: glass-up
+    closedState: glass
+
+- type: entity
+  id: GlassBoxLaserBroken
+  name: broken glass box
+  description: A broken showcase for a stolen expensive exhibit.
+  parent: BaseStructureDynamic
+  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
index 4d85f488a141dc95ea4a46dbb0d95d2fdf5e0d30..8e94128ce661c7173a526b0fe4490a4b9ad5fe0e 100644 (file)
 - type: Tag
   id: WallmountSubstationElectronics
 
+- type: Tag
+  id: WeaponAntiqueLaser
+
 - type: Tag
   id: WeaponPistolCHIMPUpgradeKit
 
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_12.png
new file mode 100644 (file)
index 0000000..6ed908b
Binary files /dev/null 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
new file mode 100644 (file)
index 0000000..e6a50bd
Binary files /dev/null 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
new file mode 100644 (file)
index 0000000..f1b8f6f
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/DamageOverlay_8.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/caplaser.png b/Resources/Textures/Structures/Storage/glassbox.rsi/caplaser.png
new file mode 100644 (file)
index 0000000..4af9023
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/caplaser.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png
new file mode 100644 (file)
index 0000000..acb2054
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glass-4.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glass-up.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glass-up.png
new file mode 100644 (file)
index 0000000..39a32df
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glass-up.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glass.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glass.png
new file mode 100644 (file)
index 0000000..1737ee0
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glass.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png
new file mode 100644 (file)
index 0000000..3a3bf59
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-empty-open.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png
new file mode 100644 (file)
index 0000000..b558cf5
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-closed.png 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
new file mode 100644 (file)
index 0000000..48db8e8
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox-filled-open.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png
new file mode 100644 (file)
index 0000000..3a3bf59
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/glassbox.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/locked.png b/Resources/Textures/Structures/Storage/glassbox.rsi/locked.png
new file mode 100644 (file)
index 0000000..f5739c8
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/locked.png differ
diff --git a/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json b/Resources/Textures/Structures/Storage/glassbox.rsi/meta.json
new file mode 100644 (file)
index 0000000..12f1e9b
--- /dev/null
@@ -0,0 +1,50 @@
+{
+  "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)",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "glass"
+    },
+    {
+      "name": "DamageOverlay_4"
+    },
+    {
+      "name": "DamageOverlay_8"
+    },
+    {
+      "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/Textures/Structures/Storage/glassbox.rsi/unlocked.png b/Resources/Textures/Structures/Storage/glassbox.rsi/unlocked.png
new file mode 100644 (file)
index 0000000..1c92900
Binary files /dev/null and b/Resources/Textures/Structures/Storage/glassbox.rsi/unlocked.png differ