mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
[MIRROR] Makes smoke react to opening airlocks. [MDB IGNORE] (#13804)
* Makes smoke react to opening airlocks. (#66963) Makes smoke spread through newly opened airlocks if the cloud has spread past the airlock, but has not completely finished spreading. More intuitive smoke behavior. As funny as it is to open an airlock and see nothing but a wall of smoke it's even funnier to open an airlock and suddenly be inside a wall of smoke. * Makes smoke react to opening airlocks. Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
parent
5e7435d086
commit
92f9be0898
@@ -15,11 +15,16 @@
|
||||
animate_movement = FALSE
|
||||
/// How long the smoke sticks around before it dissipates.
|
||||
var/lifetime = 10 SECONDS
|
||||
/// Makes the smoke react to changes on/of its turf.
|
||||
var/static/loc_connections = list(
|
||||
COMSIG_TURF_CALCULATED_ADJACENT_ATMOS = .proc/react_to_atmos_adjacency_changes
|
||||
)
|
||||
|
||||
/obj/effect/particle_effect/fluid/smoke/Initialize(mapload, datum/fluid_group/group, ...)
|
||||
. = ..()
|
||||
create_reagents(1000)
|
||||
setDir(pick(GLOB.cardinals))
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
SSsmoke.start_processing(src)
|
||||
|
||||
/obj/effect/particle_effect/fluid/smoke/Destroy()
|
||||
@@ -121,6 +126,21 @@
|
||||
addtimer(VARSET_CALLBACK(smoker, smoke_delay, FALSE), 1 SECONDS)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Makes the smoke react to nearby opening/closing airlocks and the like.
|
||||
* Makes it possible for smoke to spread through airlocks that open after the edge of the smoke cloud has already spread past them.
|
||||
*
|
||||
* Arguments:
|
||||
* - [source][/turf]: The turf that has been touched by an atmos adjacency change.
|
||||
*/
|
||||
/obj/effect/particle_effect/fluid/smoke/proc/react_to_atmos_adjacency_changes(turf/source)
|
||||
SIGNAL_HANDLER
|
||||
if(!group)
|
||||
return NONE
|
||||
if (spread_bucket)
|
||||
return NONE
|
||||
SSsmoke.queue_spread(src)
|
||||
|
||||
/// A factory which produces clouds of smoke.
|
||||
/datum/effect_system/fluid_spread/smoke
|
||||
effect_type = /obj/effect/particle_effect/fluid/smoke
|
||||
|
||||
Reference in New Issue
Block a user