mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-16 20:52:33 +00:00
[MIRROR] Documents the_station_areas global list, fixes some things which read from it incorrectly [MDB IGNORE] (#19225)
Documents `the_station_areas` global list, fixes some things which read from it incorrectly Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
@@ -444,8 +444,16 @@ Used by the AI doomsday and the self-destruct nuke.
|
|||||||
// And as the file is now removed set the next map to default.
|
// And as the file is now removed set the next map to default.
|
||||||
next_map_config = load_default_map_config()
|
next_map_config = load_default_map_config()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global list of AREA TYPES that are associated with the station.
|
||||||
|
*
|
||||||
|
* This tracks the types of all areas in existence that are a UNIQUE_AREA and are on the station Z.
|
||||||
|
*
|
||||||
|
* This does not track the area instances themselves - See [GLOB.areas] for that.
|
||||||
|
*/
|
||||||
GLOBAL_LIST_EMPTY(the_station_areas)
|
GLOBAL_LIST_EMPTY(the_station_areas)
|
||||||
|
|
||||||
|
/// Generates the global station area list, filling it with typepaths of unique areas found on the station Z.
|
||||||
/datum/controller/subsystem/mapping/proc/generate_station_area_list()
|
/datum/controller/subsystem/mapping/proc/generate_station_area_list()
|
||||||
for(var/area/station/station_area in GLOB.areas)
|
for(var/area/station/station_area in GLOB.areas)
|
||||||
if (!(station_area.area_flags & UNIQUE_AREA))
|
if (!(station_area.area_flags & UNIQUE_AREA))
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
||||||
for(var/area/possible_area as anything in possible_areas)
|
for(var/area/possible_area as anything in possible_areas)
|
||||||
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
||||||
if(istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security))
|
if(ispath(possible_area, /area/station/hallway) || ispath(possible_area, /area/station/security))
|
||||||
possible_areas -= possible_area
|
possible_areas -= possible_area
|
||||||
if(length(possible_areas) == 0)
|
if(length(possible_areas) == 0)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
||||||
for(var/area/possible_area as anything in possible_areas)
|
for(var/area/possible_area as anything in possible_areas)
|
||||||
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
||||||
if(istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security))
|
if(ispath(possible_area, /area/station/hallway) || ispath(possible_area, /area/station/security))
|
||||||
possible_areas -= possible_area
|
possible_areas -= possible_area
|
||||||
if(length(possible_areas) == 0)
|
if(length(possible_areas) == 0)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
||||||
for(var/area/possible_area as anything in possible_areas)
|
for(var/area/possible_area as anything in possible_areas)
|
||||||
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
|
||||||
if(istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security))
|
if(ispath(possible_area, /area/station/hallway) || ispath(possible_area, /area/station/security))
|
||||||
possible_areas -= possible_area
|
possible_areas -= possible_area
|
||||||
if(length(possible_areas) == 0)
|
if(length(possible_areas) == 0)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
AddComponent(/datum/component/traitor_objective_register, victim, fail_signals = list(COMSIG_PARENT_QDELETING))
|
AddComponent(/datum/component/traitor_objective_register, victim, fail_signals = list(COMSIG_PARENT_QDELETING))
|
||||||
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
var/list/possible_areas = GLOB.the_station_areas.Copy()
|
||||||
for(var/area/possible_area as anything in possible_areas)
|
for(var/area/possible_area as anything in possible_areas)
|
||||||
if(istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security) || initial(possible_area.outdoors))
|
if(ispath(possible_area, /area/station/hallway) || ispath(possible_area, /area/station/security) || initial(possible_area.outdoors))
|
||||||
possible_areas -= possible_area
|
possible_areas -= possible_area
|
||||||
|
|
||||||
dropoff_area = pick(possible_areas)
|
dropoff_area = pick(possible_areas)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
var/area/station/location_descriptor
|
var/area/station/location_descriptor
|
||||||
|
|
||||||
if(fake)
|
if(fake)
|
||||||
location_descriptor = pick(GLOB.the_station_areas)
|
location_descriptor = GLOB.areas_by_type[pick(GLOB.the_station_areas)]
|
||||||
|
|
||||||
else if(the_source_of_our_problems)
|
else if(the_source_of_our_problems)
|
||||||
location_descriptor = get_area(the_source_of_our_problems)
|
location_descriptor = get_area(the_source_of_our_problems)
|
||||||
|
|||||||
Reference in New Issue
Block a user