Shelter Capsule Deploy Check

...Simpler and hopefully it works
This commit is contained in:
Unknown
2019-09-18 15:30:59 -04:00
parent 0dfa81dba5
commit fcaf8906b2

View File

@@ -2,14 +2,12 @@
var/shelter_id
var/description
var/blacklisted_turfs
var/whitelisted_turfs
var/banned_areas
var/banned_objects
/datum/map_template/shelter/New()
. = ..()
blacklisted_turfs = typecacheof(list(/turf/unsimulated, /turf/simulated/wall, /turf/simulated/floor/tiled, /turf/simulated/mineral))
whitelisted_turfs = typecacheof(/turf/simulated/mineral/floor)
blacklisted_turfs = typecacheof(list(/turf/unsimulated, /turf/simulated/wall, /turf/simulated/floor/tiled))
banned_areas = typecacheof(/area/shuttle)
banned_objects = list()
@@ -21,9 +19,7 @@
return SHELTER_DEPLOY_BAD_AREA
var/banned = is_type_in_typecache(T, blacklisted_turfs)
var/permitted = is_type_in_typecache(T, whitelisted_turfs)
if(banned)
if(!permitted)
if(banned || T.density)
return SHELTER_DEPLOY_BAD_TURFS
for(var/obj/O in T)