mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
that should be all of them. i hope this doesn't break custom shuttles again (#21902)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user