Airlock markers (#17636)

* a

* huhhhh

* freq

* 5

* guidelines

* spawner begone

* c

* cccccccccccccccccc

* myugfkuyfk6uydetkyu

* o

* huhhhhhhhhhhhhhhhhhhhhhhhhh

* Update code/modules/effects/map_effects/airlock_marker.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/effects/map_effects/airlock_marker.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/effects/map_effects/airlock_marker.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/effects/map_effects/airlock_marker.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* refactor.

* comment

* else if

* oops

---------

Co-authored-by: DreamySkrell <>
Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
DreamySkrell
2023-10-27 07:48:25 +00:00
committed by GitHub
co-authored by Fluffy DreamySkrell <>
parent 1abfbf5f83
commit ad0fe2cf3a
8 changed files with 7434 additions and 61 deletions
+1
View File
@@ -1928,6 +1928,7 @@
#include "code\modules\effects\ion_trail_follow.dm"
#include "code\modules\effects\shuttle_landing_warning.dm"
#include "code\modules\effects\visual_effect.dm"
#include "code\modules\effects\map_effects\airlock_marker.dm"
#include "code\modules\effects\map_effects\airlock_spawner.dm"
#include "code\modules\effects\map_effects\beam_point.dm"
#include "code\modules\effects\map_effects\door_helper.dm"
@@ -0,0 +1,121 @@
/obj/effect/map_effect/marker
name = "map marker parent abstract object"
icon = 'icons/effects/map_effects.dmi'
icon_state = "map_marker"
/obj/effect/map_effect/marker_helper
name = "map marker helper parent abstract object"
icon = 'icons/effects/map_effects.dmi'
icon_state = "map_marker"
/// Airlock marker that, when placed above airlock components (doors, pumps, sensors, etc),
/// actually sets the airlock up to make it functional.
/obj/effect/map_effect/marker/airlock
name = "airlock marker (inside the airlock)"
desc = "MASTER_TAG VAR MUST BE UNIQUE FOR THE AIRLOCK! Place this on top of airlock components (doors, pumps, sensors, etc)."
icon = 'icons/effects/map_effects.dmi'
icon_state = "airlock_marker"
layer = LIGHTING_LAYER
/// Radio frequency of this airlock.
var/frequency = 2137
/// Unique tag for this airlock. Not visible in game and to the player. Do not leave this as null.
/// THIS MUST BE UNIQUE FOR THE AIRLOCK. Every marker in one airlock should have the same `master_tag`.
/// But different airlocks, even on different maps, cannot share the same `master_tag`.
var/master_tag = null
/// Doors/buttons/etc will be set to this access requirement. If null, they will not have any access requirements.
var/required_access = list(access_external_airlocks)
/// Specialization helper for the airlock marker, to be put above "exterior" parts of the airlock,
/// and on top of the actual airlock marker. By itself does nothing.
/obj/effect/map_effect/marker_helper/airlock/exterior
name = "airlock marker (exterior/outside/vacuum)"
icon = 'icons/effects/map_effects.dmi'
icon_state = "airlock_marker_exterior"
layer = LIGHTING_LAYER
/// Specialization helper for the airlock marker, to be put above "interior" parts of the airlock,
/// and on top of the actual airlock marker. By itself does nothing.
/obj/effect/map_effect/marker_helper/airlock/interior
name = "airlock marker (interior/inside/pressurized)"
icon = 'icons/effects/map_effects.dmi'
icon_state = "airlock_marker_interior"
layer = LIGHTING_LAYER
/obj/effect/map_effect/marker/airlock/Initialize(mapload, ...)
..()
return INITIALIZE_HINT_LATELOAD
#define MASTER_TAG "[master_tag]_controller"
#define AIRPUMP_TAG "[master_tag]_pump"
#define SENSOR_TAG "[master_tag]_sensor"
#define EXTERIOR_DOOR_TAG "[master_tag]_outer"
#define INTERIOR_DOOR_TAG "[master_tag]_inner"
/obj/effect/map_effect/marker/airlock/LateInitialize()
if(!master_tag || !frequency)
return
var/is_interior = locate(/obj/effect/map_effect/marker_helper/airlock/interior) in loc
var/is_exterior = locate(/obj/effect/map_effect/marker_helper/airlock/exterior) in loc
// iterate over airlock components under this marker
// and actually set them up
for(var/thing in loc)
var/obj/machinery/embedded_controller/radio/airlock/airlock_controller/airlock_controller = thing
if(istype(airlock_controller))
airlock_controller.set_frequency(frequency)
airlock_controller.id_tag = MASTER_TAG
airlock_controller.tag_airpump = AIRPUMP_TAG
airlock_controller.tag_chamber_sensor = SENSOR_TAG
airlock_controller.tag_exterior_door = EXTERIOR_DOOR_TAG
airlock_controller.tag_interior_door = INTERIOR_DOOR_TAG
airlock_controller.req_access = required_access
airlock_controller.program = new /datum/computer/file/embedded_program/airlock(airlock_controller)
continue
var/obj/machinery/door/airlock/door = thing
if(istype(door))
door.set_frequency(frequency)
door.req_access = required_access
door.lock()
if(is_interior)
door.id_tag = INTERIOR_DOOR_TAG
else if(is_exterior)
door.id_tag = EXTERIOR_DOOR_TAG
continue
var/obj/machinery/airlock_sensor/sensor = thing
if(istype(sensor))
sensor.set_frequency(frequency)
sensor.id_tag = SENSOR_TAG
sensor.master_tag = MASTER_TAG
continue
var/obj/machinery/atmospherics/unary/vent_pump/pump = thing
if(istype(pump))
pump.frequency = frequency
unregister_radio(pump, frequency)
pump.setup_radio()
pump.id_tag = AIRPUMP_TAG
continue
var/obj/machinery/access_button/button = thing
if(istype(button))
button.set_frequency(frequency)
button.master_tag = MASTER_TAG
button.req_access = required_access
if(is_interior)
button.command = "cycle_interior"
else if(is_exterior)
button.command = "cycle_exterior"
continue
#undef MASTER_TAG
#undef AIRPUMP_TAG
#undef SENSOR_TAG
#undef EXTERIOR_DOOR_TAG
#undef INTERIOR_DOOR_TAG
@@ -0,0 +1,44 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: DreamySkrell
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds airlock marker system, allowing a easy and flexible way to set up airlocks, and to be used instead of airlock spawners."
- rscadd: "Adds airlock guidelines helper map."
- maptweak: "Maps in a proper working airlock to the runtime, that uses airlock markers."
- refactor: "Deprecates airlock spawners."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 96 KiB

File diff suppressed because it is too large Load Diff
+239 -54
View File
@@ -1408,6 +1408,20 @@
/obj/effect/landmark/force_spawnpoint,
/turf/simulated/floor/plating,
/area/construction)
"dB" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume{
dir = 4
},
/obj/machinery/airlock_sensor{
pixel_x = -20;
dir = 4
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"dC" = (
/obj/machinery/light{
brightness_range = 16;
@@ -1445,6 +1459,17 @@
/obj/machinery/computer/shuttle_control/explore/runtime,
/turf/simulated/floor/shuttle,
/area/shuttle/runtime)
"fH" = (
/obj/machinery/door/airlock/glass{
dir = 1
},
/turf/simulated/floor/tiled/dark,
/area/engineering/gravity_gen)
"fV" = (
/obj/machinery/atmospherics/portables_connector,
/obj/machinery/portable_atmospherics/canister/air/airlock,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"fX" = (
/turf/template_noop,
/area/space)
@@ -1564,6 +1589,21 @@
/obj/machinery/atmospherics/pipe/zpipe/up/supply,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"qk" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume/aux{
dir = 8
},
/obj/machinery/embedded_controller/radio/airlock/airlock_controller{
dir = 8;
pixel_y = 0;
pixel_x = 20
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"qx" = (
/obj/effect/landmark/entry_point/aft,
/turf/simulated/wall/r_wall,
@@ -1572,6 +1612,21 @@
/obj/machinery/computer/ship/sensors/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"sU" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 9
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"sY" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 5
},
/obj/machinery/atmospherics/pipe/simple/hidden/aux{
dir = 9
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"tr" = (
/obj/machinery/alarm/south,
/turf/simulated/floor/tiled,
@@ -1600,6 +1655,12 @@
},
/turf/simulated/floor/tiled,
/area/hallway/secondary/entry)
"vl" = (
/obj/machinery/atmospherics/pipe/simple/hidden/aux{
dir = 4
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"vm" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
@@ -1609,6 +1670,21 @@
},
/turf/template_noop,
/area/engineering)
"wi" = (
/obj/machinery/atmospherics/pipe/simple/hidden,
/obj/machinery/access_button{
pixel_x = 27;
pixel_y = -11
},
/obj/machinery/atmospherics/pipe/simple/hidden/aux,
/obj/machinery/door/airlock/external/blue,
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/obj/effect/map_effect/marker_helper/airlock/interior,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"wk" = (
/obj/effect/floor_decal/corner/dark_blue{
dir = 10
@@ -1616,6 +1692,12 @@
/obj/item/modular_computer/console/preset/command,
/turf/simulated/floor/tiled,
/area/bridge)
"wI" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 4
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"wL" = (
/obj/effect/shuttle_landmark/runtime/hangar,
/obj/machinery/computer/ship/engines,
@@ -1661,6 +1743,19 @@
/obj/machinery/firealarm/south,
/turf/simulated/floor/tiled,
/area/hallway/primary/central_one)
"AB" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 6
},
/obj/machinery/atmospherics/pipe/manifold/hidden/aux{
dir = 4
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Bd" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -1687,6 +1782,10 @@
/obj/machinery/shipsensors,
/turf/template_noop,
/area/engineering)
"Ft" = (
/obj/machinery/atmospherics/pipe/manifold/hidden,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Fw" = (
/obj/machinery/alarm/west,
/turf/simulated/floor/tiled,
@@ -1740,6 +1839,16 @@
/obj/machinery/computer/ship/helm,
/turf/simulated/floor/tiled,
/area/bridge)
"IQ" = (
/obj/effect/map_effect/airlock/s_to_n/long/square/wide{
name = "Deck 2 Starboard Aft Maintenance Airlock (2001)";
radio_frequency = 2001
},
/obj/effect/landmark{
name = "Observer-Start"
},
/turf/simulated/wall/r_wall,
/area/maintenance/maintcentral)
"IY" = (
/obj/machinery/computer/ship/engines,
/turf/simulated/floor/plating,
@@ -1748,6 +1857,20 @@
/obj/machinery/computer/ship/helm,
/turf/simulated/floor/shuttle,
/area/shuttle/runtime)
"JE" = (
/obj/machinery/access_button{
pixel_x = 27;
pixel_y = 11;
dir = 1
},
/obj/machinery/door/airlock/external/red,
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/obj/effect/map_effect/marker_helper/airlock/exterior,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Kz" = (
/obj/machinery/atmospherics/pipe/manifold/visible/blue{
dir = 4
@@ -1782,6 +1905,33 @@
/obj/machinery/computer/ship/targeting/terminal,
/turf/simulated/floor/tiled,
/area/storage/primary)
"ME" = (
/obj/machinery/atmospherics/portables_connector/aux{
dir = 4
},
/obj/machinery/portable_atmospherics/canister/air/airlock,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Nn" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume/aux{
dir = 4
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Ot" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume{
dir = 8
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"PS" = (
/obj/effect/landmark{
name = "Revenant"
@@ -1832,10 +1982,29 @@
/obj/machinery/alarm/north,
/turf/simulated/floor/tiled,
/area/storage/primary)
"Tj" = (
/obj/machinery/atmospherics/pipe/manifold4w/hidden,
/obj/machinery/atmospherics/pipe/simple/hidden/aux,
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"Tq" = (
/obj/effect/overmap/visitable/ship/landable/runtime,
/turf/simulated/floor/shuttle,
/area/shuttle/runtime)
"Tz" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/aux{
dir = 1
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"TD" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 6
@@ -1913,6 +2082,22 @@
},
/turf/template_noop,
/area/template_noop)
"YI" = (
/obj/machinery/door/airlock/external/khaki{
dir = 4
},
/obj/machinery/access_button{
pixel_x = -11;
pixel_y = -27;
dir = 8
},
/obj/effect/map_effect/marker/airlock{
master_tag = "runtime_airlock_1_1";
name = "runtime_airlock_1_1"
},
/obj/effect/map_effect/marker_helper/airlock/exterior,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"YP" = (
/obj/effect/floor_decal/corner/dark_blue{
dir = 10
@@ -7802,7 +7987,7 @@ aa
aa
aa
ab
aa
ab
ad
ab
ab
@@ -9089,7 +9274,7 @@ aa
ab
aa
ac
ae
ME
ah
an
aC
@@ -9346,7 +9531,7 @@ aa
ab
aa
ac
ae
vl
ah
ao
aD
@@ -9603,7 +9788,7 @@ aa
ab
aa
Eu
ae
vl
ah
ap
kc
@@ -9855,12 +10040,12 @@ aa
aa
aa
aa
aa
aa
ab
aa
ac
ae
ac
YI
ac
ac
vl
ai
ai
jf
@@ -10112,12 +10297,12 @@ aa
aa
aa
aa
aa
aa
ab
aa
ac
ae
Nn
Nn
dB
ac
vl
ai
aq
aF
@@ -10369,12 +10554,12 @@ aa
aa
aa
aa
aa
aa
ab
aa
ac
ae
JE
Tz
AB
Tj
wi
sY
ai
ar
aG
@@ -10626,12 +10811,12 @@ aa
aa
aa
aa
aa
aa
ab
aa
ac
ae
qk
Ot
Ot
ac
wI
ai
as
aH
@@ -10883,12 +11068,12 @@ aa
aa
aa
aa
aa
aa
ab
aa
Eu
ae
ac
ac
bU
bU
IQ
wI
ai
at
at
@@ -11141,11 +11326,11 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
ae
ac
wI
ai
at
at
@@ -11398,12 +11583,12 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
ai
ae
ae
ae
Ft
fH
at
at
at
@@ -11655,11 +11840,11 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
ae
ac
wI
ai
at
at
@@ -11912,11 +12097,11 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
ac
ac
ac
wI
ai
at
at
@@ -12169,11 +12354,11 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
Eu
fV
Ft
ai
ai
ai
@@ -12426,11 +12611,11 @@ aa
aa
aa
aa
aa
ab
aa
ac
ae
fV
sU
ae
ae
ae
@@ -12683,7 +12868,6 @@ aa
aa
aa
aa
aa
ab
aa
ac
@@ -12697,6 +12881,7 @@ ac
ac
ac
ac
ac
bv
cv
bv
@@ -12940,7 +13125,6 @@ aa
aa
aa
aa
aa
ab
aa
aa
@@ -12962,6 +13146,7 @@ aa
aa
aa
aa
aa
ac
Uf
Uf
@@ -13197,7 +13382,7 @@ aa
aa
aa
aa
aa
ab
ab
ab
ab
+1 -7
View File
@@ -1523,12 +1523,6 @@
/obj/machinery/ringer_button,
/turf/simulated/floor/tiled,
/area/construction/solars)
"JH" = (
/obj/effect/landmark{
name = "Observer-Start"
},
/turf/simulated/floor,
/area/antag/mercenary)
"Kb" = (
/obj/machinery/light,
/turf/simulated/floor/tiled,
@@ -30940,7 +30934,7 @@ cJ
cJ
cJ
cJ
JH
Bd
Bd
Wi
cJ