Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose layers for circulator and engine heater #2977

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -25,7 +25,7 @@
layer = OBJ_LAYER
showpipe = TRUE

pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
pipe_flags = PIPING_ONE_PER_TURF

var/efficiency_multiplier = 1
var/gas_capacity = 0
Expand All @@ -34,6 +34,13 @@
///The internals tank to draw from
var/obj/item/tank/fuel_tank

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

/obj/machinery/atmospherics/components/unary/shuttle/heater/New()
. = ..()
SetInitDirections()
Expand Down
23 changes: 23 additions & 0 deletions code/game/objects/items/circuitboards/machine_circuitboards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,19 @@
name = "Circulator/Heat Exchanger (Machine Board)"
icon_state = "engineering"
build_path = /obj/machinery/atmospherics/components/binary/circulator
var/pipe_layer = PIPING_LAYER_DEFAULT
req_components = list()

/obj/item/circuitboard/machine/circulator/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/circulator/examine()
. = ..()
. += "<span class='notice'>It is set to layer [pipe_layer].</span>"

/obj/item/circuitboard/machine/emitter
name = "Emitter (Machine Board)"
icon_state = "engineering"
Expand Down Expand Up @@ -1470,10 +1481,22 @@

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

/obj/item/circuitboard/machine/shuttle/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/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
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@
var/active = FALSE

var/last_pressure_delta = 0
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
pipe_flags = PIPING_ONE_PER_TURF

var/flipped = 0
var/mode = CIRCULATOR_HOT
var/obj/machinery/power/generator/generator

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

//for mappers
/obj/machinery/atmospherics/components/binary/circulator/cold
mode = CIRCULATOR_COLD
Expand Down
Loading