Fix ripples appearing too broadly and disappearing too soon

This commit is contained in:
Tad Hardesty
2018-06-16 02:58:28 -07:00
parent 18331b32dd
commit d4415e5387
2 changed files with 8 additions and 13 deletions
+3 -5
View File
@@ -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"
+5 -8
View File
@@ -284,6 +284,7 @@
previous = null
assigned_transit = null
shuttle_areas = null
remove_ripples()
. = ..()
/obj/docking_port/mobile/Initialize(mapload)
@@ -432,7 +433,7 @@
underlying_area_type = current_dock.area_type
var/list/old_turfs = return_ordered_turfs(x, y, z, dir)
var/area/underlying_area
for(var/i in GLOB.sortedAreas)
var/area/place = i
@@ -450,7 +451,7 @@
underlying_area.contents += oldT
oldT.change_area(old_area, underlying_area)
oldT.empty(FALSE)
// Here we locate the bottomost shuttle boundary and remove all turfs above it
var/list/baseturf_cache = oldT.baseturfs
for(var/k in 1 to length(baseturf_cache))
@@ -463,7 +464,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)
@@ -478,12 +479,8 @@
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)
if(T0 && T1 && T0.type != T0.baseturfs && istype(T0.loc, area_type) && !istype(T0.loc, /area/shuttle/transit))
ripple_turfs += T1
return ripple_turfs