mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Adds a megafauna_safe_range var to ruin datums and adds a megafauna exclusion zone to ghost spawn ruins on lavaland. (#29120)
* add exclusion check, change area types, update script * merged the 2 for loops * removed commented out section * rename updatepaths script * var * undo area and map edits * add safe var for ruin datums, add megafauna distance check for safe ruins * removed unneeded file * rename variable
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
var/fauna_scan_range = 12
|
||||
var/megafauna_scan_range = 16
|
||||
var/ghost_ruin_scan_range = 12
|
||||
var/turf/mining_base_gps
|
||||
|
||||
loot = list(
|
||||
@@ -94,6 +95,15 @@
|
||||
if(ismegafauna(thing) && get_dist(T, thing) <= megafauna_scan_range)
|
||||
return FALSE
|
||||
|
||||
for(var/obj/effect/landmark/ruin/ruin_landmark in GLOB.ruin_landmarks)
|
||||
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
|
||||
// avoid spawning a megafauna if it's too close to a ghost spawn ruin
|
||||
if(template.megafauna_safe_range)
|
||||
// largest axis halved + the ruin scan range
|
||||
var/exclusion_distance = (template.width > template.height ? template.width : template.height * 0.5) + ghost_ruin_scan_range
|
||||
if(get_dist(T, ruin_landmark) < exclusion_distance)
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/effect/spawner/random/pool/lavaland_fauna/megafauna/unique
|
||||
|
||||
Reference in New Issue
Block a user