]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[entity] Chemvend (#16326)
authorfreeman2651 <104049107+freeman2651@users.noreply.github.com>
Fri, 12 May 2023 09:31:20 +0000 (05:31 -0400)
committerGitHub <noreply@github.com>
Fri, 12 May 2023 09:31:20 +0000 (03:31 -0600)
* adds chemvend

* chemvend tweaks

* add restock to cargo market

12 files changed:
Resources/Prototypes/Catalog/Cargo/cargo_vending.yml
Resources/Prototypes/Catalog/Fills/Crates/vending.yml
Resources/Prototypes/Catalog/VendingMachines/Inventories/chemvend.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Specific/Service/vending_machine_restock.yml
Resources/Prototypes/Entities/Objects/Specific/chemical-containers.yml
Resources/Prototypes/Entities/Structures/Machines/vending_machines.yml
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/broken.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/deny.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/normal.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/off.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/panel.png [new file with mode: 0644]

index 190337f65837bc0cabc1187b6963fa1d062b6af4..ce567e941bad06fdac7b67624739733a6a80b45b 100644 (file)
   category: Medical
   group: market
 
+- type: cargoProduct
+  id: CrateVendingMachineRestockChemVend
+  icon:
+    sprite: Objects/Specific/Service/vending_machine_restock.rsi
+    state: base
+  product: CrateVendingMachineRestockChemVendFilled
+  cost: 3500
+  category: Medical
+  group: market
+
 - type: cargoProduct
   id: CrateVendingMachineRestockNutriMax
   icon:
index b4ab04ddaa8497c3c21e01b33d7cd2916e7ac828..f909dfcd424b8b3885971b6540973dd0bde88a49 100644 (file)
     contents:
       - id: VendingMachineRestockMedical
 
+- type: entity
+  id: CrateVendingMachineRestockChemVendFilled
+  parent: CrateMedicalSecure
+  components:
+  - type: StorageFill
+    contents:
+      - id: VendingMachineRestockChemVend
+
 - type: entity
   id: CrateVendingMachineRestockNutriMaxFilled
   parent: CrateHydroSecure
diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chemvend.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chemvend.yml
new file mode 100644 (file)
index 0000000..bf7af4a
--- /dev/null
@@ -0,0 +1,23 @@
+- type: vendingMachineInventory
+  id: ChemVendInventory
+  startingInventory:
+    JugAluminium: 2
+    JugCarbon: 2
+    JugChlorine: 2
+    JugCopper: 2
+    JugEthanol: 2
+    JugFluorine: 2
+    JugHydrogen: 2
+    JugIodine: 2
+    JugIron: 2
+    JugLithium: 2
+    JugMercury: 2
+    JugNitrogen: 2
+    JugOxygen: 2
+    JugPhosphorus: 2
+    JugPotassium: 2
+    JugRadium: 2
+    JugSilicon: 2
+    JugSodium: 2
+    JugSugar: 2
+    JugSulfur: 2
index 8442d9b707b7c45bbdd1a18df6b270ebc19c9097..950267aa8b641ec7bd0a52b3a598f7c7ce65f56e 100644 (file)
     - state: green_bit
       shader: unshaded
     - state: refill_honk
+
+- type: entity
+  parent: BaseVendingMachineRestock
+  id: VendingMachineRestockChemVend
+  name: ChemVend restock box
+  description: A box filled with chemicals and covered in dangerous-looking NFPA diamonds. Load it into a ChemVend to begin.
+  components:
+  - type: VendingMachineRestock
+    canRestock:
+    - ChemVendInventory
+  - type: Sprite
+    layers:
+    - state: base
+    - state: green_bit
+      shader: unshaded
+    - state: refill_medical
index 5d7731f80de743f5c78fe1114693c6085a91e187..5ff20524a21aefe490abe6afb0d1b0e8479257e9 100644 (file)
@@ -50,6 +50,7 @@
 
 - type: entity
   parent: Jug
+  name: jug (carbon)
   id: JugCarbon
   noSpawn: true
   components:
@@ -64,6 +65,7 @@
 
 - type: entity
   parent: Jug
+  name: jug (iodine)
   id: JugIodine
   noSpawn: true
   components:
@@ -78,6 +80,7 @@
 
 - type: entity
   parent: Jug
+  name: jug (fluorine)
   id: JugFluorine
   noSpawn: true
   components:
@@ -92,6 +95,7 @@
 
 - type: entity
   parent: Jug
+  name: jug (chlorine)
   id: JugChlorine
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (aluminium)
   id: JugAluminium
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (phosphorus)
   id: JugPhosphorus
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (sulfur)
   id: JugSulfur
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (silicon)
   id: JugSilicon
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (hydrogen)
   id: JugHydrogen
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (lithium)
   id: JugLithium
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (sodium)
   id: JugSodium
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (potassium)
   id: JugPotassium
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (radium)
   id: JugRadium
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (iron)
   id: JugIron
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (copper)
   id: JugCopper
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (gold)
   id: JugGold
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (mercury)
   id: JugMercury
   noSpawn: true
   components:
 
 - type: entity
   parent: Jug
+  name: jug (silver)
   id: JugSilver
   noSpawn: true
   components:
           reagents:
             - ReagentId: Silver
               Quantity: 200
+
+- type: entity
+  parent: Jug
+  name: jug (ethanol)
+  id: JugEthanol
+  noSpawn: true
+  components:
+    - type: Label
+      currentLabel: Ethanol
+    - type: SolutionContainerManager
+      solutions:
+        beaker:
+          reagents:
+            - ReagentId: Ethanol
+              Quantity: 200
+
+- type: entity
+  parent: Jug
+  name: jug (sugar)
+  id: JugSugar
+  noSpawn: true
+  components:
+    - type: Label
+      currentLabel: Sugar
+    - type: SolutionContainerManager
+      solutions:
+        beaker:
+          reagents:
+            - ReagentId: Sugar
+              Quantity: 200
+
+- type: entity
+  parent: Jug
+  name: jug (nitrogen)
+  id: JugNitrogen
+  noSpawn: true
+  components:
+    - type: Label
+      currentLabel: Nitrogen
+    - type: SolutionContainerManager
+      solutions:
+        beaker:
+          reagents:
+            - ReagentId: Nitrogen
+              Quantity: 200
+
+- type: entity
+  parent: Jug
+  name: jug (oxygen)
+  id: JugOxygen
+  noSpawn: true
+  components:
+    - type: Label
+      currentLabel: Oxygen
+    - type: SolutionContainerManager
+      solutions:
+        beaker:
+          reagents:
+            - ReagentId: Oxygen
+              Quantity: 200
index 29f7848b8a0aeee58ca7370c06bfddb58b928597..699625b61fe423af0d4ba3bc8e7d3acb426a483e 100644 (file)
     - state: dispenser
     - state: dispensereng
 
+- type: entity
+  parent: VendingMachine
+  id: VendingMachineChemicals
+  name: ChemVend
+  description: Probably not the coffee machine.
+  components:
+  - type: VendingMachine
+    pack: ChemVendInventory
+    offState: off
+    brokenState: broken
+    normalState: normal
+    denyState: deny
+    ejectDelay: 3
+  - type: Sprite
+    sprite: Structures/Machines/VendingMachines/chemvend.rsi
+    layers:
+    - state: "off"
+      map: ["enum.VendingMachineVisualLayers.Base"]
+    - state: "off"
+      map: ["enum.VendingMachineVisualLayers.BaseUnshaded"]
+    - state: panel
+      map: ["enum.WiresVisualLayers.MaintenancePanel"]
+  - type: AccessReader
+    access: [["Chemistry"]]
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/broken.png b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/broken.png
new file mode 100644 (file)
index 0000000..a6e60a2
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/broken.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/deny.png b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/deny.png
new file mode 100644 (file)
index 0000000..734cd90
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/deny.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/meta.json b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/meta.json
new file mode 100644 (file)
index 0000000..3b0e0da
--- /dev/null
@@ -0,0 +1,38 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/245b29599acbb6bba24f005095e7798e954fc81c",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "broken"
+    },
+    {
+        "name": "deny",
+        "delays": [
+          [
+            0.1,
+            0.1
+          ]
+        ]
+    },
+    {
+      "name": "normal",
+      "delays": [
+        [
+          0.1,
+          0.1
+        ]
+      ]
+    },
+    {
+      "name": "off"
+    },
+    {
+     "name": "panel"
+    }
+  ]
+}
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/normal.png b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/normal.png
new file mode 100644 (file)
index 0000000..157f141
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/normal.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/off.png b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/off.png
new file mode 100644 (file)
index 0000000..bc34267
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/off.png differ
diff --git a/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/panel.png b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/panel.png
new file mode 100644 (file)
index 0000000..0032751
Binary files /dev/null and b/Resources/Textures/Structures/Machines/VendingMachines/chemvend.rsi/panel.png differ