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:
silicons
2022-02-07 15:17:24 -08:00
committed by GitHub
parent e089be0de9
commit af6e43c595
84 changed files with 1323 additions and 889 deletions
+3 -3
View File
@@ -115,9 +115,9 @@ GLOBAL_PROTECT(LastAdminCalledProc)
//adv proc call this, ya nerds
/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
if(target == GLOBAL_PROC)
return call("/proc/[procname]")(arglist(arguments))
else if(target != world)
return call(target, procname)(arglist(arguments))
return text2path("/proc/[procname]")? call("/proc/[procname]")(arglist(arguments)) : null
else if(target != world && istype(target, /datum)) // isdatum check incase someone manages to call WrapAdminProcCall(global) which would otherwise crash the process entirely
return hascall(target, procname)? call(target, procname)(arglist(arguments)) : null
else
log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")
@@ -3,11 +3,19 @@
/proc/_abs(A)
return abs(A)
/proc/_animate(atom/A, set_vars, time = 10, loop = 1, easing = LINEAR_EASING, flags = null)
var/mutable_appearance/MA = new()
for(var/v in set_vars)
MA.vars[v] = set_vars[v]
animate(A, appearance = MA, time, loop, easing, flags)
/proc/_animate(atom/A, list/data, time = 10, loop = 1, easing = LINEAR_EASING, flags = null)
if(!istype(A))
return
animate(A, appearance = data, time = time, loop = loop, easing = easing, flags = flags)
/proc/_animate_adv(atom/A, list/data, loop = 1, easing = LINEAR_EASING, flags = NONE)
if(!A || !islist(data) || data.len < 1)
return
animate(A, appearance = (data[1] - "time"), time = data[1]["time"], loop = loop, easing = easing, flags = flags)
if(data.len < 2)
return
for(var/i in 2 to data.len)
animate(appearance = (data[i] - "time"), time = data[i]["time"])
/proc/_acrccos(A)
return arccos(A)
@@ -69,7 +69,7 @@
do_sparks(5, TRUE, AM)
if(isliving(AM))
var/mob/living/L = AM
L.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
L.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static)
L.clear_fullscreen("flash", 5)
var/obj/item/transfer_valve/TTV = locate() in L.GetAllContents()
if(TTV)
@@ -141,7 +141,7 @@
if(isliving(M.current) && M.current.stat != DEAD)
var/turf/t_turf = isAI(M.current) ? get_step(get_step(src, NORTH),NORTH) : get_turf(src) // AI too fat, must make sure it always ends up a 2 tiles north instead of on the ark.
do_teleport(M.current, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE)
M.current.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
M.current.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash)
M.current.clear_fullscreen("flash", 5)
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 50, FALSE)
recalls_remaining--
@@ -311,7 +311,7 @@
var/turf/T = get_turf(M)
if(is_servant_of_ratvar(M) && (!T || T.z != z))
M.forceMove(get_step(src, SOUTH))
M.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
M.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash)
M.clear_fullscreen("flash", 5)
progress_in_seconds += GATEWAY_SUMMON_RATE
switch(progress_in_seconds)
@@ -104,7 +104,7 @@
/mob/living/carbon/true_devil/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
return 666
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/tiled/flash, override_protection = 0)
if(mind && has_bane(BANE_LIGHT))
mind.disrupt_spells(-500)
return ..() //flashes don't stop devils UNLESS it's their bane.
@@ -439,7 +439,7 @@
return // we don't see the pipe network while inside cryo.
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 1)
/obj/machinery/atmospherics/components/unary/cryo_cell/can_crawl_through()
return // can't ventcrawl in or out of cryo.
+10 -14
View File
@@ -4,6 +4,16 @@
//BLACK MAGIC THINGS//
//////////////////////
parent_type = /datum
///////////////
// Rendering //
///////////////
/// Click catcher
var/atom/movable/screen/click_catcher/click_catcher
/// Parallax holder
var/datum/parallax_holder/parallax_holder
////////////////
//ADMIN THINGS//
////////////////
@@ -153,20 +163,6 @@
///When was the last time we warned them about not cryoing without an ahelp, set to -5 minutes so that rounstart cryo still warns
var/cryo_warned = -5 MINUTES
var/list/parallax_layers
var/list/parallax_layers_cached
var/atom/movable/movingmob
var/turf/previous_turf
///world.time of when we can state animate()ing parallax again
var/dont_animate_parallax
///world.time of last parallax update
var/last_parallax_shift
///ds between parallax updates
var/parallax_throttle = 0
var/parallax_movedir = 0
var/parallax_layers_max = 3
var/parallax_animate_timer
/**
* Assoc list with all the active maps - when a screen obj is added to
* a map, it's put in here as well.
+3 -17
View File
@@ -444,8 +444,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
send_resources()
generate_clickcatcher()
apply_clickcatcher()
update_clickcatcher()
if(prefs.lastchangelog != GLOB.changelog_hash) //bolds the changelog button on the interface so we know there are updates.
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
@@ -535,9 +534,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
send2adminchat("Server", "[cheesy_message] (No admins online)")
QDEL_LIST_ASSOC_VAL(char_render_holders)
if(movingmob != null)
movingmob.client_mobs_in_contents -= mob
UNSETEMPTY(movingmob.client_mobs_in_contents)
// seen_messages = null
Master.UpdateTickRate()
. = ..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening
@@ -1014,7 +1010,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
var/list/old_view = getviewsize(view)
view = new_size
var/list/actualview = getviewsize(view)
apply_clickcatcher(actualview)
update_clickcatcher()
parallax_holder.Reset()
mob.reload_fullscreen()
if (isliving(mob))
var/mob/living/M = mob
@@ -1023,17 +1020,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
addtimer(CALLBACK(src,.verb/fit_viewport,10)) //Delayed to avoid wingets from Login calls.
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_CHANGE_VIEW, src, old_view, actualview)
/client/proc/generate_clickcatcher()
if(!void)
void = new()
screen += void
/client/proc/apply_clickcatcher(list/actualview)
generate_clickcatcher()
if(!actualview)
actualview = getviewsize(view)
void.UpdateGreed(actualview[1],actualview[2])
/client/proc/AnnouncePR(announcement)
if(prefs && prefs.chat_toggles & CHAT_PULLR)
to_chat(src, announcement)
+5 -7
View File
@@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/clientfps = 0
var/parallax
var/parallax = PARALLAX_INSANE
var/ambientocclusion = TRUE
///Should we automatically fit the viewport?
@@ -2816,14 +2816,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
toggles ^= MIDROUND_ANTAG
if("parallaxup")
parallax = WRAP(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_parallax_pref(parent.mob)
parallax = WRAP(parallax + 1, PARALLAX_DISABLE, PARALLAX_INSANE + 1)
parent?.parallax_holder?.Reset()
if("parallaxdown")
parallax = WRAP(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_parallax_pref(parent.mob)
parallax = WRAP(parallax - 1, PARALLAX_DISABLE, PARALLAX_INSANE + 1)
parent?.parallax_holder?.Reset()
// Citadel edit - Prefs don't work outside of this. :c
+5 -2
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 52
#define SAVEFILE_VERSION_MAX 53
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -343,6 +343,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
marking_list += list(list(part, old_marking_value, copied_color_list))
features["mam_body_markings"] = marking_list
if(current_version < 53)
parallax = PARALLAX_INSANE
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
return
@@ -469,7 +472,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
toggles = sanitize_integer(toggles, 0, 16777215, initial(toggles))
clientfps = sanitize_integer(clientfps, 0, 1000, 0)
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
parallax = sanitize_integer(parallax, PARALLAX_DISABLE, PARALLAX_INSANE, null)
ambientocclusion = sanitize_integer(ambientocclusion, 0, 1, initial(ambientocclusion))
auto_fit_viewport = sanitize_integer(auto_fit_viewport, 0, 1, initial(auto_fit_viewport))
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
+1 -1
View File
@@ -126,5 +126,5 @@ INITIALIZE_IMMEDIATE(/mob/dead)
return ..()
/mob/dead/onTransitZ(old_z,new_z)
..()
. = ..()
update_z(new_z)
@@ -578,8 +578,6 @@
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)
character.update_parallax_teleport()
job.standard_assign_skills(character.mind)
SSticker.minds += character.mind
@@ -377,8 +377,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
ghostize(0, penalize = TRUE)
/mob/dead/observer/Move(NewLoc, direct)
if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, NewLoc) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
return
@@ -388,7 +386,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(NewLoc)
forceMove(NewLoc)
update_parallax_contents()
else
forceMove(get_turf(src)) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
@@ -487,9 +484,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!L || !L.len)
to_chat(usr, "No area available.")
return
usr.forceMove(pick(L))
update_parallax_contents()
/mob/dead/observer/proc/view_gas()
set category = "Ghost"
@@ -568,7 +563,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
A.forceMove(T)
A.update_parallax_contents()
else
to_chat(A, "This mob is not located in the game world.")
+2 -3
View File
@@ -165,7 +165,7 @@
/**
* Actual proc that removes us and puts us back on lobby
*
*
* Returns the new mob.
*/
/mob/dead/observer/proc/transfer_to_lobby()
@@ -174,8 +174,7 @@
return
client.screen.Cut()
client.view_size.resetToDefault()
client.generate_clickcatcher()
client.apply_clickcatcher()
client.update_clickcatcher()
client.view_size.setDefault(getScreenSize(client.prefs.widescreenpref))
client.view_size.resetToDefault()
+5 -5
View File
@@ -646,7 +646,7 @@
become_blind(EYES_COVERED)
else if(tinttotal >= TINT_DARKENED)
cure_blind(EYES_COVERED)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 2)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/scaled/impaired, 2)
else
cure_blind(EYES_COVERED)
clear_fullscreen("tint", 0)
@@ -722,10 +722,10 @@
visionseverity = 9
if(-INFINITY to -24)
visionseverity = 10
overlay_fullscreen("critvision", /atom/movable/screen/fullscreen/crit/vision, visionseverity)
overlay_fullscreen("critvision", /atom/movable/screen/fullscreen/scaled/crit/vision, visionseverity)
else
clear_fullscreen("critvision")
overlay_fullscreen("crit", /atom/movable/screen/fullscreen/crit, severity)
overlay_fullscreen("crit", /atom/movable/screen/fullscreen/scaled/crit, severity)
else
clear_fullscreen("crit")
clear_fullscreen("critvision")
@@ -749,7 +749,7 @@
severity = 6
if(45 to INFINITY)
severity = 7
overlay_fullscreen("oxy", /atom/movable/screen/fullscreen/oxy, severity)
overlay_fullscreen("oxy", /atom/movable/screen/fullscreen/scaled/oxy, severity)
else
clear_fullscreen("oxy")
@@ -770,7 +770,7 @@
severity = 5
if(85 to INFINITY)
severity = 6
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/scaled/brute, severity)
else
clear_fullscreen("brute")
@@ -361,7 +361,7 @@
return embeds
/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/tiled/flash, override_protection = 0)
. = ..()
var/damage = override_protection ? intensity : intensity - get_eye_protection()
@@ -209,7 +209,7 @@
update_tint()
if(G.vision_correction)
if(HAS_TRAIT(src, TRAIT_NEARSIGHT))
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/scaled/impaired, 1)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
update_sight()
if(!QDELETED(src))
@@ -5,7 +5,7 @@
/mob/living/carbon/adjust_drugginess(amount)
druggy = max(druggy+amount, 0)
if(druggy)
overlay_fullscreen("high", /atom/movable/screen/fullscreen/high)
overlay_fullscreen("high", /atom/movable/screen/fullscreen/tiled/high)
throw_alert("high", /atom/movable/screen/alert/high)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "high", /datum/mood_event/high)
sound_environment_override = SOUND_ENVIRONMENT_DRUGGED
@@ -18,7 +18,7 @@
/mob/living/carbon/set_drugginess(amount)
druggy = max(amount, 0)
if(druggy)
overlay_fullscreen("high", /atom/movable/screen/fullscreen/high)
overlay_fullscreen("high", /atom/movable/screen/fullscreen/tiled/high)
throw_alert("high", /atom/movable/screen/alert/high)
else
clear_fullscreen("high")
+1 -1
View File
@@ -579,7 +579,7 @@
UNLINT(livingdoll.filters += filter(type="alpha", icon = mob_mask))
livingdoll.filters += filter(type="drop_shadow", size = -1)
if(severity > 0)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/scaled/brute, severity)
else
clear_fullscreen("brute")
+1 -1
View File
@@ -539,7 +539,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/tiled/flash, override_protection = 0)
if((override_protection || get_eye_protection() < intensity) && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND))))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
@@ -84,7 +84,6 @@
if(ai.client && !ai.multicam_on)
ai.client.eye = src
update_ai_detect_hud()
update_parallax_contents()
//Holopad
if(istype(ai.current, /obj/machinery/holopad))
var/obj/machinery/holopad/H = ai.current
+1 -1
View File
@@ -4,7 +4,7 @@
stat = DEAD
update_mobility()
update_sight()
clear_fullscreens()
wipe_fullscreens()
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
remove_from_alive_mob_list()
@@ -144,6 +144,6 @@
P.on_hit(src, 0, def_zone)
return BULLET_ACT_HIT
/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash/static)
/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/tiled/flash/static)
if(affect_silicon)
return ..()
@@ -113,7 +113,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
severity = 7
hud_used.healths.icon_state = "elite_health[severity]"
if(severity > 0)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/scaled/brute, severity)
else
clear_fullscreen("brute")
+1 -1
View File
@@ -599,7 +599,7 @@
/mob/living/proc/become_nearsighted(source)
if(!HAS_TRAIT(src, TRAIT_NEARSIGHT))
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/scaled/impaired, 1)
ADD_TRAIT(src, TRAIT_NEARSIGHT, source)
/mob/living/proc/cure_husk(source)
+3 -4
View File
@@ -58,10 +58,6 @@
//readd this mob's HUDs (antag, med, etc)
reload_huds()
reload_fullscreen() // Reload any fullscreen overlays this mob has.
add_click_catcher()
sync_mind()
//Reload alternate appearances
@@ -93,6 +89,9 @@
if(has_field_of_vision && CONFIG_GET(flag/use_field_of_vision))
LoadComponent(/datum/component/field_of_vision, field_of_vision_type)
// load rendering
reload_rendering()
AddElement(/datum/element/weather_listener, /datum/weather/ash_storm, ZTRAIT_ASHSTORM, GLOB.ash_storm_sounds)
// optimized area sound effects. Enable during events (compile flag when 😳)
+24 -22
View File
@@ -1,25 +1,3 @@
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
remove_from_mob_list()
remove_from_dead_mob_list()
remove_from_alive_mob_list()
GLOB.all_clockwork_mobs -= src
focus = null
LAssailant = null
movespeed_modification = null
for (var/alert in alerts)
clear_alert(alert, TRUE)
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
observe.reset_perspective(null)
qdel(hud_used)
for(var/cc in client_colours)
qdel(cc)
client_colours = null
ghostize()
..()
return QDEL_HINT_HARDDEL
/mob/Initialize()
add_to_mob_list()
if(stat == DEAD)
@@ -38,8 +16,32 @@
update_config_movespeed()
update_movespeed(TRUE)
initialize_actionspeed()
init_rendering()
hook_vr("mob_new",list(src))
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
remove_from_mob_list()
remove_from_dead_mob_list()
remove_from_alive_mob_list()
GLOB.all_clockwork_mobs -= src
focus = null
LAssailant = null
movespeed_modification = null
for (var/alert in alerts)
clear_alert(alert, TRUE)
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
observe.reset_perspective(null)
dispose_rendering()
qdel(hud_used)
for(var/cc in client_colours)
qdel(cc)
client_colours = null
ghostize()
..()
return QDEL_HINT_HARDDEL
/mob/GenerateTag()
tag = "mob_[next_mob_id++]"
+4 -1
View File
@@ -16,6 +16,10 @@
attack_hand_unwieldlyness = CLICK_CD_MELEE
attack_hand_speed = 0
// Rendering
/// Fullscreen objects
var/list/fullscreens = list()
/// What receives our keyboard input. src by default.
var/datum/focus
@@ -143,7 +147,6 @@
var/registered_z
var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly
var/list/screens = list()
var/list/client_colours = list()
var/hud_type = /datum/hud
+10
View File
@@ -110,6 +110,11 @@
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOVE, src, direction, n, oldloc, add_delay)
/mob/Moved(atom/OldLoc, Dir)
. = ..()
if(client)
client.parallax_holder.Update()
/// Process_Grab(): checks for grab, attempts to break if so. Return TRUE to prevent movement.
/client/proc/Process_Grab()
if(mob.pulledby)
@@ -398,3 +403,8 @@
/mob/proc/canZMove(direction, turf/target)
return FALSE
/mob/onTransitZ(old_z, new_z)
. = ..()
if(old_z != new_z)
client?.parallax_holder?.Reset()
+1 -1
View File
@@ -53,7 +53,7 @@
if(eye_blind) // UNCONSCIOUS or has blind trait, or has temporary blindness
if(stat == CONSCIOUS || stat == SOFT_CRIT)
throw_alert("blind", /atom/movable/screen/alert/blind)
overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind)
overlay_fullscreen("blind", /atom/movable/screen/fullscreen/scaled/blind)
// You are blind why should you be able to make out details like color, only shapes near you
// add_client_colour(/datum/client_colour/monochrome/blind)
else // CONSCIOUS no blind trait, no blindness
+1 -1
View File
@@ -465,7 +465,7 @@
/obj/machinery/disposal/bin/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 2)
//Delivery Chute
@@ -302,7 +302,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
user.reset_perspective(parentSphere)
user.set_machine(src)
var/datum/action/peepholeCancel/PHC = new
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 1)
PHC.Grant(user)
return TRUE
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
+10 -6
View File
@@ -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)
+17 -17
View File
@@ -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)
+2 -2
View File
@@ -41,7 +41,7 @@
return
switch(eye_damaged)
if(BLURRY_VISION_ONE, BLURRY_VISION_TWO)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/impaired, eye_damaged)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/scaled/impaired, eye_damaged)
if(BLIND_VISION_THREE)
owner.become_blind(EYE_DAMAGE)
if(ishuman(owner))
@@ -106,7 +106,7 @@
else if(eye_damaged == BLIND_VISION_THREE)
owner.become_blind(EYE_DAMAGE)
if(eye_damaged && eye_damaged != BLIND_VISION_THREE)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/impaired, eye_damaged)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/scaled/impaired, eye_damaged)
else
owner.clear_fullscreen("eye_damage")