Actions

Difference between revisions of "Vending Machine"

From Unofficial Stationeers Wiki

(Update to use the new Structurebox syntax)
m (Added category "Import/Export")
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
[[Category:Machines]]
 
[[Category:Machines]]
 +
[[Category:Import/Export]]
 
{{Itembox
 
{{Itembox
 
  | image      = [[File:ItemKitVendingMachine.png]]
 
  | image      = [[File:ItemKitVendingMachine.png]]
Line 5: Line 6:
 
  | createdwith = [[Electronics Printer]], [[Fabricator]]
 
  | createdwith = [[Electronics Printer]], [[Fabricator]]
 
  | constructs  = Vending Machine
 
  | constructs  = Vending Machine
  | cost        = 20g [[Steel]], 50g [[Gold]], 10g [[Solder]], 50g Electrum
+
  | cost        = 20g [[Steel]], 50g [[Gold]], 10g [[Solder]], 50g [[Electrum]]
 
  | stacks      = No
 
  | stacks      = No
 
}}
 
}}
 
{{Structurebox
 
{{Structurebox
 
  | name            = Vending Machine
 
  | name            = Vending Machine
  | image            = [[File:Vending Machine front.png]]
+
  | image            = [[File:ItemVendingMachine.png]]
 
  | other            = Holds 100 individual stacks of items.
 
  | other            = Holds 100 individual stacks of items.
 
  | power_usage      = 5W
 
  | power_usage      = 5W
Line 18: Line 19:
 
  | item_rec1        = [[Kit (Vending Machine)]]
 
  | item_rec1        = [[Kit (Vending Machine)]]
 
}}
 
}}
The '''Vending Machine''' is a machine used to dispense items to players. The machine can hold up to 100 individual stacks of items. The machine's easy to use interface lets the user choose an item (displayed in the picture window) and dispense it with the press of a button.
+
 
 
__TOC__
 
__TOC__
=== Data Network Properties ===
 
<div class="toccolours mw-collapsible mw-collapsed">
 
These are all [[:Category:Data Network|Data Network]] properties of this device.
 
<div class="mw-collapsible-content">
 
  
==== Data Parameters ====
+
== Description == <!--T:1-->
These are all parameters, that can be written to with a [[Kit_(Logic_I/O)#Logic_Writer|Logic Writer]] or a [[Kit_(Logic_I/O)#Batch_Writer|Batch Writer]]. The outputs are listed in the order a Logic Writer's "VAR" setting cycles through them.
+
The [[Vending Machine]] is a machine used to dispense items to players. The machine can hold up to 100 individual stacks of items. The machine's easy to use interface lets the user choose an item (displayed in the picture window) and dispense it with the press of a button.
 +
<br>Can be also used to get the items purchased or sold to [[Traders]].
 +
 
 +
=== Usage notes ===
 +
 
 +
While the Vending Machine can be used to store and dispense items to players it does NOT stack them, it will store items as they come in in their own slots. That means that one stack of 50 [[Coal Ore]] takes up one slot, while 50 stacks of 1 Coal Ore each takes up 50 slots. Thus it is recommended that you take this into account when designing a system using the Vending Machine.
 +
 
 +
<!--T:2-->
 +
{{Data Network Header}}
 +
 
 +
{{Data Parameters}}
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 40: Line 47:
 
|}
 
|}
  
==== Data Outputs ====
+
{{Data Outputs}}
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Logic_Reader|Logic Reader]]. The outputs are listed in the order a Logic Reader's "VAR" setting cycles through them.
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 53: Line 59:
 
|-
 
|-
 
| Lock || Boolean || Reads if the device is locked.
 
| Lock || Boolean || Reads if the device is locked.
 +
|-
 +
| ImportCount|| Integer || Incremented each time an item stack enter by the Import slot
 +
|-
 +
| ExportCount|| Integer || Incremented each time an item stack exit by the Export Slot
 
|-
 
|-
 
| Ratio || Integer || Storage space used in percentage.
 
| Ratio || Integer || Storage space used in percentage.
 
|-
 
|-
 
| Quantity || Integer || Storage space used in whole numbers.
 
| Quantity || Integer || Storage space used in whole numbers.
 +
|-
 +
| PrefabHash|| Integer || Returns [[ItemHash]] of device
 
|-
 
|-
 
| On || Boolean || Returns whether the device is turned on. (0 for no, 1 for yes)
 
| On || Boolean || Returns whether the device is turned on. (0 for no, 1 for yes)
Line 71: Line 83:
 
! Number || Name !! Description
 
! Number || Name !! Description
 
|-
 
|-
| 1 || Import || Import slot.
+
| 0 || Import || Import slot.
 
|-
 
|-
| 2 || Export || Export slot.
+
| 1 || Export || Export slot.
 
|-
 
|-
| 3-102 || Storage || Internal storage slots.o
+
| 2-101 || Storage || Internal storage slots.
 
|}
 
|}
  
Line 84: Line 96:
 
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).
 
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).
 
|-
 
|-
| OccupiedHash || Integer || Returns [[ItemHash]] of item in slot.
+
| OccupantHash|| Integer || Returns [[ItemHash]] of item in slot.
 
|-
 
|-
 
| Quantity || Integer || Size of stack.
 
| Quantity || Integer || Size of stack.
Line 92: Line 104:
 
| Class || Integer || Item class ID.
 
| Class || Integer || Item class ID.
 
|}
 
|}
</div>
 
</div>
 

Latest revision as of 06:13, 27 December 2023

Kit (Vending Machine)
ItemKitVendingMachine.png
Stacks No
Constructing Options Vending Machine
Recipe
Created With Electronics Printer, Fabricator
Cost 20g Steel, 50g Gold, 10g Solder, 50g Electrum
Vending Machine
ItemVendingMachine.png
Holds 100 individual stacks of items.
Operation
Power Usage 5W
Construction
Placed with Kit (Vending Machine)
Placed on Small Grid
Stage 1
Deconstruction
Deconstructed with Hand Drill
Item received Kit (Vending Machine)

Description[edit]

The Vending Machine is a machine used to dispense items to players. The machine can hold up to 100 individual stacks of items. The machine's easy to use interface lets the user choose an item (displayed in the picture window) and dispense it with the press of a button.
Can be also used to get the items purchased or sold to Traders.

Usage notes[edit]

While the Vending Machine can be used to store and dispense items to players it does NOT stack them, it will store items as they come in in their own slots. That means that one stack of 50 Coal Ore takes up one slot, while 50 stacks of 1 Coal Ore each takes up 50 slots. Thus it is recommended that you take this into account when designing a system using the Vending Machine.

Data Network Properties[edit]

These are all Data Network properties of this device.

Data Parameters[edit]

These are all parameters, that can be written to with a Logic Writer, Batch Writer, or Integrated Circuit (IC10). The outputs are listed in the order a Logic Writer's "VAR" setting cycles through them.

Parameter Name Data Type Description
Activate Boolean Not functional on this device
Lock Boolean Locks the device for player interaction when set to 1. Unlocks it, when set to 0.
On Boolean Turns the device on, when set >= 1. Turns it off, when set to <1.
RequestHash Integer Write ItemHash to device to immediate output

Data Outputs[edit]

These are all parameters, that can be read with a Logic Reader or a Slot Reader. The outputs are listed in the order a Logic Reader's "VAR" setting cycles through them.

Output Name Data Type Description
Power Boolean Returns whether the device is turned on and receives power. (0 for no, 1 for yes).
Error Boolean Returns whether the device is flashing an error. (0 for no, 1 for yes).
Activate Boolean Not functional on this device.
Lock Boolean Reads if the device is locked.
ImportCount Integer Incremented each time an item stack enter by the Import slot
ExportCount Integer Incremented each time an item stack exit by the Export Slot
Ratio Integer Storage space used in percentage.
Quantity Integer Storage space used in whole numbers.
PrefabHash Integer Returns ItemHash of device
On Boolean Returns whether the device is turned on. (0 for no, 1 for yes)
RequiredPower Integer Returns the current amount of power, required by the device, in watts.
RequestHash Integer 0 unless actively written to

Data Slots[edit]

These are all parameters, that can be read with a Slots Reader. The outputs are listed in the order a Slots Reader's "VAR" setting cycles through them.

Number Name Description
0 Import Import slot.
1 Export Export slot.
2-101 Storage Internal storage slots.
Name Data Type Description
Occupied Boolean Returns whether the slot occupied. (0 for no, 1 for yes).
OccupantHash Integer Returns ItemHash of item in slot.
Quantity Integer Size of stack.
Damage Integer Item durability in percent.
Class Integer Item class ID.