From f6006bfd1f1c3163568b8f95c6976e87cafeb939 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 05:03:21 -0500 Subject: [PATCH 1/4] disposal buildable via machine frame --- code/game/machinery/constructable_frame.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index b813c76ef5b..59528f18e09 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -234,3 +234,13 @@ obj/item/weapon/circuitboard/rdserver "/obj/item/weapon/stock_parts/micro_laser" = 1, "/obj/item/weapon/stock_parts/console_screen" = 1, "/obj/item/weapon/cable_coil" = 2,) + +/obj/item/weapon/circuitboard/disposal + name = "Circuit board (Disposal)" + build_path = "/obj/machinery/disposal" + board_type = "machine" + origin_tech = "engineering=2" + frame_desc = "Requires 1 Matter Bin, and 2 pieces of cable." + req_components = list( + "/obj/item/weapon/stock_parts/matter_bin" = 1, + "/obj/item/weapon/cable_coil" = 3) From 83ce12e7c320157aaccafefea6b12f5b8018ed22 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 05:53:49 -0500 Subject: [PATCH 2/4] disposal destructable, can develop disposal circuits now --- .../game/machinery/computer/buildandrepair.dm | 1 + code/game/machinery/constructable_frame.dm | 15 ++++++++++---- code/modules/recycling/disposal.dm | 20 +++++++++++++++++++ code/modules/research/designs.dm | 9 +++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index af122965dff..8741e28f181 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -26,6 +26,7 @@ powernet = null list/records = null frame_desc = null + contain_parts = 1 /obj/item/weapon/circuitboard/security name = "Circuit board (Security)" diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 59528f18e09..d5fd61c8620 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -89,9 +89,15 @@ del(O) new_machine.component_parts = list() for(var/obj/O in src) - O.loc = new_machine + if(circuit.contain_parts) // things like disposal don't want their parts in them + O.loc = new_machine + else + O.loc = null new_machine.component_parts += O - circuit.loc = new_machine + if(circuit.contain_parts) + circuit.loc = new_machine + else + circuit.loc = null new_machine.RefreshParts() del(src) @@ -240,7 +246,8 @@ obj/item/weapon/circuitboard/rdserver build_path = "/obj/machinery/disposal" board_type = "machine" origin_tech = "engineering=2" - frame_desc = "Requires 1 Matter Bin, and 2 pieces of cable." + frame_desc = "Requires 1 Matter Bin, and 1 piece of cable." + contain_parts = 0 req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/cable_coil" = 3) + "/obj/item/weapon/cable_coil" = 1) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index a074e6896f2..e4a15e3b6b1 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -56,6 +56,26 @@ update() return + if(istype(I, /obj/item/weapon/weldingtool) && I:welding) + var/obj/item/weapon/weldingtool/W = I + playsound(src.loc, 'Welder.ogg', 100, 1) + var/turf/T = get_turf(user) + user.visible_message("[user] welds apart the disposal.", "You start to weld apart the disposal.") + sleep(40) + if(get_turf(user) == T && W.remove_fuel(2,user)) + var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc) + M.state = 2 + M.icon_state = "box_1" + for(var/obj/O in component_parts) + if(O.reliability != 100 && crit_fail) + O.crit_fail = 1 + O.loc = src.loc + // the stuff still in the disposal + for(var/obj/O in src) + O.loc = src.loc + del(src) + return + var/obj/item/weapon/grab/G = I if(istype(G)) // handle grabbed mob if(ismob(G.affecting)) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 39d5fd07485..6644f015db6 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -76,6 +76,15 @@ datum materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/weapon/circuitboard/security" + disposal + name = "Circuit Design (Disposal)" + desc = "Allows for the construction of circuit boards used to build disposal bins." + id = "disposal" + req_tech = list("engineering" = 2) + build_type = IMPRINTER + materials = list("$glass" = 2000, "acid" = 20) + build_path = "/obj/item/weapon/circuitboard/disposal" + aicore name = "Circuit Design (AI Core)" desc = "Allows for the construction of circuit boards used to build new AI cores." From 6e95fc4f1d29395545b967071ea9c0e82e68071a Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 06:12:21 -0500 Subject: [PATCH 3/4] better yet, let both apc module and disposal circuit be creatable in autolathe --- code/defines/obj/weapon.dm | 2 ++ code/game/machinery/autolathe.dm | 2 ++ code/game/machinery/constructable_frame.dm | 2 ++ code/modules/research/designs.dm | 9 --------- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index aea140d1dc9..6d829e5e35d 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1215,6 +1215,8 @@ name = "power control module" icon_state = "power_mod" desc = "Heavy-duty switching circuits for power control." + m_amt = 50 + g_amt = 50 /obj/item/weapon/module/id_auth name = "ID authentication module" diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index d01e0b90887..b0d4fca9418 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -236,6 +236,8 @@ var/global/list/autolathe_recipes = list( \ new /obj/item/clothing/head/helmet/welding(), \ new /obj/item/weapon/stock_parts/console_screen(), \ new /obj/item/weapon/airlock_electronics(), \ + new /obj/item/weapon/module/power_control(), \ + new /obj/item/weapon/circuitboard/disposal(), \ new /obj/item/stack/sheet/metal(), \ new /obj/item/stack/sheet/glass(), \ new /obj/item/stack/sheet/rglass(), \ diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index d5fd61c8620..ab538ee70cf 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -251,3 +251,5 @@ obj/item/weapon/circuitboard/rdserver req_components = list( "/obj/item/weapon/stock_parts/matter_bin" = 1, "/obj/item/weapon/cable_coil" = 1) + m_amt = 50 + g_amt = 50 \ No newline at end of file diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 6644f015db6..39d5fd07485 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -76,15 +76,6 @@ datum materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/weapon/circuitboard/security" - disposal - name = "Circuit Design (Disposal)" - desc = "Allows for the construction of circuit boards used to build disposal bins." - id = "disposal" - req_tech = list("engineering" = 2) - build_type = IMPRINTER - materials = list("$glass" = 2000, "acid" = 20) - build_path = "/obj/item/weapon/circuitboard/disposal" - aicore name = "Circuit Design (AI Core)" desc = "Allows for the construction of circuit boards used to build new AI cores." From 46520c3e571c31add503945aa6f2580e0ca6c47f Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 07:02:55 -0500 Subject: [PATCH 4/4] accidentally didn't allow a natural in piano, thought it sounded weird! --- code/game/magic/musician.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/magic/musician.dm b/code/game/magic/musician.dm index b85c161bb12..0d9d94e5572 100644 --- a/code/game/magic/musician.dm +++ b/code/game/magic/musician.dm @@ -392,7 +392,7 @@ for(var/i=2 to lentext(note)) var/ni = copytext(note,i,i+1) if(!text2num(ni)) - if(ni == "#" || ni == "b") + if(ni == "#" || ni == "b" || ni == "n") cur_acc[cur_note] = ni else if(ni == "s") cur_acc[cur_note] = "#" // so shift is never required