From e3e442e9b08933de30ccfbc6fd3e785ee2b65003 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 18:14:44 -0400 Subject: [PATCH 1/5] Infinite Frame Fixy Ports https://github.com/Citadel-Station-13/Citadel-Station-13-RP/pull/855 to fix runtimes for several machinery objects. --- code/game/machinery/doorbell_vr.dm | 5 ++-- code/game/machinery/exonet_node.dm | 4 ++- code/game/machinery/machinery.dm | 5 +++- code/modules/hydroponics/seed_machines.dm | 10 ++++--- code/modules/mining/drilling/drill.dm | 4 +-- code/modules/power/batteryrack.dm | 27 +++++++++---------- code/modules/power/tesla/coil.dm | 1 + .../TheFurryFeline - Infinite Frame Fixy.yml | 6 +++++ 8 files changed, 38 insertions(+), 24 deletions(-) create mode 100644 html/changelogs/TheFurryFeline - Infinite Frame Fixy.yml diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm index b23e490928..f4dceb0b8b 100644 --- a/code/game/machinery/doorbell_vr.dm +++ b/code/game/machinery/doorbell_vr.dm @@ -43,12 +43,13 @@ else icon_state = "dbchime-standby" +//TFF 3/6/19 - Port Cit RP fix of infinite frames. ToDo: Make it so that you can completely deconstruct it and reconstruct it. /obj/machinery/doorbell_chime/attackby(obj/item/W as obj, mob/user as mob) src.add_fingerprint(user) if(default_deconstruction_screwdriver(user, W)) return - else if(default_deconstruction_crowbar(user, W)) - return +// else if(default_deconstruction_crowbar(user, W)) //NOTICE: NO CIRCUITBOARD +// return else if(default_part_replacement(user, W)) return else if(panel_open && istype(W, /obj/item/device/multitool)) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 87eba96324..c9e11a133e 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -16,6 +16,9 @@ var/list/logs = list() // Gets written to by exonet's send_message() function. +//TFF 3/6/19 - Port Cit RP fix for infinite frames + circuit = /obj/item/weapon/circuitboard/telecomms/exonet_node + // Proc: New() // Parameters: None // Description: Adds components to the machine for deconstruction. @@ -23,7 +26,6 @@ ..() component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/telecomms/exonet_node(src) component_parts += new /obj/item/weapon/stock_parts/subspace/ansible(src) component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index f68bc4cc8a..b861742d90 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -329,7 +329,7 @@ Class Procs: return FALSE if(panel_open) return FALSE // Close panel first! - playsound(loc, W.usesound, 50, 1) + playsound(loc, W.usesound, 50, 1) var/actual_time = W.toolspeed * time if(actual_time != 0) user.visible_message( \ @@ -396,6 +396,9 @@ Class Procs: /obj/machinery/proc/dismantle() playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + //TFF 3/6/19 - port Cit RP fix of infinite frames. + if(!circuit) + return 0 var/obj/structure/frame/A = new /obj/structure/frame(src.loc) var/obj/item/weapon/circuitboard/M = circuit A.circuit = M diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index bc96f064c9..3818180086 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -94,10 +94,14 @@ user << "You load [W] into [src]." return - if(default_deconstruction_screwdriver(user, W)) - return - if(default_deconstruction_crowbar(user, W)) +//TFF 3/6/19 - fix infinite frame creation, ported from Cit RP + if(istype(W, /obj/item/weapon/wrench)) + playsound(src, W.usesound, 100, 1) + to_chat(user, "You [anchored ? "un" : ""]secure \the [src].") + anchored = !anchored return +// if(default_deconstruction_crowbar(user, W)) +// return if(istype(W,/obj/item/weapon/disk/botany)) if(loaded_disk) user << "There is already a data disk loaded." diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 99fe3f85ee..d3cc7e8b10 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -293,18 +293,18 @@ else usr << "You must move an ore box up to the drill before you can unload it." - +//TFF 25/5/19 - fix infinite frame issue /obj/machinery/mining/brace name = "mining drill brace" desc = "A machinery brace for an industrial drill. It looks easily two feet thick." icon_state = "mining_brace" + circuit = /obj/item/weapon/circuitboard/miningdrillbrace var/obj/machinery/mining/drill/connected /obj/machinery/mining/brace/New() ..() component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/miningdrillbrace(src) /obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob) if(connected && connected.active) diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 7bb37a5662..c6773ce168 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -74,26 +74,23 @@ /obj/machinery/power/smes/batteryrack/chargedisplay() return round(4 * charge/(capacity ? capacity : 5e6)) - +//TFF 3/6/19 - Port Cit RP fix for infinite frames /obj/machinery/power/smes/batteryrack/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. ..() //SMES attackby for now handles screwdriver, cable coils and wirecutters, no need to repeat that here if(open_hatch) if(istype(W, /obj/item/weapon/crowbar)) - if (charge < (capacity / 100)) - if (!output_attempt && !input_attempt) - playsound(src, W.usesound, 50, 1) - var/obj/structure/frame/M = new /obj/structure/frame(src.loc) - M.frame_type = "machine" - M.state = 2 - M.icon_state = "machine_1" - for(var/obj/I in component_parts) - I.loc = src.loc - qdel(src) - return 1 - else - user << "Turn off the [src] before dismantling it." + if(charge < (capacity/100)) + if (output_attempt || input_attempt) + to_chat(user, "Turn off \the [src] before dismantling it.") + return + if(terminal) + to_chat(user, "You have to disassemble the terminal first!") + return + return dismantle() else - user << "Better let [src] discharge before dismantling it." + to_chat(user, "Better let \the [src] discharge before dismantling it.") + return + else if ((istype(W, /obj/item/weapon/stock_parts/capacitor) && (capacitors_amount < 5)) || (istype(W, /obj/item/weapon/cell) && (cells_amount < 5))) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 07dedf5b2b..611e37c8f8 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -102,6 +102,7 @@ can_buckle = TRUE buckle_lying = FALSE + circuit = /obj/item/weapon/circuitboard/grounding_rod /obj/machinery/power/grounding_rod/update_icon() if(panel_open) diff --git a/html/changelogs/TheFurryFeline - Infinite Frame Fixy.yml b/html/changelogs/TheFurryFeline - Infinite Frame Fixy.yml new file mode 100644 index 0000000000..d82bd658c7 --- /dev/null +++ b/html/changelogs/TheFurryFeline - Infinite Frame Fixy.yml @@ -0,0 +1,6 @@ +author: TheFurryFeline + +delete-after: True + +changes: + - bugfix: "Fixes infinite frame production for mining drill braces and doorbell chimes and other machines. If there's no available circuit board to get, then don't return anything when attempting deconstruction. Ported from Cit RP. Eliminates 'Cannot read null.board_type' runtimes where they apply." From 745420a6e0e6d134a4d186cdd870e042ec27f0a7 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 18:31:31 -0400 Subject: [PATCH 2/5] CL Additions and Adjustments On the tin. Catches up with the current list of recent PRs. --- .../Razgriz1032 - Disabled Space Dust event.yml | 7 +++++++ html/changelogs/Razgriz1032 - Engineering cycler.yml | 2 +- .../changelogs/Razgriz1032 - New Shadekin - Rakshasa.yml | 9 +++++++++ html/changelogs/Razgriz1032 - Suit Cycler Stats.yml | 2 +- html/changelogs/WheatleytheOwl - Anno shadekin.yml | 7 +++++++ 5 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/Razgriz1032 - Disabled Space Dust event.yml create mode 100644 html/changelogs/Razgriz1032 - New Shadekin - Rakshasa.yml create mode 100644 html/changelogs/WheatleytheOwl - Anno shadekin.yml diff --git a/html/changelogs/Razgriz1032 - Disabled Space Dust event.yml b/html/changelogs/Razgriz1032 - Disabled Space Dust event.yml new file mode 100644 index 0000000000..e235abc363 --- /dev/null +++ b/html/changelogs/Razgriz1032 - Disabled Space Dust event.yml @@ -0,0 +1,7 @@ +author: Razgriz1032 + + +delete-after: True + +changes: + - tweak: "All it did was spawn a bunch of spinny, yet inert, rocks in dead space. They did nothing." \ No newline at end of file diff --git a/html/changelogs/Razgriz1032 - Engineering cycler.yml b/html/changelogs/Razgriz1032 - Engineering cycler.yml index 34f540606b..b6e1764e58 100644 --- a/html/changelogs/Razgriz1032 - Engineering cycler.yml +++ b/html/changelogs/Razgriz1032 - Engineering cycler.yml @@ -4,4 +4,4 @@ delete-after: True changes: - - tweak: "Engineering cycler in engineering outpost." + - maptweak: "Engineering cycler in engineering outpost." diff --git a/html/changelogs/Razgriz1032 - New Shadekin - Rakshasa.yml b/html/changelogs/Razgriz1032 - New Shadekin - Rakshasa.yml new file mode 100644 index 0000000000..c7a0b99e0f --- /dev/null +++ b/html/changelogs/Razgriz1032 - New Shadekin - Rakshasa.yml @@ -0,0 +1,9 @@ +author: Razgriz1032 + +delete-after: True + +changes: + + - rscadd: "Adds new Shadekin to selectable custom list." + - tweak: "Fixes ignored indentation issues." + - imageadd: "New Shadekin sprites added: Rakshasa." diff --git a/html/changelogs/Razgriz1032 - Suit Cycler Stats.yml b/html/changelogs/Razgriz1032 - Suit Cycler Stats.yml index ca1b328ec0..756d46d192 100644 --- a/html/changelogs/Razgriz1032 - Suit Cycler Stats.yml +++ b/html/changelogs/Razgriz1032 - Suit Cycler Stats.yml @@ -4,4 +4,4 @@ author: Razgriz1032 delete-after: True changes: - - rscadd: "Suit Cycler now applies the proper armor, descriptions, and temperature protection stats to all of the engineering and medical suits." \ No newline at end of file + - tweak: "Suit Cycler now applies the proper armor, descriptions, and temperature protection stats to all of the engineering and medical suits." \ No newline at end of file diff --git a/html/changelogs/WheatleytheOwl - Anno shadekin.yml b/html/changelogs/WheatleytheOwl - Anno shadekin.yml new file mode 100644 index 0000000000..59f933b9c3 --- /dev/null +++ b/html/changelogs/WheatleytheOwl - Anno shadekin.yml @@ -0,0 +1,7 @@ +author: WheatleytheOwl + +delete-after: True + +changes: + + - imageadd: "Adds my own shadekin's sprites to the DMI. Sharkmare did the coding, StormyRange did the sprites." From 633321a55a8ab5c677761b927dc724d16e8553dd Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 18:42:24 -0400 Subject: [PATCH 3/5] Missed a Comment --- code/modules/power/tesla/coil.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 611e37c8f8..569ad6e3eb 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -100,6 +100,7 @@ anchored = FALSE density = TRUE +//TFF 3/6/19 - Port Cit RP fix for infinite frames can_buckle = TRUE buckle_lying = FALSE circuit = /obj/item/weapon/circuitboard/grounding_rod From 74e83772f0fa66b472f8e562006555bc07b56715 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 19:19:11 -0400 Subject: [PATCH 4/5] Copy-Pasta Fix --- code/modules/hydroponics/seed_machines.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 3818180086..5f67fa077f 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -95,6 +95,8 @@ return //TFF 3/6/19 - fix infinite frame creation, ported from Cit RP + if(default_deconstruction_screwdriver(user, W)) + return if(istype(W, /obj/item/weapon/wrench)) playsound(src, W.usesound, 100, 1) to_chat(user, "You [anchored ? "un" : ""]secure \the [src].") From 83f7801c16f7bebdb6dd01bc9d1b3580c931ede2 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 19:59:53 -0400 Subject: [PATCH 5/5] Revert Changes Perma runtime with this thing if wires are added into a battery rack to make a terminal. Reverting changes to the file. --- code/modules/power/batteryrack.dm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index c6773ce168..7bb37a5662 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -74,23 +74,26 @@ /obj/machinery/power/smes/batteryrack/chargedisplay() return round(4 * charge/(capacity ? capacity : 5e6)) -//TFF 3/6/19 - Port Cit RP fix for infinite frames + /obj/machinery/power/smes/batteryrack/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. ..() //SMES attackby for now handles screwdriver, cable coils and wirecutters, no need to repeat that here if(open_hatch) if(istype(W, /obj/item/weapon/crowbar)) - if(charge < (capacity/100)) - if (output_attempt || input_attempt) - to_chat(user, "Turn off \the [src] before dismantling it.") - return - if(terminal) - to_chat(user, "You have to disassemble the terminal first!") - return - return dismantle() + if (charge < (capacity / 100)) + if (!output_attempt && !input_attempt) + playsound(src, W.usesound, 50, 1) + var/obj/structure/frame/M = new /obj/structure/frame(src.loc) + M.frame_type = "machine" + M.state = 2 + M.icon_state = "machine_1" + for(var/obj/I in component_parts) + I.loc = src.loc + qdel(src) + return 1 + else + user << "Turn off the [src] before dismantling it." else - to_chat(user, "Better let \the [src] discharge before dismantling it.") - return - + user << "Better let [src] discharge before dismantling it." else if ((istype(W, /obj/item/weapon/stock_parts/capacitor) && (capacitors_amount < 5)) || (istype(W, /obj/item/weapon/cell) && (cells_amount < 5))) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt)