Files
Bubberstation/code/modules/atmospherics/machinery/components/binary_devices/binary_devices.dm
Roxy 023c4116ee Allow binary atmos devices to be renamed with a pen (#88522)
## About The Pull Request

Add `UNIQUE_RENAME` flag to binary devices (pumps, valves, etc.) so you
can rename them with a pen. Add a check to
`/obj/machinery/atmospherics/update_name` to accommodate this.

## Why It's Good For The Game

On a lot of maps the roundstart atmos pumps are labelled and if you end
up swapping them you lose that. Also sometimes you just want to label
your inscrutable atmos setup and while you can use a hand labeller it's
kind of ugly.

## Changelog

🆑
qol: Atmos devices like valves and pumps can now be renamed with a pen.
/🆑
2024-12-21 02:47:51 -08:00

33 lines
1011 B
Plaintext

/obj/machinery/atmospherics/components/binary
icon = 'icons/obj/machines/atmospherics/binary_devices.dmi'
dir = SOUTH
initialize_directions = SOUTH|NORTH
use_power = IDLE_POWER_USE
idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION * 0.25
device_type = BINARY
layer = GAS_PUMP_LAYER
pipe_flags = PIPING_BRIDGE
obj_flags = parent_type::obj_flags | UNIQUE_RENAME
/obj/machinery/atmospherics/components/binary/set_init_directions()
switch(dir)
if(NORTH, SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST, WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/components/binary/get_node_connects()
return list(REVERSE_DIR(dir), dir)
/**
* Used by binary devices to set what the offset will be for each layer, called in update_icon_nopipes()
* Arguments:
* * -pipe_layer: is the pipe layer the component should be set to
*/
/obj/machinery/atmospherics/components/binary/proc/set_overlay_offset(pipe_layer)
switch(pipe_layer)
if(1, 3, 5)
return 1
if(2, 4)
return 2