Removed area.uid var and /area/New()

- var/uid was used in only a handful of places.  Because areas are singletons
  it is safe to replace the uid with \ref, areas don't get deleted.
- And with that /area/New() is empty, we can remove it!
This commit is contained in:
Leshana
2020-03-19 16:32:52 -04:00
parent 262faa38e4
commit 865303e481
4 changed files with 3 additions and 9 deletions

View File

@@ -85,7 +85,7 @@
icon = null
initial_loc = get_area(loc)
area_uid = initial_loc.uid
area_uid = "\ref[initial_loc]"
if (!id_tag)
assign_uid()
id_tag = num2text(uid)

View File

@@ -38,7 +38,7 @@
icon = null
initial_loc = get_area(loc)
area_uid = initial_loc.uid
area_uid = "\ref[initial_loc]"
if (!id_tag)
assign_uid()
id_tag = num2text(uid)

View File

@@ -40,14 +40,8 @@
var/list/forced_ambience = null
var/sound_env = STANDARD_STATION
var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf
var/global/global_uid = 0
var/uid
var/forbid_events = FALSE // If true, random events will not start inside this area.
/area/New()
uid = ++global_uid
..()
/area/Initialize()
. = ..()

View File

@@ -116,7 +116,7 @@
/obj/machinery/alarm/proc/first_run()
alarm_area = get_area(src)
area_uid = alarm_area.uid
area_uid = "\ref[alarm_area]"
if(name == "alarm")
name = "[alarm_area.name] Air Alarm"