diff --git a/code/game/objects/items/weapons/circuitboards/machinery/power.dm b/code/game/objects/items/weapons/circuitboards/machinery/power.dm index 57d8822df6..6242335bed 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/power.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/power.dm @@ -29,3 +29,13 @@ board_type = new /datum/frame/frame_types/machine origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3) req_components = list(/obj/item/weapon/stock_parts/capacitor = 3, /obj/item/stack/cable_coil = 10) + +/obj/item/weapon/circuitboard/breakerbox + name = T_BOARD("breaker box") + build_path = /obj/machinery/power/breakerbox + board_type = new /datum/frame/frame_types/machine + origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3) + req_components = list( + /obj/item/weapon/stock_parts/spring = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/stack/cable_coil = 10) diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index 5042043aec..2e7903c38e 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -13,6 +13,7 @@ var/icon_state_off = "bbox_off" density = 1 anchored = 1 + circuit = /obj/item/weapon/circuitboard/breakerbox var/on = 0 var/busy = 0 var/directions = list(1,2,4,8,5,6,9,10) @@ -20,15 +21,22 @@ var/update_locked = 0 /obj/machinery/power/breakerbox/Destroy() + for(var/obj/structure/cable/C in src.loc) + qdel(C) . = ..() for(var/datum/nano_module/rcon/R in world) R.FindDevices() +/obj/machinery/power/breakerbox/initialize() + . = ..() + default_apply_parts() + /obj/machinery/power/breakerbox/activated icon_state = "bbox_on" - // Enabled on server startup. Used in substations to keep them in bypass mode. +// Enabled on server startup. Used in substations to keep them in bypass mode. /obj/machinery/power/breakerbox/activated/initialize() + . = ..() set_state(1) /obj/machinery/power/breakerbox/examine(mob/user) @@ -87,10 +95,15 @@ if(newtag) RCon_tag = newtag user << "You changed the RCON tag to: [newtag]" - - - - + if(on) + to_chat(user, "Disable the breaker before performing maintenance.") + return + if(default_deconstruction_screwdriver(user, W)) + return + if(default_deconstruction_crowbar(user, W)) + return + if(default_part_replacement(user, W)) + return /obj/machinery/power/breakerbox/proc/set_state(var/state) on = state diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index d33098381b..dc4401f0bc 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1229,6 +1229,14 @@ CIRCUITS BELOW build_path = /obj/item/weapon/circuitboard/grid_checker sort_string = "JBABC" +/datum/design/circuit/breakerbox + name = "breaker box" + desc = "Allows for the construction of circuit boards used to build a breaker box." + id = "breakerbox" + req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3) + build_path = /obj/item/weapon/circuitboard/breakerbox + sort_string = "JBABD" + /datum/design/circuit/gas_heater name = "gas heating system" id = "gasheater" diff --git a/html/changelogs/Leshana-breakerbox.yml b/html/changelogs/Leshana-breakerbox.yml new file mode 100644 index 0000000000..d585da1457 --- /dev/null +++ b/html/changelogs/Leshana-breakerbox.yml @@ -0,0 +1,4 @@ +author: Leshana +delete-after: True +changes: + - rscadd: "Breaker boxes can be constructed in game."