From fd7fa9ef92c567533d58998e2d0830550186d897 Mon Sep 17 00:00:00 2001 From: Geeves Date: Wed, 28 Oct 2020 19:11:49 +0200 Subject: [PATCH] Printable Trolleys (#10358) --- aurorastation.dme | 1 + code/game/machinery/constructable_frame.dm | 35 ++++++++++--------- .../circuitboards/machinery/trolley.dm | 13 +++++++ .../designs/circuit/machine_circuits.dm | 5 +++ html/changelogs/geeves-trolley_board.yml | 6 ++++ 5 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 code/game/objects/items/weapons/circuitboards/machinery/trolley.dm create mode 100644 html/changelogs/geeves-trolley_board.yml diff --git a/aurorastation.dme b/aurorastation.dme index d7ad510aec5..bb213dcf00a 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -935,6 +935,7 @@ #include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\trashcompactor.dm" +#include "code\game\objects\items\weapons\circuitboards\machinery\trolley.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\unary_atmos.dm" #include "code\game\objects\items\weapons\grenades\anti_photon_grenade.dm" #include "code\game\objects\items\weapons\grenades\chem_grenade.dm" diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 3e9ce4d8d46..f63951e3ffe 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -167,26 +167,27 @@ if(component_check) playsound(get_turf(src), P.usesound, 50, TRUE) var/obj/machinery/new_machine = new circuit.build_path(loc, dir, FALSE) - if(new_machine.component_parts) - new_machine.component_parts.Cut() - else - new_machine.component_parts = list() - circuit.construct(new_machine) - - for(var/obj/O in src) - if(circuit.contain_parts) // things like disposal don't want their parts in them - O.forceMove(new_machine) + if(istype(new_machine)) + if(new_machine.component_parts) + new_machine.component_parts.Cut() else - O.forceMove(null) - new_machine.component_parts += O + new_machine.component_parts = list() + circuit.construct(new_machine) - if(circuit.contain_parts) - circuit.forceMove(new_machine) - else - circuit.forceMove(null) + for(var/obj/O in src) + if(circuit.contain_parts) // things like disposal don't want their parts in them + O.forceMove(new_machine) + else + O.forceMove(null) + new_machine.component_parts += O - new_machine.RefreshParts() - new_machine.anchored = TRUE + if(circuit.contain_parts) + circuit.forceMove(new_machine) + else + circuit.forceMove(null) + + new_machine.RefreshParts() + new_machine.anchored = TRUE qdel(src) else if(istype(P, /obj/item)) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/trolley.dm b/code/game/objects/items/weapons/circuitboards/machinery/trolley.dm new file mode 100644 index 00000000000..e481af8c6e5 --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/machinery/trolley.dm @@ -0,0 +1,13 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +/obj/item/circuitboard/cargo_trolley + name = T_BOARD("cargo trolley") + build_path = /obj/vehicle/train/cargo/trolley + board_type = BOARD_MACHINE + origin_tech = list(TECH_ENGINEERING = 2) + req_components = list( + "/obj/item/stack/cable_coil" = 15, + "/obj/item/stock_parts/capacitor" = 1 + ) \ No newline at end of file diff --git a/code/modules/research/designs/circuit/machine_circuits.dm b/code/modules/research/designs/circuit/machine_circuits.dm index ad3d79b7de1..4202af83a46 100644 --- a/code/modules/research/designs/circuit/machine_circuits.dm +++ b/code/modules/research/designs/circuit/machine_circuits.dm @@ -217,6 +217,11 @@ req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) build_path = /obj/item/circuitboard/miningdrillbrace +/datum/design/circuit/machine/cargo_trolley + name = "Cargo Trolley" + req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) + build_path = /obj/item/circuitboard/cargo_trolley + /datum/design/circuit/machine/weapons_analyzer name = "Weapons Analyzer" req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 3, TECH_COMBAT = 2) diff --git a/html/changelogs/geeves-trolley_board.yml b/html/changelogs/geeves-trolley_board.yml new file mode 100644 index 00000000000..21ed772c5d2 --- /dev/null +++ b/html/changelogs/geeves-trolley_board.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Science can now print cargo trolley circuitboards, built with 15 power coils and 1 capacitor." \ No newline at end of file