mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Fixes inspect bounties not generating for most areas and giving invalid areas to scan (#67427)
* Fixes inspect scanner giving bounties for areas that cant' be scanned * adds back the range. Adds a check to see if the area is on the map * Re-implements area list as typecacheof
This commit is contained in:
@@ -50,17 +50,23 @@
|
||||
var/area/demanded_area
|
||||
|
||||
/datum/bounty/item/security/paperwork/New()
|
||||
///list of areas for security to choose from to perform an inspection.
|
||||
var/static/list/possible_areas = list(\
|
||||
/area/station/maintenance,\
|
||||
/area/station/commons,\
|
||||
/area/station/service,\
|
||||
/area/station/hallway/primary,\
|
||||
/area/station/security/office,\
|
||||
/area/station/security/prison,\
|
||||
/area/station/security/range,\
|
||||
/area/station/security/checkpoint,\
|
||||
/area/station/security/interrogation)
|
||||
///list of areas for security to choose from to perform an inspection. Pulls the list and cross references it to the map to make sure the area is on the map before assigning.
|
||||
var/static/list/possible_areas
|
||||
if(!possible_areas)
|
||||
possible_areas = typecacheof(list(\
|
||||
/area/station/maintenance,\
|
||||
/area/station/commons,\
|
||||
/area/station/service,\
|
||||
/area/station/hallway/primary,\
|
||||
/area/station/security/office,\
|
||||
/area/station/security/prison,\
|
||||
/area/station/security/range,\
|
||||
/area/station/security/checkpoint,\
|
||||
/area/station/security/interrogation))
|
||||
for (var/area_type in possible_areas)
|
||||
if(GLOB.areas_by_type[area_type])
|
||||
continue
|
||||
possible_areas -= area_type
|
||||
demanded_area = pick(possible_areas)
|
||||
name = name + ": [initial(demanded_area.name)]"
|
||||
description = initial(description) + " [initial(demanded_area.name)]"
|
||||
|
||||
Reference in New Issue
Block a user