mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #38527 from AutomaticFrenzy/patch/ripples
Fix ripples appearing too broadly and disappearing too soon
This commit is contained in:
committed by
yogstation13-bot
parent
f5f60b7c65
commit
065485440f
@@ -1,4 +1,4 @@
|
||||
/obj/effect/temp_visual/ripple
|
||||
/obj/effect/abstract/ripple
|
||||
name = "hyperspace ripple"
|
||||
desc = "Something is coming through hyperspace, you can see the \
|
||||
visual disturbances. It's probably best not to be on top of these \
|
||||
@@ -11,12 +11,10 @@
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
alpha = 0
|
||||
|
||||
duration = 3 * SHUTTLE_RIPPLE_TIME
|
||||
|
||||
/obj/effect/temp_visual/ripple/Initialize(mapload, time_left)
|
||||
/obj/effect/abstract/ripple/Initialize(mapload, time_left)
|
||||
. = ..()
|
||||
animate(src, alpha=255, time=time_left)
|
||||
addtimer(CALLBACK(src, .proc/stop_animation), 8, TIMER_CLIENT_TIME)
|
||||
|
||||
/obj/effect/temp_visual/ripple/proc/stop_animation()
|
||||
/obj/effect/abstract/ripple/proc/stop_animation()
|
||||
icon_state = "medi_holo_no_anim"
|
||||
|
||||
@@ -275,6 +275,7 @@
|
||||
previous = null
|
||||
QDEL_NULL(assigned_transit) //don't need it where we're goin'!
|
||||
shuttle_areas = null
|
||||
remove_ripples()
|
||||
. = ..()
|
||||
|
||||
/obj/docking_port/mobile/Initialize(mapload)
|
||||
@@ -454,7 +455,7 @@
|
||||
/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/temp_visual/ripple(t, animate_time)
|
||||
ripples += new /obj/effect/abstract/ripple(t, animate_time)
|
||||
|
||||
/obj/docking_port/mobile/proc/remove_ripples()
|
||||
for(var/R in ripples)
|
||||
@@ -469,13 +470,14 @@
|
||||
|
||||
for(var/i in 1 to L0.len)
|
||||
var/turf/T0 = L0[i]
|
||||
if(!T0 || !istype(T0.loc, area_type))
|
||||
continue
|
||||
var/turf/T1 = L1[i]
|
||||
if(!T1)
|
||||
continue
|
||||
if(T0.type != T0.baseturfs)
|
||||
ripple_turfs += T1
|
||||
if(!T0 || !T1)
|
||||
continue // out of bounds
|
||||
if(T0.type == T0.baseturfs)
|
||||
continue // indestructible
|
||||
if(!istype(T0.loc, area_type) || istype(T0.loc, /area/shuttle/transit))
|
||||
continue // not part of the shuttle
|
||||
ripple_turfs += T1
|
||||
|
||||
return ripple_turfs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user