mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user