mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 18:33:36 +00:00
31 lines
823 B
Plaintext
31 lines
823 B
Plaintext
/obj/effect/oneway
|
|
name = "one way effect"
|
|
desc = "Only lets things in from it's dir."
|
|
icon = 'icons/effects/mapping_helpers.dmi'
|
|
icon_state = "field_dir"
|
|
invisibility = INVISIBILITY_MAXIMUM
|
|
anchored = TRUE
|
|
|
|
/obj/effect/oneway/CanPass(atom/movable/mover, turf/target)
|
|
var/turf/T = get_turf(src)
|
|
var/turf/MT = get_turf(mover)
|
|
return ..() && (T == MT || get_dir(MT,T) == dir)
|
|
|
|
|
|
/obj/effect/wind
|
|
name = "wind effect"
|
|
desc = "Creates pressure effect in it's direction. Use sparingly."
|
|
icon = 'icons/effects/mapping_helpers.dmi'
|
|
icon_state = "field_dir"
|
|
invisibility = INVISIBILITY_MAXIMUM
|
|
var/strength = 30
|
|
|
|
/obj/effect/wind/Initialize()
|
|
. = ..()
|
|
START_PROCESSING(SSobj,src)
|
|
|
|
/obj/effect/wind/process()
|
|
var/turf/open/T = get_turf(src)
|
|
if(istype(T))
|
|
T.consider_pressure_difference(get_step(T,dir),strength)
|