mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Foam can pass through tables and computers and grilles (#89636)
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
. = ..()
|
||||
if(slippery_foam)
|
||||
AddComponent(/datum/component/slippery, 100)
|
||||
if(HAS_TRAIT(loc, TRAIT_ELEVATED_TURF))
|
||||
layer = WATER_LEVEL_LAYER
|
||||
create_reagents(1000, REAGENT_HOLDER_INSTANT_REACT)
|
||||
playsound(src, 'sound/effects/bubbles/bubbles2.ogg', 80, TRUE, -3)
|
||||
AddElement(/datum/element/atmos_sensitive, mapload)
|
||||
@@ -96,10 +98,14 @@
|
||||
continue
|
||||
if(turf_location.underfloor_accessibility < UNDERFLOOR_INTERACTABLE && HAS_TRAIT(object, TRAIT_T_RAY_VISIBLE))
|
||||
continue
|
||||
if (HAS_TRAIT(loc, TRAIT_ELEVATED_TURF) && !HAS_TRAIT(object, TRAIT_ELEVATING_OBJECT))
|
||||
continue // Do expose tables, don't expose items on tables
|
||||
reagents.expose(object, VAPOR, fraction)
|
||||
|
||||
var/hit = 0
|
||||
for(var/mob/living/foamer in loc)
|
||||
if (HAS_TRAIT(foamer, TRAIT_MOB_ELEVATED))
|
||||
continue
|
||||
hit += foam_mob(foamer, seconds_per_tick)
|
||||
if(hit)
|
||||
lifetime += ds_seconds_per_tick //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
@@ -137,6 +143,7 @@
|
||||
return FALSE
|
||||
|
||||
var/datum/can_pass_info/info = new(no_id = TRUE)
|
||||
info.pass_flags = PASSTABLE | PASSGRILLE | PASSMACHINE | PASSSTRUCTURE
|
||||
for(var/iter_dir in GLOB.cardinals)
|
||||
var/turf/spread_turf = get_step(src, iter_dir)
|
||||
if(spread_turf?.density || spread_turf.LinkBlockedWithAccess(spread_turf, info))
|
||||
@@ -149,6 +156,8 @@
|
||||
continue
|
||||
|
||||
for(var/mob/living/foaming in spread_turf)
|
||||
if (HAS_TRAIT(foaming, TRAIT_MOB_ELEVATED))
|
||||
continue
|
||||
foam_mob(foaming, seconds_per_tick)
|
||||
|
||||
var/obj/effect/particle_effect/fluid/foam/spread_foam = new type(spread_turf, group, src)
|
||||
|
||||
Reference in New Issue
Block a user