Scope various unscoped locate() calls (#42195)

* Scope locate calls which are immediately checked against a list

* Remove silly use of locate from bible Topic

* Scope various locate calls (needs testing)

* More WIP

* Buff up lightswitches while we're here

* Tidy record browsing code

* Scope a few more locates

These have caused problems in the past (#41917, #39303). Continues #29349.

Also cleans up lightswitch code while I was already touching it.

I recommend a testmerge.
This commit is contained in:
Tad Hardesty
2019-01-05 23:39:27 -08:00
committed by oranges
parent 380bbad300
commit 3b2c0e27f7
22 changed files with 78 additions and 87 deletions
+2 -2
View File
@@ -126,7 +126,7 @@
log_admin("[key_name(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].</span>")
var/area/thunderdome = locate(/area/tdome/arena)
var/area/thunderdome = GLOB.areas_by_type[/area/tdome/arena]
if(delete_mobs == "Yes")
for(var/mob/living/mob in thunderdome)
qdel(mob) //Clear mobs
@@ -134,7 +134,7 @@
if(!istype(obj, /obj/machinery/camera))
qdel(obj) //Clear objects
var/area/template = locate(/area/tdome/arena_source)
var/area/template = GLOB.areas_by_type[/area/tdome/arena_source]
template.copy_contents_to(thunderdome)
if("clear_virus")