]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Ore boxes (#19838)
authorKara <lunarautomaton6@gmail.com>
Sat, 16 Sep 2023 11:49:54 +0000 (04:49 -0700)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 11:49:54 +0000 (21:49 +1000)
Resources/Prototypes/Entities/Structures/Storage/ore_box.yml [new file with mode: 0644]
Resources/Textures/Structures/Storage/orebox.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Storage/orebox.rsi/orebox-top.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/orebox.rsi/orebox.png [new file with mode: 0644]

diff --git a/Resources/Prototypes/Entities/Structures/Storage/ore_box.yml b/Resources/Prototypes/Entities/Structures/Storage/ore_box.yml
new file mode 100644 (file)
index 0000000..4c5b41e
--- /dev/null
@@ -0,0 +1,76 @@
+- type: entity
+  id: OreBox
+  name: ore box
+  description: A large storage container for holding unprocessed ores.
+  parent: BaseStructureDynamic
+  components:
+  - type: Anchorable
+  - type: InteractionOutline
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Wood
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 150
+      behaviors:
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 100
+      behaviors:
+      - !type:EmptyAllContainersBehaviour
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          MaterialWoodPlank1:
+            min: 3
+            max: 5
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+  - type: Climbable
+
+  # orebox-specific
+  - type: Sprite
+    noRot: true
+    sprite: /Textures/Structures/Storage/orebox.rsi
+    layers:
+    - state: orebox
+    - state: orebox-top
+      map: [ top ]
+      visible: true
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.StorageVisuals.Open:
+        top:
+          True: { visible: false }
+          False: { visible: true }
+  - type: Storage
+    capacity: 525
+    storageOpenSound: /Audio/Effects/closetopen.ogg
+    storageCloseSound: /Audio/Effects/closetclose.ogg
+    whitelist:
+      tags:
+      - Ore
+  - type: UserInterface
+    interfaces:
+    - key: enum.StorageUiKey.Key
+      type: StorageBoundUserInterface
+  - type: ContainerContainer
+    containers:
+      storagebase: !type:Container
+        ents: [ ]
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeCircle
+          radius: 0.3
+        # very not dense to make it easy to pull
+        density: 20
+        mask:
+        - MachineMask
+        layer:
+        - MachineLayer
diff --git a/Resources/Textures/Structures/Storage/orebox.rsi/meta.json b/Resources/Textures/Structures/Storage/orebox.rsi/meta.json
new file mode 100644 (file)
index 0000000..e24ab0f
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "tgstation at fb1012102257b7b0a08d861fd2b8ba963c416e93, cut into layers by mirrorcult",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "orebox"
+    },
+    {
+      "name": "orebox-top"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/Resources/Textures/Structures/Storage/orebox.rsi/orebox-top.png b/Resources/Textures/Structures/Storage/orebox.rsi/orebox-top.png
new file mode 100644 (file)
index 0000000..39872b0
Binary files /dev/null and b/Resources/Textures/Structures/Storage/orebox.rsi/orebox-top.png differ
diff --git a/Resources/Textures/Structures/Storage/orebox.rsi/orebox.png b/Resources/Textures/Structures/Storage/orebox.rsi/orebox.png
new file mode 100644 (file)
index 0000000..b0120aa
Binary files /dev/null and b/Resources/Textures/Structures/Storage/orebox.rsi/orebox.png differ