Large Tank Marker (#18801)

* tt

* 2

* www

* h

* c

* c

* 4

---------

Co-authored-by: DreamySkrell <>
This commit is contained in:
DreamySkrell
2024-04-01 14:45:14 +00:00
committed by GitHub
co-authored by DreamySkrell <>
parent 40b0469355
commit 91974cf2f8
12 changed files with 186 additions and 110 deletions
@@ -57,9 +57,10 @@
/obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0
frequency = 1441
/obj/machinery/atmospherics/unary/vent_pump/siphon/atmos
icon_state = "map_vent_in"
icon_state = "map_vent"
external_pressure_bound = 0
external_pressure_bound_default = 0
internal_pressure_bound = PRESSURE_ONE_THOUSAND * 2
@@ -1,10 +1,14 @@
#define AIRLOCK_MARKER_TAG_MASTER "[master_tag]"
#define AIRLOCK_MARKER_TAG_SENSOR_CHAMBER "[master_tag]_sensor_chamber"
#define AIRLOCK_MARKER_TAG_SENSOR_INTERIOR "[master_tag]_sensor_interior"
#define AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR "[master_tag]_sensor_exterior"
#define AIRLOCK_MARKER_TAG_DOOR_EXTERIOR "[master_tag]_door_exterior"
#define AIRLOCK_MARKER_TAG_DOOR_INTERIOR "[master_tag]_door_interior"
#define AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER "[master_tag]_airpump_chamber"
#define AIRLOCK_MARKER_TAG_AIRPUMP_OUT_EXTERNAL "[master_tag]_pump_out_external"
#define AIRLOCK_MARKER_TAG_AIRPUMP_OUT_INTERNAL "[master_tag]_pump_out_internal"
#define MARKER_AIRLOCK_TAG_MASTER "[master_tag]"
#define MARKER_AIRLOCK_TAG_SENSOR_CHAMBER "[master_tag]_sensor_chamber"
#define MARKER_AIRLOCK_TAG_SENSOR_INTERIOR "[master_tag]_sensor_interior"
#define MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR "[master_tag]_sensor_exterior"
#define MARKER_AIRLOCK_TAG_DOOR_EXTERIOR "[master_tag]_door_exterior"
#define MARKER_AIRLOCK_TAG_DOOR_INTERIOR "[master_tag]_door_interior"
#define MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER "[master_tag]_airpump_chamber"
#define MARKER_AIRLOCK_TAG_AIRPUMP_OUT_EXTERNAL "[master_tag]_pump_out_external"
#define MARKER_AIRLOCK_TAG_AIRPUMP_OUT_INTERNAL "[master_tag]_pump_out_internal"
#define MARKER_LARGE_TANK_TAG_SENSOR "[master_tag]_sensor"
#define MARKER_LARGE_TANK_TAG_INJECTOR "[master_tag]_sensor_injector"
#define MARKER_LARGE_TANK_TAG_PUMP "[master_tag]_sensor_pump"
@@ -0,0 +1,4 @@
/obj/effect/map_effect/marker
name = "map marker parent abstract object"
icon = 'icons/effects/map_effects.dmi'
icon_state = "marker_base"
@@ -1,7 +1,3 @@
/obj/effect/map_effect/marker
name = "map marker parent abstract object"
icon = 'icons/effects/map_effects.dmi'
icon_state = "marker_base"
/// Airlock marker that, when placed above airlock components, actually sets them up to make it functional.
/// This is a simple exterior access airlock, not used for docking.
@@ -53,12 +49,12 @@
if(istype(controller))
// common controller vars
controller.set_frequency(frequency)
controller.id_tag = AIRLOCK_MARKER_TAG_MASTER
controller.tag_airpump = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
controller.tag_interior_door = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
controller.id_tag = MARKER_AIRLOCK_TAG_MASTER
controller.tag_airpump = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
controller.tag_interior_door = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
controller.cycle_to_external_air = cycle_to_external_air
controller.req_access = req_access
controller.req_one_access = req_one_access
@@ -75,21 +71,21 @@
door.req_one_access = req_one_access
door.lock()
if(is_interior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
else if(is_exterior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
continue
var/obj/machinery/airlock_sensor/sensor = thing
if(istype(sensor))
sensor.set_frequency(frequency)
sensor.master_tag = AIRLOCK_MARKER_TAG_MASTER
sensor.master_tag = MARKER_AIRLOCK_TAG_MASTER
if(is_interior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_INTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_INTERIOR
else if(is_exterior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
else
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
continue
var/obj/machinery/atmospherics/unary/vent_pump/pump = thing
@@ -98,17 +94,17 @@
unregister_radio(pump, frequency)
pump.setup_radio()
if(is_exterior)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_EXTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_EXTERNAL
else if(is_out)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_INTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_INTERNAL
else
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
continue
var/obj/machinery/access_button/button = thing
if(istype(button))
button.set_frequency(frequency)
button.master_tag = AIRLOCK_MARKER_TAG_MASTER
button.master_tag = MARKER_AIRLOCK_TAG_MASTER
button.req_access = req_access
button.req_one_access = req_one_access
if(is_interior)
@@ -41,12 +41,12 @@
if(istype(controller))
// common controller vars
controller.set_frequency(frequency)
controller.id_tag = AIRLOCK_MARKER_TAG_MASTER
controller.tag_airpump = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
controller.tag_interior_door = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
controller.id_tag = MARKER_AIRLOCK_TAG_MASTER
controller.tag_airpump = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
controller.tag_interior_door = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
controller.cycle_to_external_air = cycle_to_external_air
controller.req_access = req_access
controller.req_one_access = req_one_access
@@ -56,13 +56,13 @@
controller.program = controller.docking_program
if(SSshuttle.registered_shuttle_landmarks[landmark_tag])
var/obj/effect/shuttle_landmark/landmark = SSshuttle.registered_shuttle_landmarks[landmark_tag]
landmark.docking_controller = SSshuttle.docking_registry[AIRLOCK_MARKER_TAG_MASTER]
landmark.docking_controller = SSshuttle.docking_registry[MARKER_AIRLOCK_TAG_MASTER]
continue
var/obj/effect/shuttle_landmark/landmark = thing
if(istype(landmark))
if(SSshuttle.docking_registry[AIRLOCK_MARKER_TAG_MASTER])
landmark.docking_controller = SSshuttle.docking_registry[AIRLOCK_MARKER_TAG_MASTER]
if(SSshuttle.docking_registry[MARKER_AIRLOCK_TAG_MASTER])
landmark.docking_controller = SSshuttle.docking_registry[MARKER_AIRLOCK_TAG_MASTER]
continue
// and all the other airlock components
@@ -74,21 +74,21 @@
door.req_one_access = req_one_access
door.lock()
if(is_interior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
else if(is_exterior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
continue
var/obj/machinery/airlock_sensor/sensor = thing
if(istype(sensor))
sensor.set_frequency(frequency)
sensor.master_tag = AIRLOCK_MARKER_TAG_MASTER
sensor.master_tag = MARKER_AIRLOCK_TAG_MASTER
if(is_interior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_INTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_INTERIOR
else if(is_exterior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
else
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
continue
var/obj/machinery/atmospherics/unary/vent_pump/pump = thing
@@ -97,17 +97,17 @@
unregister_radio(pump, frequency)
pump.setup_radio()
if(is_exterior)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_EXTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_EXTERNAL
else if(is_out)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_INTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_INTERNAL
else
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
continue
var/obj/machinery/access_button/button = thing
if(istype(button))
button.set_frequency(frequency)
button.master_tag = AIRLOCK_MARKER_TAG_MASTER
button.master_tag = MARKER_AIRLOCK_TAG_MASTER
button.req_access = req_access
button.req_one_access = req_one_access
if(is_interior)
@@ -41,12 +41,12 @@
if(istype(controller))
// common controller vars
controller.set_frequency(frequency)
controller.id_tag = AIRLOCK_MARKER_TAG_MASTER
controller.tag_airpump = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
controller.tag_interior_door = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
controller.id_tag = MARKER_AIRLOCK_TAG_MASTER
controller.tag_airpump = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
controller.tag_chamber_sensor = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
controller.tag_exterior_sensor = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
controller.tag_exterior_door = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
controller.tag_interior_door = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
controller.cycle_to_external_air = cycle_to_external_air
controller.req_access = req_access
controller.req_one_access = req_one_access
@@ -56,7 +56,7 @@
controller.program = controller.docking_program
if(SSshuttle.shuttles[shuttle_tag])
var/datum/shuttle/autodock/shuttle = SSshuttle.shuttles[shuttle_tag]
shuttle.dock_target = AIRLOCK_MARKER_TAG_MASTER
shuttle.dock_target = MARKER_AIRLOCK_TAG_MASTER
continue
// and all the other airlock components
@@ -68,21 +68,21 @@
door.req_one_access = req_one_access
door.lock()
if(is_interior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_INTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_INTERIOR
else if(is_exterior)
door.id_tag = AIRLOCK_MARKER_TAG_DOOR_EXTERIOR
door.id_tag = MARKER_AIRLOCK_TAG_DOOR_EXTERIOR
continue
var/obj/machinery/airlock_sensor/sensor = thing
if(istype(sensor))
sensor.set_frequency(frequency)
sensor.master_tag = AIRLOCK_MARKER_TAG_MASTER
sensor.master_tag = MARKER_AIRLOCK_TAG_MASTER
if(is_interior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_INTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_INTERIOR
else if(is_exterior)
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_EXTERIOR
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_EXTERIOR
else
sensor.id_tag = AIRLOCK_MARKER_TAG_SENSOR_CHAMBER
sensor.id_tag = MARKER_AIRLOCK_TAG_SENSOR_CHAMBER
continue
var/obj/machinery/atmospherics/unary/vent_pump/pump = thing
@@ -91,17 +91,17 @@
unregister_radio(pump, frequency)
pump.setup_radio()
if(is_exterior)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_EXTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_EXTERNAL
else if(is_out)
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_OUT_INTERNAL
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_OUT_INTERNAL
else
pump.id_tag = AIRLOCK_MARKER_TAG_AIRPUMP_CHAMBER
pump.id_tag = MARKER_AIRLOCK_TAG_AIRPUMP_CHAMBER
continue
var/obj/machinery/access_button/button = thing
if(istype(button))
button.set_frequency(frequency)
button.master_tag = AIRLOCK_MARKER_TAG_MASTER
button.master_tag = MARKER_AIRLOCK_TAG_MASTER
button.req_access = req_access
button.req_one_access = req_one_access
if(is_interior)
@@ -0,0 +1,58 @@
/// Large tank marker, used to set up "large tanks", that being multi-tile tanks of gas,
/// with its own control console, sensor, pump, and injector.
/obj/effect/map_effect/marker/large_tank
name = "large tank marker"
desc = "See comments/documentation in code."
icon = 'icons/effects/map_effects.dmi'
icon_state = "marker_large_tank"
layer = LIGHTING_LAYER
/// Radio frequency of this large tank.
var/frequency = 2199
/// Unique tag for this large tank. Not visible in game and to the player. Do not leave this as null.
/// THIS MUST BE UNIQUE FOR THE LARGE TANK. Every marker in one large tank should have the same `master_tag`.
/// Different large tanks, even on different maps, cannot share the same `master_tag`.
var/master_tag = null
/obj/effect/map_effect/marker/large_tank/Initialize(mapload, ...)
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/map_effect/marker/large_tank/LateInitialize()
if(!master_tag || !frequency)
return
// iterate over components under this marker
// and actually set them up
for(var/thing in loc)
// set up the control console
var/obj/machinery/computer/general_air_control/large_tank_control/control = thing
if(istype(control))
control.set_frequency(frequency)
control.input_tag = MARKER_LARGE_TANK_TAG_INJECTOR
control.output_tag = MARKER_LARGE_TANK_TAG_PUMP
control.sensors = list(MARKER_LARGE_TANK_TAG_SENSOR="Tank")
continue
// and all the other components
var/obj/machinery/air_sensor/sensor = thing
if(istype(sensor))
sensor.set_frequency(frequency)
sensor.id_tag = MARKER_LARGE_TANK_TAG_SENSOR
continue
var/obj/machinery/atmospherics/unary/outlet_injector/injector = thing
if(istype(injector))
injector.set_frequency(frequency)
injector.id = MARKER_LARGE_TANK_TAG_INJECTOR
continue
var/obj/machinery/atmospherics/unary/vent_pump/pump = thing
if(istype(pump))
pump.frequency = frequency
pump.id_tag = MARKER_LARGE_TANK_TAG_PUMP
pump.setup_radio()
continue