refactors clickcatchers/parallax/fullsceren (#15460)
* :) * that * move those there * refactor that too * wew * stuff * almost. * sigh * just need speed * stuf * pain * hm * tweaks * that * eh * wack * a * done * that's important * wacky * all that * fixes * typo * that * a * funny * that * that * woo * help im losing my fucking mind * okay * fix
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
for(var/i in 1 to areas_to_move.len)
|
||||
CHECK_TICK
|
||||
var/area/internal_area = areas_to_move[i]
|
||||
internal_area.afterShuttleMove(new_parallax_dir) //areas
|
||||
internal_area.afterShuttleMove(new_parallax_dir, parallax_speed) //areas
|
||||
|
||||
for(var/i in 1 to old_turfs.len)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -461,11 +461,11 @@
|
||||
for(var/area/shuttle/escape/E in GLOB.sortedAreas)
|
||||
areas += E
|
||||
hyperspace_sound(HYPERSPACE_END, areas)
|
||||
if(time_left <= PARALLAX_LOOP_TIME)
|
||||
if(time_left <= parallax_speed)
|
||||
var/area_parallax = FALSE
|
||||
for(var/place in shuttle_areas)
|
||||
var/area/shuttle/shuttle_area = place
|
||||
if(shuttle_area.parallax_movedir)
|
||||
if(shuttle_area.parallax_moving)
|
||||
area_parallax = TRUE
|
||||
break
|
||||
if(area_parallax)
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
|
||||
remote_eye.setLoc(T)
|
||||
to_chat(target, "<span class='notice'>Jumped to [selected]</span>")
|
||||
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
|
||||
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
|
||||
C.clear_fullscreen("flash", 3)
|
||||
else
|
||||
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
|
||||
|
||||
@@ -117,8 +117,6 @@ All ShuttleMove procs go here
|
||||
if(rotation)
|
||||
shuttleRotate(rotation)
|
||||
|
||||
update_parallax_contents()
|
||||
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/lateShuttleMove(turf/oldT, list/movement_force, move_dir)
|
||||
@@ -153,16 +151,21 @@ All ShuttleMove procs go here
|
||||
//The old turf has now been given back to the area that turf originaly belonged to
|
||||
|
||||
var/area/old_dest_area = newT.loc
|
||||
parallax_movedir = old_dest_area.parallax_movedir
|
||||
|
||||
parallax_moving = old_dest_area.parallax_moving
|
||||
parallax_move_angle = old_dest_area.parallax_move_angle
|
||||
parallax_move_speed = old_dest_area.parallax_move_speed
|
||||
old_dest_area.contents -= newT
|
||||
contents += newT
|
||||
newT.change_area(old_dest_area, src)
|
||||
return TRUE
|
||||
|
||||
// Called on areas after everything has been moved
|
||||
/area/proc/afterShuttleMove(new_parallax_dir)
|
||||
parallax_movedir = new_parallax_dir
|
||||
/area/proc/afterShuttleMove(new_parallax_dir, speed)
|
||||
if(!new_parallax_dir)
|
||||
parallax_moving = FALSE
|
||||
return
|
||||
parallax_move_angle = dir2angle(new_parallax_dir)
|
||||
parallax_move_speed = speed
|
||||
return TRUE
|
||||
|
||||
/area/proc/lateShuttleMove()
|
||||
@@ -309,6 +312,7 @@ All ShuttleMove procs go here
|
||||
if(buckled)
|
||||
shake_force *= 0.25
|
||||
shake_camera(src, shake_force, 1)
|
||||
client?.parallax_holder?.Reset(auto_z_change = FALSE, force = TRUE)
|
||||
|
||||
/mob/living/lateShuttleMove(turf/oldT, list/movement_force, move_dir)
|
||||
if(buckled)
|
||||
|
||||
@@ -367,6 +367,9 @@
|
||||
var/can_move_docking_ports = FALSE
|
||||
var/list/hidden_turfs = list()
|
||||
|
||||
/// parallax speed in seconds per loop
|
||||
var/parallax_speed = 25
|
||||
|
||||
/obj/docking_port/mobile/register(replace = FALSE)
|
||||
. = ..()
|
||||
if(!id)
|
||||
@@ -709,27 +712,24 @@
|
||||
create_ripples(destination, tl)
|
||||
|
||||
var/obj/docking_port/stationary/S0 = get_docked()
|
||||
if(istype(S0, /obj/docking_port/stationary/transit) && timeLeft(1) <= PARALLAX_LOOP_TIME)
|
||||
if(istype(S0, /obj/docking_port/stationary/transit) && timeLeft(1) <= parallax_speed)
|
||||
var/parallax_ongoing = FALSE
|
||||
for(var/place in shuttle_areas)
|
||||
var/area/shuttle/shuttle_area = place
|
||||
if(shuttle_area.parallax_movedir)
|
||||
parallax_slowdown()
|
||||
if(shuttle_area.parallax_moving)
|
||||
parallax_ongoing = TRUE
|
||||
if(parallax_ongoing)
|
||||
parallax_slowdown()
|
||||
|
||||
/obj/docking_port/mobile/proc/parallax_slowdown()
|
||||
for(var/place in shuttle_areas)
|
||||
var/area/shuttle/shuttle_area = place
|
||||
shuttle_area.parallax_movedir = FALSE
|
||||
if(assigned_transit?.assigned_area)
|
||||
assigned_transit.assigned_area.parallax_movedir = FALSE
|
||||
var/list/L0 = return_ordered_turfs(x, y, z, dir)
|
||||
for (var/thing in L0)
|
||||
var/turf/T = thing
|
||||
if(!T || !istype(T.loc, area_type))
|
||||
continue
|
||||
for (var/thing2 in T)
|
||||
var/atom/movable/AM = thing2
|
||||
if (length(AM.client_mobs_in_contents))
|
||||
AM.update_parallax_contents()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/area/A = get_area(M)
|
||||
if(A in shuttle_areas)
|
||||
M.client?.parallax_holder?.StopScrolling(A.parallax_move_angle, parallax_speed)
|
||||
for(var/area/shuttle_area in shuttle_areas + assigned_transit?.assigned_area)
|
||||
shuttle_area.parallax_moving = FALSE
|
||||
shuttle_area.parallax_move_speed = 0
|
||||
shuttle_area.parallax_move_angle = 0
|
||||
|
||||
/obj/docking_port/mobile/proc/check_transit_zone()
|
||||
if(assigned_transit)
|
||||
|
||||
Reference in New Issue
Block a user