Merge pull request #6804 from Citadel-Station-13/upstream-merge-37607

[MIRROR] [READY] Gives Stacking Machines and their consoles machine boards
This commit is contained in:
LetterJay
2018-05-19 17:18:06 -05:00
committed by GitHub
4 changed files with 59 additions and 5 deletions

View File

@@ -873,3 +873,17 @@
return
transmit = !transmit
to_chat(user, "<span class='notice'>You [transmit ? "enable" : "disable"] the board's automatic disposal transmission.</span>")
/obj/item/circuitboard/machine/stacking_unit_console
name = "Stacking Machine Console (Machine Board)"
build_path = /obj/machinery/mineral/stacking_unit_console
req_components = list(
/obj/item/stack/sheet/glass = 2,
/obj/item/stack/cable_coil = 5)
/obj/item/circuitboard/machine/stacking_machine
name = "Stacking Machine (Machine Board)"
build_path = /obj/machinery/mineral/stacking_machine
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/matter_bin = 2)

View File

@@ -7,20 +7,23 @@
desc = "Controls a stacking machine... in theory."
density = FALSE
anchored = TRUE
var/obj/machinery/mineral/stacking_machine/machine = null
circuit = /obj/item/circuitboard/machine/stacking_unit_console
var/obj/machinery/mineral/stacking_machine/machine
var/machinedir = SOUTHEAST
speed_process = TRUE
/obj/machinery/mineral/stacking_unit_console/Initialize()
. = ..()
machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
if (machine)
machine.CONSOLE = src
else
qdel(src)
/obj/machinery/mineral/stacking_unit_console/ui_interact(mob/user)
. = ..()
if(!machine)
to_chat(user, "<span class='notice'>[src] is not linked to a machine!</span>")
return
var/obj/item/stack/sheet/s
var/dat
@@ -35,6 +38,13 @@
user << browse(dat, "window=console_stacking_machine")
/obj/machinery/mineral/stacking_unit_console/multitool_act(mob/living/user, obj/item/I)
if(istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
M.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
return TRUE
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
if(..())
return
@@ -62,6 +72,7 @@
desc = "A machine that automatically stacks acquired materials. Controlled by a nearby console."
density = TRUE
anchored = TRUE
circuit = /obj/item/circuitboard/machine/stacking_machine
var/obj/machinery/mineral/stacking_unit_console/CONSOLE
var/stk_types = list()
var/stk_amt = list()
@@ -78,6 +89,18 @@
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
/obj/machinery/mineral/stacking_machine/multitool_act(mob/living/user, obj/item/I)
if(istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
if(!istype(M.buffer, /obj/machinery/mineral/stacking_unit_console))
to_chat(user, "<span class='warning'>The [I] has no linkage data in its buffer.</span>")
return FALSE
else
CONSOLE = M.buffer
CONSOLE.machine = src
to_chat(user, "<span class='notice'>You link [src] to the console in [I]'s buffer.</span>")
return TRUE
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
if(!(inp.type in stack_list)) //It's the first of this sheet added
var/obj/item/stack/sheet/s = new inp.type(src, 0)

View File

@@ -482,3 +482,19 @@
build_path = /obj/item/circuitboard/machine/dish_drive
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
/datum/design/board/stacking_unit_console
name = "Machine Design (Stacking Machine Console)"
desc = "The circuit board for a Stacking Machine Console."
id = "stack_console"
build_path = /obj/item/circuitboard/machine/stacking_unit_console
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/board/stacking_machine
name = "Machine Design (Stacking Machine)"
desc = "The circuit board for a Stacking Machine."
id = "stack_machine"
build_path = /obj/item/circuitboard/machine/stacking_machine
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING

View File

@@ -93,7 +93,8 @@
description = "A refresher course on modern engineering technology."
prereq_ids = list("base")
design_ids = list("solarcontrol", "recharger", "powermonitor", "rped", "pacman", "adv_capacitor", "adv_scanning", "emitter", "high_cell", "adv_matter_bin",
"atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "mesons", "thermomachine", "rad_collector", "tesla_coil", "grounding_rod", "apc_control", "cell_charger", "power control", "airlock_board", "firelock_board", "airalarm_electronics", "firealarm_electronics")
"atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "mesons", "thermomachine", "rad_collector", "tesla_coil", "grounding_rod",
"apc_control", "cell_charger", "power control", "airlock_board", "firelock_board", "airalarm_electronics", "firealarm_electronics", "cell_charger", "stack_console", "stack_machine")
research_cost = 7500
export_price = 5000