mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 16:08:32 +01:00
Update unsorted.dm
This commit is contained in:
@@ -1130,6 +1130,27 @@ B --><-- A
|
||||
|
||||
/proc/get_random_station_turf()
|
||||
return safepick(get_area_turfs(pick(GLOB.the_station_areas)))
|
||||
|
||||
/proc/get_safe_random_station_turf()
|
||||
for (var/i in 1 to 5)
|
||||
var/list/L = get_area_turfs(pick(GLOB.the_station_areas))
|
||||
var/turf/target
|
||||
while (L.len && !target)
|
||||
var/I = rand(1, L.len)
|
||||
var/turf/T = L[I]
|
||||
if(!T.density)
|
||||
var/clear = TRUE
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = FALSE
|
||||
break
|
||||
if(clear)
|
||||
target = T
|
||||
if (!target)
|
||||
L.Cut(I,I+1)
|
||||
if (target)
|
||||
return target
|
||||
|
||||
|
||||
/proc/get_closest_atom(type, list, source)
|
||||
var/closest_atom
|
||||
|
||||
Reference in New Issue
Block a user