mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Hyperspace ripples now animate at the rate of the arriving shuttle (#24947)
* Ripples animate at rate of the arriving shuttle * Make it use Initialize while we're here
This commit is contained in:
@@ -13,6 +13,6 @@
|
||||
|
||||
duration = 3 * SHUTTLE_RIPPLE_TIME
|
||||
|
||||
/obj/effect/overlay/temp/ripple/New()
|
||||
/obj/effect/overlay/temp/ripple/Initialize(mapload, time_left)
|
||||
. = ..()
|
||||
animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME)
|
||||
animate(src, alpha=255, time=time_left)
|
||||
|
||||
@@ -399,10 +399,10 @@
|
||||
|
||||
qdel(src, force=TRUE)
|
||||
|
||||
/obj/docking_port/mobile/proc/create_ripples(obj/docking_port/stationary/S1)
|
||||
/obj/docking_port/mobile/proc/create_ripples(obj/docking_port/stationary/S1, animate_time)
|
||||
var/list/turfs = ripple_area(S1)
|
||||
for(var/t in turfs)
|
||||
ripples += new /obj/effect/overlay/temp/ripple(t)
|
||||
ripples += new /obj/effect/overlay/temp/ripple(t, animate_time)
|
||||
|
||||
/obj/docking_port/mobile/proc/remove_ripples()
|
||||
for(var/R in ripples)
|
||||
@@ -613,8 +613,9 @@
|
||||
/obj/docking_port/mobile/proc/check_effects()
|
||||
if(!ripples.len)
|
||||
if((mode == SHUTTLE_CALL) || (mode == SHUTTLE_RECALL))
|
||||
if(timeLeft(1) <= SHUTTLE_RIPPLE_TIME)
|
||||
create_ripples(destination)
|
||||
var/tl = timeLeft(1)
|
||||
if(tl <= SHUTTLE_RIPPLE_TIME)
|
||||
create_ripples(destination, tl)
|
||||
|
||||
var/obj/docking_port/stationary/S0 = get_docked()
|
||||
if(areaInstance.parallax_movedir && istype(S0, /obj/docking_port/stationary/transit) && timeLeft(1) <= PARALLAX_LOOP_TIME)
|
||||
|
||||
Reference in New Issue
Block a user