that should be all of them. i hope this doesn't break custom shuttles again (#21902)

This commit is contained in:
Chubbygummibear
2024-04-24 17:15:43 -07:00
committed by GitHub
parent e0baf0ccef
commit 02aa084b1e
30 changed files with 361 additions and 252 deletions

View File

@@ -227,17 +227,22 @@
return TRUE
/proc/set_area_machinery_title(area/A, title, oldtitle)
/proc/set_area_machinery_title(area/area, title, oldtitle)
if(!oldtitle) // or replacetext goes to infinite loop
return
for(var/obj/machinery/airalarm/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/power/apc/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_pump/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/door/M in A)
M.name = replacetext(M.name,oldtitle,title)
//stuff tied to the area to rename
var/static/list/to_rename = typecacheof(list(
/obj/machinery/airalarm,
/obj/machinery/atmospherics/components/unary/vent_scrubber,
/obj/machinery/atmospherics/components/unary/vent_pump,
/obj/machinery/door,
/obj/machinery/firealarm,
/obj/machinery/light_switch,
/obj/machinery/power/apc,
))
for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists())
for (var/turf/area_turf as anything in zlevel_turfs)
for(var/obj/machine as anything in typecache_filter_list(area_turf.contents, to_rename))
machine.name = replacetext(machine.name, oldtitle, title)
//TODO: much much more. Unnamed airlocks, cameras, etc.