mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Decals will fall downwards (#90772)
## About The Pull Request Decals which attempt to spawn on an openspace turf will drop to the level below until they hit a solid turf. Here I demonstrate it with an average spaceman activity, spraying flour aimlessly out of a spray bottle:  ## Why It's Good For The Game The other day I watched a drunken miner flying around the upper levels of Catwalkstation and once he became blackout drunk his drunken personality decided to spin rapidly until he vomited. The vomit hovered in the air. This will not stand. ## Changelog 🆑 fix: You can now bleed or vomit onto people below you rather than creating puddles of substance hovering in mid-air. /🆑
This commit is contained in:
@@ -23,11 +23,18 @@
|
||||
/// Use this if your decal is one of one, and thus we should not spawn it if it's there already
|
||||
/// Returns either the existing cleanable, the one we created, or null if we can't spawn on that turf
|
||||
/turf/proc/spawn_unique_cleanable(obj/effect/decal/cleanable/cleanable_type)
|
||||
var/turf/checkturf = src
|
||||
while (isgroundlessturf(checkturf) && checkturf.zPassOut(DOWN))
|
||||
var/turf/below = GET_TURF_BELOW(checkturf)
|
||||
if (!below || !below.zPassIn(DOWN))
|
||||
break
|
||||
checkturf = below
|
||||
|
||||
// There is no need to spam unique cleanables, they don't stack and it just chews cpu
|
||||
var/obj/effect/decal/cleanable/existing = locate(cleanable_type) in src
|
||||
var/obj/effect/decal/cleanable/existing = locate(cleanable_type) in checkturf
|
||||
if(existing)
|
||||
return existing
|
||||
return new cleanable_type(src)
|
||||
return new cleanable_type(checkturf)
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_TURF_CHANGE = PROC_REF(on_decal_move),
|
||||
)
|
||||
while(isopenspaceturf(loc) && can_z_move(DOWN, z_move_flags = ZMOVE_ALLOW_ANCHORED))
|
||||
zMove(DOWN, z_move_flags = ZMOVE_ALLOW_ANCHORED)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/effect/decal/blob_act(obj/structure/blob/B)
|
||||
|
||||
@@ -3089,7 +3089,7 @@
|
||||
|
||||
/datum/reagent/ants/expose_turf(turf/exposed_turf, reac_volume)
|
||||
. = ..()
|
||||
if(!istype(exposed_turf) || isspaceturf(exposed_turf)) // Is the turf valid
|
||||
if(!istype(exposed_turf)) // Is the turf valid
|
||||
return
|
||||
if((reac_volume <= 10)) // Makes sure people don't duplicate ants.
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user