Skip to content

Commit

Permalink
implements PR shiptest-ss13#2977 heater layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Thera-Pissed committed May 28, 2024
1 parent 6f7fa4f commit 0a39c7d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/game/machinery/shuttle/shuttle_heater.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,14 @@
layer = OBJ_LAYER
showpipe = TRUE

pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
pipe_flags = PIPING_ONE_PER_TURF

/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/on_construction(obj_color, set_layer)
var/obj/item/circuitboard/machine/shuttle/fire_heater/board = circuit
if(board)
piping_layer = board.pipe_layer
set_layer = piping_layer
..()

/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/New()
. = ..()
Expand Down
12 changes: 12 additions & 0 deletions code/game/objects/items/circuitboards/machine_circuitboards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1508,12 +1508,24 @@

/obj/item/circuitboard/machine/shuttle/fire_heater
name = "Combustion Engine Heater (Machine Board)"
desc = "You can use mulitool to switch pipe layers"
var/pipe_layer = PIPING_LAYER_DEFAULT
build_path = /obj/machinery/atmospherics/components/unary/shuttle/fire_heater
req_components = list(
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stock_parts/matter_bin = 1
)

/obj/item/circuitboard/machine/shuttle/fire_heater/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_MULTITOOL)
pipe_layer = (pipe_layer >= PIPING_LAYER_MAX) ? PIPING_LAYER_MIN : (pipe_layer + 1)
to_chat(user, "<span class='notice'>You change the circuitboard to layer [pipe_layer].</span>")
return

/obj/item/circuitboard/machine/shuttle/fire_heater/examine()
. = ..()
. += "<span class='notice'>It is set to layer [pipe_layer].</span>"

/obj/item/circuitboard/machine/shuttle/smes
name = "Electric Engine Precharger (Machine Board)"
build_path = /obj/machinery/power/smes/shuttle
Expand Down

0 comments on commit 0a39c7d

Please sign in to comment.