]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[Entity] Sustenance Vendor (#15119)
authorpotato1234_x <79580518+potato1234x@users.noreply.github.com>
Sun, 9 Apr 2023 22:00:23 +0000 (08:00 +1000)
committerGitHub <noreply@github.com>
Sun, 9 Apr 2023 22:00:23 +0000 (16:00 -0600)
* sustenance vendor

* emaggedinventory

Resources/Prototypes/Catalog/VendingMachines/Inventories/sustenance.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/broken.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/deny-unshaded.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/eject-unshaded.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/normal-unshaded.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/off.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/panel.png [new file with mode: 0644]

diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/sustenance.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/sustenance.yml
new file mode 100644 (file)
index 0000000..70ac441
--- /dev/null
@@ -0,0 +1,12 @@
+- type: vendingMachineInventory
+  id: SustenanceInventory
+  startingInventory:
+    DrinkMREFlask: 3
+    FoodSnackNutribrick: 5
+    FoodSnackMREBrownie: 5
+    FoodCondimentPacketKetchup: 5
+  emaggedInventory:
+    KitchenKnife: 2
+    SpaceMedipen: 3
+    ClothingMaskBreath: 3
+    EmergencyOxygenTankFilled: 3
index d2ae3974828889ad1f94083e305fd6a911a444a0..73a127fe20eca56f5a91e0faf6455290b943cba8 100644 (file)
     radius: 1.5
     energy: 1.6
     color: "#c73434"
+    
+- type: entity
+  parent: VendingMachineSnack
+  id: VendingMachineSustenance
+  name: Sustenance Vendor
+  description: A vending machine which vends food, as required by section 47-C of the NT's Prisoner Ethical Treatment Agreement.
+  components:
+  - type: VendingMachine
+    pack: SustenanceInventory
+    dispenseOnHitChance: 0.25
+    dispenseOnHitThreshold: 2
+    offState: off
+    brokenState: broken
+    normalState: normal-unshaded
+    ejectState: eject-unshaded
+    denyState: deny-unshaded
+  - type: Sprite
+    sprite: Structures/Machines/VendingMachines/sustenance.rsi
+    layers:
+    - state: "off"
+      map: ["enum.VendingMachineVisualLayers.Base"]
+    - state: "off"
+      map: ["enum.VendingMachineVisualLayers.BaseUnshaded"]
+      shader: unshaded
+    - state: panel
+      map: ["enum.WiresVisualLayers.MaintenancePanel"]
+  - type: PointLight
+    radius: 1.5
+    energy: 1.6
+    color: "#737785"
 
 - type: entity
   parent: VendingMachineSnack
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/broken.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/broken.png
new file mode 100644 (file)
index 0000000..2531bb1
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/broken.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/deny-unshaded.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/deny-unshaded.png
new file mode 100644 (file)
index 0000000..631ecf7
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/deny-unshaded.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/eject-unshaded.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/eject-unshaded.png
new file mode 100644 (file)
index 0000000..0ef6fbb
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/eject-unshaded.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/meta.json b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/meta.json
new file mode 100644 (file)
index 0000000..182a623
--- /dev/null
@@ -0,0 +1,52 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/1516a728931b4985c1e86f0c5995a5aa1554a1ad and modified by Swept",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "normal-unshaded",
+      "delays": [
+        [
+          2.5,
+          0.05,
+          3.4
+        ]
+      ]
+    },
+    {
+      "name": "broken"
+    },
+    {
+      "name": "deny-unshaded",
+      "delays": [
+        [
+          0.1,
+          0.1,
+          0.1
+        ]
+      ]
+    },
+    {
+      "name": "off"
+    },
+    {
+      "name": "panel"
+    },
+    {
+      "name": "eject-unshaded",
+      "delays": [
+        [
+          0.1,
+          0.1,
+          0.8,
+          0.1,
+          0.1
+        ]
+      ]
+    }
+  ]
+}
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/normal-unshaded.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/normal-unshaded.png
new file mode 100644 (file)
index 0000000..40d6cf5
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/normal-unshaded.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/off.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/off.png
new file mode 100644 (file)
index 0000000..a243722
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/off.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/panel.png b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/panel.png
new file mode 100644 (file)
index 0000000..c60f5c3
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/sustenance.rsi/panel.png differ