mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-14 19:32:32 +00:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
19 lines
649 B
Plaintext
19 lines
649 B
Plaintext
// Makes the screen shake for nearby players every so often.
|
|
/obj/effect/map_effect/interval/screen_shaker
|
|
name = "screen shaker"
|
|
icon_state = "screen_shaker"
|
|
|
|
interval_lower_bound = 1 SECOND
|
|
interval_upper_bound = 2 SECONDS
|
|
|
|
var/shake_radius = 7 // How far the shaking effect extends to. By default it is one screen length.
|
|
var/shake_duration = 2 // How long the shaking lasts.
|
|
var/shake_strength = 1 // How much it shakes.
|
|
|
|
/obj/effect/map_effect/interval/screen_shaker/trigger()
|
|
for(var/A in GLOB.player_list)
|
|
var/mob/M = A
|
|
if(M.z == src.z && get_dist(src, M) <= shake_radius)
|
|
shake_camera(M, shake_duration, shake_strength)
|
|
..()
|