]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add Emergency Shotgun Cabinet (#21419) (#22327)
authorWhisper <121047731+QuietlyWhisper@users.noreply.github.com>
Mon, 11 Dec 2023 11:35:46 +0000 (06:35 -0500)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2023 11:35:46 +0000 (04:35 -0700)
* add emergency shotgun

* yml parent cleanup

18 files changed:
Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml
Resources/Prototypes/Entities/Structures/Wallmounts/fireaxe_cabinet.yml
Resources/Prototypes/Entities/Structures/Wallmounts/shotgun_cabinet.yml [new file with mode: 0644]
Resources/Prototypes/tags.yml
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-empty-open.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-closed.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-open.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-1.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-2.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-3.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-4.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-up.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/locked.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/shotgun.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/unlocked.png [new file with mode: 0644]

index ef11d917c95b5ae6a320e7d1cf0afb7d38d60fd5..cdcc7d7729670ad4fc533b9d337c4d3b696c547d 100644 (file)
@@ -7,8 +7,8 @@
   components:
   - type: Sprite
     layers:
-      - state: icon
-        map: [ "enum.GunVisualLayers.Base" ]
+    - state: icon
+      map: [ "enum.GunVisualLayers.Base" ]
   - type: Item
     # If you update this also update the bulldog's size.
     size: Large
     size: Normal
   - type: BallisticAmmoProvider
     capacity: 4
+  - type: Tag
+    tags:
+    - WeaponShotgunKammerer
 
 - type: entity
   name: sawn-off shotgun
index fea1161bdbffb25c2a5e1a6669b457ec4b285b08..1e78eb501f294c911a121a707cd660e9e98e06fb 100644 (file)
@@ -3,6 +3,9 @@
   name: fire axe cabinet
   description: There is a small label that reads "For Emergency use only" along with details for safe use of the axe. As if.
   components:
+  - type: Damageable # adding destructible causes the entity inside to be deleted when the cabinet is destroyed :(
+    damageContainer: Inorganic
+    damageModifierSet: Glass
   - type: MeleeSound
     soundGroups:
       Brute:
diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/shotgun_cabinet.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/shotgun_cabinet.yml
new file mode 100644 (file)
index 0000000..fcbceb5
--- /dev/null
@@ -0,0 +1,47 @@
+- type: entity
+  parent: FireAxeCabinet
+  id: ShotGunCabinet
+  name: shotgun cabinet
+  description: There is a small label that reads "For Emergency use only" along with details for safe use of the shotgun. As if.
+  components:
+  - type: Sprite
+    sprite: Structures/Wallmounts/shotgun_cabinet.rsi
+    layers:
+    - state: cabinet
+    - state: shotgun
+      map: ["enum.ItemCabinetVisualLayers.ContainsItem"]
+      visible: true
+    - state: glass
+      map: ["enum.ItemCabinetVisualLayers.Door"]
+  - type: ItemCabinet
+    cabinetSlot:
+      ejectOnInteract: true
+      whitelist:
+        tags:
+        - WeaponShotgunKammerer
+  - type: AccessReader
+    access: [["Security"], ["Command"]]
+
+- type: entity
+  id: ShotGunCabinetOpen
+  parent: [ShotGunCabinet, FireAxeCabinetOpen]
+  suffix: Open
+
+- type: entity
+  id: ShotGunCabinetFilled
+  parent: [ShotGunCabinet,FireAxeCabinetFilled]
+  suffix: Filled
+  components:
+  - type: ItemCabinet
+    cabinetSlot:
+      startingItem: WeaponShotgunKammerer
+      ejectOnInteract: true
+      whitelist:
+        tags:
+        - WeaponShotgunKammerer
+
+- type: entity
+  id: ShotGunCabinetFilledOpen
+  parent: [ShotGunCabinetFilled,FireAxeCabinetFilledOpen]
+  suffix: Filled, Open
+
index bc34696848f15cb327a4d62722cb8e5ce6621323..420249319b34058db44ea18ef200a98040d11975 100644 (file)
 - type: Tag
   id: WeaponPistolCHIMPUpgradeKit
 
+- type: Tag
+  id: WeaponShotgunKammerer
+
 - type: Tag
   id: Window
 
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-empty-open.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-empty-open.png
new file mode 100644 (file)
index 0000000..f867044
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-empty-open.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-closed.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-closed.png
new file mode 100644 (file)
index 0000000..7d8a7b0
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-closed.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-open.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-open.png
new file mode 100644 (file)
index 0000000..7be5a49
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet-filled-open.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet.png
new file mode 100644 (file)
index 0000000..a685c22
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/cabinet.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-1.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-1.png
new file mode 100644 (file)
index 0000000..d22162c
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-1.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-2.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-2.png
new file mode 100644 (file)
index 0000000..b4dcdbd
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-2.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-3.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-3.png
new file mode 100644 (file)
index 0000000..44c775f
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-3.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-4.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-4.png
new file mode 100644 (file)
index 0000000..cb94f03
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-4.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-up.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-up.png
new file mode 100644 (file)
index 0000000..818cb9f
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass-up.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass.png
new file mode 100644 (file)
index 0000000..cf8a78e
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/glass.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/locked.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/locked.png
new file mode 100644 (file)
index 0000000..641150b
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/locked.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/meta.json b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/meta.json
new file mode 100644 (file)
index 0000000..a32bc8c
--- /dev/null
@@ -0,0 +1,50 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Inspired by tg station\u0027s fireaxe cabinet https://github.com/tgstation/tgstation/commit/d0d81185f09ca30d3b0856d476544240dba0de53 Made by DISCORD@ps3moira#9488",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "glass"
+    },
+    {
+      "name": "glass-1"
+    },
+    {
+      "name": "glass-2"
+    },
+    {
+      "name": "glass-3"
+    },
+    {
+      "name": "glass-4"
+    },
+    {
+      "name": "glass-up"
+    },
+    {
+      "name": "locked"
+    },
+    {
+      "name": "shotgun"
+    },
+    {
+      "name": "unlocked"
+    },
+    {
+      "name": "cabinet"
+    },
+    {
+      "name": "cabinet-empty-open"
+    },
+    {
+      "name": "cabinet-filled-closed"
+    },
+    {
+      "name": "cabinet-filled-open"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/shotgun.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/shotgun.png
new file mode 100644 (file)
index 0000000..bc55a68
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/shotgun.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/unlocked.png b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/unlocked.png
new file mode 100644 (file)
index 0000000..eb00105
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/shotgun_cabinet.rsi/unlocked.png differ