mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #9626 from GinjaNinja32/vine_event_fix
Fixes vine/infestation events not working with new lighting
This commit is contained in:
@@ -11,3 +11,9 @@
|
|||||||
|
|
||||||
/proc/isfloor(turf/T)
|
/proc/isfloor(turf/T)
|
||||||
return (istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
|
return (istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
|
||||||
|
|
||||||
|
/proc/turf_clear(turf/T)
|
||||||
|
for(var/atom/A in T)
|
||||||
|
if(A.simulated)
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|||||||
@@ -58,14 +58,10 @@
|
|||||||
spawn_area_type = /area/security/tactical
|
spawn_area_type = /area/security/tactical
|
||||||
locstring = "tactical equipment storage"
|
locstring = "tactical equipment storage"
|
||||||
|
|
||||||
//world << "looking for [spawn_area_type]"
|
|
||||||
for(var/areapath in typesof(spawn_area_type))
|
for(var/areapath in typesof(spawn_area_type))
|
||||||
//world << " checking [areapath]"
|
|
||||||
var/area/A = locate(areapath)
|
var/area/A = locate(areapath)
|
||||||
//world << " A: [A], contents.len: [A.contents.len]"
|
|
||||||
//world << " B: [B], contents.len: [B.contents.len]"
|
|
||||||
for(var/turf/simulated/floor/F in A.contents)
|
for(var/turf/simulated/floor/F in A.contents)
|
||||||
if(!F.contents.len)
|
if(turf_clear(F))
|
||||||
turfs += F
|
turfs += F
|
||||||
|
|
||||||
var/list/spawn_types = list()
|
var/list/spawn_types = list()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
for(var/areapath in typesof(/area/hallway))
|
for(var/areapath in typesof(/area/hallway))
|
||||||
var/area/A = locate(areapath)
|
var/area/A = locate(areapath)
|
||||||
for(var/turf/simulated/floor/F in A.contents)
|
for(var/turf/simulated/floor/F in A.contents)
|
||||||
if(!F.contents.len)
|
if(turf_clear(F))
|
||||||
turfs += F
|
turfs += F
|
||||||
|
|
||||||
if(turfs.len) //Pick a turf to spawn at if we can
|
if(turfs.len) //Pick a turf to spawn at if we can
|
||||||
|
|||||||
Reference in New Issue
Block a user