mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
[MIRROR] Stacking machine input, output rotation [MDB IGNORE] (#18076)
* Stacking machine input, output rotation (#71870) All stacking machines spawn var edited. You could build one, but you couldn't select the directions. Now you can rebuild a stacking machine and rotate input/output as it was before destruction. * Stacking machine input, output rotation Co-authored-by: Andrew <mt.forspam@gmail.com>
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
data["contents"] = list()
|
||||
if(machine)
|
||||
data["stacking_amount"] = machine.stack_amt
|
||||
data["input_direction"] = dir2text(machine.input_dir)
|
||||
data["output_direction"] = dir2text(machine.output_dir)
|
||||
for(var/stack_type in machine.stack_list)
|
||||
var/obj/item/stack/sheet/stored_sheet = machine.stack_list[stack_type]
|
||||
if(stored_sheet.amount <= 0)
|
||||
@@ -69,6 +71,10 @@
|
||||
inp.amount = 0
|
||||
machine.unload_mineral(out)
|
||||
return TRUE
|
||||
if("rotate")
|
||||
var/input = text2num(params["input"])
|
||||
machine.rotate(input)
|
||||
return TRUE
|
||||
|
||||
/**********************Mineral stacking unit**************************/
|
||||
|
||||
@@ -118,6 +124,14 @@
|
||||
to_chat(user, span_notice("You link [src] to the console in [M]'s buffer."))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/rotate(input)
|
||||
if (input)
|
||||
input_dir = turn(input_dir, 90)
|
||||
else
|
||||
output_dir = turn(output_dir, 90)
|
||||
if (input_dir == output_dir)
|
||||
rotate(input)
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(QDELETED(inp))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user