Merge pull request #1378 from ArchieBeepBoop/bsanomalychange

Bluespace Anomaly Changes
This commit is contained in:
Dahlular
2021-07-23 00:01:06 -06:00
committed by GitHub
3 changed files with 26 additions and 1 deletions

View File

@@ -1130,6 +1130,27 @@ B --><-- A
if (target)
return target
/proc/get_safe_random_station_turf_nochasm() //same method as above but with chasm detection
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(ischasm(T)) //stop right there criminal scum
clear = FALSE
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

View File

@@ -297,7 +297,7 @@
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 2
chaos_min = 3.0
chaos_min = 1.2
/datum/dynamic_ruleset/event/anomaly_flux
name = "Anomaly: Hyper-Energetic Flux"

View File

@@ -227,6 +227,10 @@
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
if(istype(A, /obj/item/beacon))
continue // don't teleport beacons because that's just insanely stupid
if(isliving(A))
var/turf/L = get_safe_random_station_turf_nochasm() //Safe and cuddly.
do_teleport(A, L, forceMove = TRUE, channel = TELEPORT_CHANNEL_BLUESPACE)
continue
if(A.anchored)
continue