Mining Fixes (#9330)

This commit is contained in:
Geeves
2020-07-12 14:59:34 +02:00
committed by GitHub
parent 63f3c0981d
commit c30a88d89b
8 changed files with 38 additions and 8 deletions
+14 -5
View File
@@ -2,6 +2,7 @@
/obj/machinery/mineral/stacking_unit_console
name = "stacking machine console"
desc = "This console allows you to set the max stack size for the stacking machine, as well as letting you eject stacks manually."
icon = 'icons/obj/terminals.dmi'
icon_state = "production_console"
density = FALSE
@@ -11,11 +12,15 @@
idle_power_usage = 15
active_power_usage = 50
/obj/machinery/mineral/processing_unit_console/Initialize(mapload, d, populate_components)
. = ..()
/obj/machinery/mineral/stacking_unit_console/Initialize(mapload, d, populate_components)
..()
var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", EFFECTS_ABOVE_LIGHTING_LAYER)
add_overlay(screen_overlay)
set_light(1.4, 1, COLOR_CYAN)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/mineral/stacking_unit_console/LateInitialize()
setup_machine(null)
/obj/machinery/mineral/stacking_unit_console/proc/setup_machine(mob/user)
if(!machine)
@@ -27,7 +32,7 @@
best_distance = get_dist_euclidian(checked_machine,src)
if(machine)
machine.console = src
else
else if(user)
to_chat(user, SPAN_WARNING("ERROR: Linked machine not found!"))
return machine
@@ -88,6 +93,7 @@
/obj/machinery/mineral/stacking_machine
name = "stacking machine"
desc = "A machine which takes loose stacks of finished sheets and packs them together into one easily transportable sheet."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "stacker"
density = TRUE
@@ -121,9 +127,12 @@
break
/obj/machinery/mineral/stacking_machine/machinery_process()
..()
if(!console)
return
if(stat & BROKEN)
return
if(stat & NOPOWER)
return
if(output && input)
var/turf/T = get_turf(input)
@@ -141,4 +150,4 @@
for(var/sheet in stack_storage)
if(stack_storage[sheet] >= stack_amt)
new sheet(get_turf(output), stack_amt)
stack_storage[sheet] -= stack_amt
stack_storage[sheet] -= stack_amt