You can no longer see hud / screen when asleep. DOESN'T AFFECT BLINDNESS (#24360)

* You can no longer see hud / screen when asleep

* oh fuck the huds

* Update code/_onclick/hud/robot_hud.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* storing when looking into a bug

* more tweaks

* Initial screen object fixes

* fix for old screen types

* animation my dear watson

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2024-05-05 09:42:12 +00:00
committed by GitHub
co-authored by Contrabang S34N
parent 1823eff1b5
commit 9ae66dd496
32 changed files with 156 additions and 96 deletions
+3 -1
View File
@@ -171,9 +171,11 @@
#define HUD_STYLE_STANDARD 1
#define HUD_STYLE_REDUCED 2
#define HUD_STYLE_NOHUD 3
#define HUD_STYLE_ACTIONHUD 4
#define HUD_VERSIONS 3 //used in show_hud()
#define HUD_VERSIONS 4 //used in show_hud()
//1 = standard hud
//2 = reduced hud (just hands and intent switcher)
//3 = no hud (for screenshots)
//4 = Only action buttons (so vampires / changelings and such can use abilities while asleep)
+73 -38
View File
@@ -1,21 +1,30 @@
/mob/proc/overlay_fullscreen(category, type, severity)
/mob/proc/overlay_fullscreen(category, type, severity, animated = 0)
var/atom/movable/screen/fullscreen/screen = screens[category]
var/is_centered = istype(screen, /atom/movable/screen/fullscreen/center)
if(!screen || screen.type != type)
// needs to be recreated
clear_fullscreen(category, FALSE)
screens[category] = screen = new type()
else if((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
else if((!severity || severity == screen.severity) && (!is_centered && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view)))
// doesn't need to be updated
return screen
screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
if(client && screen.should_show_to(src))
screen.update_for_view(client.view)
if(animated)
INVOKE_ASYNC(src, PROC_REF(apply_screen_animation), animated, screen)
if(!is_centered)
screen.update_for_view(client.view)
client.screen += screen
return screen
/mob/proc/apply_screen_animation(animated = 0, atom/movable/screen/fullscreen/screen)
screen.alpha = 0
animate(screen, alpha = 255, time = animated)
/mob/proc/clear_fullscreen(category, animated = 10)
var/atom/movable/screen/fullscreen/screen = screens[category]
if(!screen)
@@ -30,10 +39,11 @@
if(client)
client.screen -= screen
qdel(screen)
else
if(client)
client.screen -= screen
qdel(screen)
return
if(client)
client.screen -= screen
qdel(screen)
/mob/proc/clear_fullscreens()
for(var/category in screens)
@@ -46,28 +56,21 @@
for(var/category in screens)
screen = screens[category]
if(screen.should_show_to(mymob))
screen.update_for_view(mymob.client.view)
mymob.client.screen |= screen
else
mymob.client.screen -= screen
continue
mymob.client.screen -= screen
/atom/movable/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
var/view
layer = FULLSCREEN_LAYER
plane = FULLSCREEN_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/view = 7
var/severity = 0
var/show_when_dead = FALSE
/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if(screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD)
return FALSE
@@ -77,51 +80,62 @@
severity = 0
return ..()
/atom/movable/screen/fullscreen/brute
/// Stretch version is suitable for images that stick to screen edges, as they scale with user screen size
/// For centrally located screen objects, use /atom/movable/screen/fullscreen/center
/atom/movable/screen/fullscreen/stretch
view = 7
/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if(screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/atom/movable/screen/fullscreen/stretch/brute
icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER
/atom/movable/screen/fullscreen/oxy
/atom/movable/screen/fullscreen/stretch/oxy
icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER
/atom/movable/screen/fullscreen/crit
/atom/movable/screen/fullscreen/stretch/crit
icon_state = "passage"
layer = CRIT_LAYER
/atom/movable/screen/fullscreen/blind
/atom/movable/screen/fullscreen/stretch/blind
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
/atom/movable/screen/fullscreen/impaired
/atom/movable/screen/fullscreen/stretch/impaired
icon_state = "impairedoverlay"
/atom/movable/screen/fullscreen/payback
/atom/movable/screen/fullscreen/stretch/payback
icon = 'icons/mob/screen_payback.dmi'
icon_state = "payback"
show_when_dead = TRUE
/atom/movable/screen/fullscreen/fog
/atom/movable/screen/fullscreen/stretch/fog
icon = 'icons/mob/screen_fog.dmi'
icon_state = "fog"
color = "#FF0000"
/atom/movable/screen/fullscreen/flash
/atom/movable/screen/fullscreen/stretch/flash
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
/atom/movable/screen/fullscreen/flash/noise
/atom/movable/screen/fullscreen/stretch/flash/noise
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/atom/movable/screen/fullscreen/high
/atom/movable/screen/fullscreen/stretch/high
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
/atom/movable/screen/fullscreen/lighting_backdrop
/atom/movable/screen/fullscreen/stretch/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
transform = matrix(200, 0, 0, 0, 200, 0)
@@ -130,18 +144,18 @@
show_when_dead = TRUE
//Provides darkness to the back of the lighting plane
/atom/movable/screen/fullscreen/lighting_backdrop/lit
/atom/movable/screen/fullscreen/stretch/lighting_backdrop/lit
invisibility = INVISIBILITY_LIGHTING
layer = BACKGROUND_LAYER+21
color = "#000"
show_when_dead = TRUE
//Provides whiteness in case you don't see lights so everything is still visible
/atom/movable/screen/fullscreen/lighting_backdrop/unlit
/atom/movable/screen/fullscreen/stretch/lighting_backdrop/unlit
layer = BACKGROUND_LAYER+20
show_when_dead = TRUE
/atom/movable/screen/fullscreen/see_through_darkness
/atom/movable/screen/fullscreen/stretch/see_through_darkness
icon_state = "nightvision"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
@@ -149,7 +163,7 @@
show_when_dead = TRUE
/// An effect which tracks the cursor's location on the screen
/atom/movable/screen/fullscreen/cursor_catcher
/atom/movable/screen/fullscreen/stretch/cursor_catcher
icon_state = "fullscreen_blocker" // Fullscreen semi transparent icon
plane = HUD_PLANE
mouse_opacity = MOUSE_OPACITY_ICON
@@ -167,14 +181,14 @@
var/mouse_params
/// Links this up with a mob
/atom/movable/screen/fullscreen/cursor_catcher/proc/assign_to_mob(mob/owner)
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/assign_to_mob(mob/owner)
src.owner = owner
view_list = getviewsize(owner.client.view)
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
calculate_params()
/// Update when the mob we're assigned to has moved
/atom/movable/screen/fullscreen/cursor_catcher/proc/on_move(atom/source, atom/oldloc, dir, forced)
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/on_move(atom/source, atom/oldloc, dir, forced)
SIGNAL_HANDLER
if(!given_turf)
@@ -183,19 +197,18 @@
var/y_offset = source.loc.y - oldloc.y
given_turf = locate(given_turf.x + x_offset, given_turf.y + y_offset, given_turf.z)
/atom/movable/screen/fullscreen/cursor_catcher/MouseEntered(location, control, params)
/atom/movable/screen/fullscreen/stretch/cursor_catcher/MouseEntered(location, control, params)
. = ..()
MouseMove(location, control, params)
if(usr == owner)
calculate_params()
/atom/movable/screen/fullscreen/cursor_catcher/MouseMove(location, control, params)
/atom/movable/screen/fullscreen/stretch/cursor_catcher/MouseMove(location, control, params)
if(usr != owner)
return
mouse_params = params
/atom/movable/screen/fullscreen/cursor_catcher/proc/calculate_params()
/atom/movable/screen/fullscreen/stretch/cursor_catcher/proc/calculate_params()
var/list/modifiers = params2list(mouse_params)
var/icon_x = text2num(LAZYACCESS(modifiers, "vis-x"))
if(isnull(icon_x))
@@ -209,6 +222,28 @@
given_x = round(icon_x - world.icon_size * our_x, 1)
given_y = round(icon_y - world.icon_size * our_y, 1)
/// Centered fullscreen atoms
/// These are used to center a widescreen image so it scales properly across screen sizes, not suitable for screen images that eminate from the edge of the screen
/atom/movable/screen/fullscreen/center
appearance_flags = TILE_BOUND
/atom/movable/screen/fullscreen/center/Initialize(mapload)
. = ..()
var/icon/I = new(icon)
var/x_offset = -((I.Width() - world.icon_size) / 2)
var/y_offset = -((I.Height() - world.icon_size) / 2)
qdel(I)
screen_loc = "CENTER:[x_offset],CENTER:[y_offset]"
/atom/movable/screen/fullscreen/center/blind/sleeping
icon = 'icons/mob/screen_sleeping.dmi'
icon_state = "sleepblind"
layer = BLIND_LAYER
/atom/movable/screen/fullscreen/center/blind/disky
icon = 'icons/mob/screen_tight.dmi'
icon_state = "disky"
layer = BLIND_LAYER
#undef FULLSCREEN_LAYER
#undef BLIND_LAYER
+12
View File
@@ -210,6 +210,15 @@
if(length(infodisplay))
mymob.client.screen -= infodisplay
if(HUD_STYLE_ACTIONHUD) //No HUD
hud_shown = TRUE //Governs behavior of other procs
if(static_inventory.len)
mymob.client.screen -= static_inventory
if(toggleable_inventory.len)
mymob.client.screen -= toggleable_inventory
if(infodisplay.len)
mymob.client.screen -= infodisplay
hud_version = display_hud_version
persistent_inventory_update()
mymob.update_action_buttons(1)
@@ -244,6 +253,9 @@
return
/mob/proc/hide_hud()
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) && isliving(src))
to_chat(src, "<span class='warning'>You can not change huds while asleep!</span>")
return
if(hud_used && client)
hud_used.show_hud() //Shows the next hud preset
to_chat(src, "<span class='info'>Switched HUD mode. Press the key you just pressed to toggle the HUD mode again.</span>")
+3 -3
View File
@@ -59,7 +59,7 @@
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_white.dmi', ui_color = "#ffffff", ui_alpha = 255)
..()
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/stretch/see_through_darkness)
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
@@ -393,7 +393,7 @@
if(!mymob)
return
var/mob/living/carbon/human/H = mymob
if(inventory_shown && hud_shown)
if(inventory_shown && hud_version == HUD_STYLE_STANDARD)
if(H.shoes)
H.shoes.screen_loc = ui_shoes
H.client.screen += H.shoes
@@ -436,7 +436,7 @@
if(!mymob)
return
var/mob/living/carbon/human/H = mymob
if(hud_shown)
if(hud_version == HUD_STYLE_STANDARD)
if(H.s_store)
H.s_store.screen_loc = ui_sstore1
H.client.screen += H.s_store
+1 -1
View File
@@ -10,7 +10,7 @@
static_inventory += using
action_intent = using
user.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
user.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/stretch/see_through_darkness)
/datum/hud/corgi/New(mob/user)
..()
+2 -2
View File
@@ -44,8 +44,8 @@
/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
. = ..()
mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/lighting_backdrop/unlit)
mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/stretch/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/stretch/lighting_backdrop/unlit)
/atom/movable/screen/plane_master/lighting/Initialize()
. = ..()
+1 -1
View File
@@ -205,7 +205,7 @@
if(!R.module)
return
if(R.shown_robot_modules && hud_shown)
if(R.shown_robot_modules && hud_version == HUD_STYLE_STANDARD)
//Modules display is shown
R.client.screen += module_store_icon //"store" icon
+2 -2
View File
@@ -670,13 +670,13 @@
return ..()
/datum/status_effect/drill_payback/on_apply()
owner.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 0)
owner.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/stretch/payback, 0)
addtimer(CALLBACK(src, PROC_REF(payback_phase_2)), 2.7 SECONDS)
return TRUE
/datum/status_effect/drill_payback/proc/payback_phase_2()
owner.clear_fullscreen("payback")
owner.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 1)
owner.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/stretch/payback, 1)
/datum/status_effect/drill_payback/tick() //They are not staying down. This will be a fight.
if(!drilled_successfully && (get_dist(owner, drilled) >= 9)) //We don't want someone drilling the safe at arivals then raiding bridge with the buff
+2 -2
View File
@@ -1023,7 +1023,7 @@
/datum/status_effect/bubblegum_curse/on_creation(mob/living/new_owner, mob/living/source)
. = ..()
source_UID = source.UID()
owner.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/fog, 1)
owner.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/stretch/fog, 1)
/datum/status_effect/bubblegum_curse/tick()
var/mob/living/simple_animal/hostile/megafauna/bubblegum/attacker = locateUID(source_UID)
@@ -1031,7 +1031,7 @@
qdel(src)
if(attacker.health <= attacker.maxHealth / 2)
owner.clear_fullscreen("Bubblegum")
owner.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/fog, 2)
owner.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/stretch/fog, 2)
if(!coward_checking)
if(owner.z != attacker.z)
addtimer(CALLBACK(src, PROC_REF(onstation_coward_callback)), 12 SECONDS)
+1 -1
View File
@@ -398,7 +398,7 @@
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
if(view_range == short_range) //unfocused
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/stretch/impaired, 2)
/obj/machinery/camera/update_remote_sight(mob/living/user)
if(isXRay() && isAI(user))
@@ -208,7 +208,7 @@
if(final)
playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE)
remote_eye.setLoc(get_turf(final))
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/noise)
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/stretch/flash/noise)
C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console!
else
playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE)
@@ -374,7 +374,7 @@
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/stretch/impaired, 1)
/obj/structure/closet/ex_act(severity)
for(var/atom/A in contents)
+2 -2
View File
@@ -241,7 +241,7 @@
/obj/structure/morgue/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/stretch/impaired, 2)
/*
* Morgue tray
@@ -534,7 +534,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/crematorium/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/stretch/impaired, 2)
/*
* Crematorium tray
+2 -2
View File
@@ -359,13 +359,13 @@ GLOBAL_LIST_EMPTY(safes)
drill.song.start_playing(driller)
notify_ghosts("Security assault in progress in [get_area(src)]!", enter_link="<a href=byond://?src=[UID()];follow=1>(Click to jump to!)</a>", source = src, action = NOTIFY_FOLLOW)
for(var/mob/dead/observer/O in GLOB.player_list)
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 0)
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/stretch/payback, 0)
addtimer(CALLBACK(src, PROC_REF(ghost_payback_phase_2)), 2.7 SECONDS)
/obj/structure/safe/proc/ghost_payback_phase_2()
for(var/mob/dead/observer/O in GLOB.player_list)
O.clear_fullscreen("payback")
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/payback, 1)
O.overlay_fullscreen("payback", /atom/movable/screen/fullscreen/stretch/payback, 1)
addtimer(CALLBACK(src, PROC_REF(clear_payback)), 2 MINUTES)
/obj/structure/safe/proc/clear_payback()
@@ -482,7 +482,7 @@
return
/obj/machinery/atmospherics/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/stretch/impaired, 1)
/obj/machinery/atmospherics/unary/cryo_cell/update_remote_sight(mob/living/user)
return //we don't see the pipe network while inside cryo.
@@ -72,7 +72,7 @@
inv.update_icon()
if(wear_suit)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
wear_suit.screen_loc = ui_oclothing //TODO //...draw the item in the inventory screen
client.screen += wear_suit //Either way, add the item to the HUD
@@ -319,7 +319,7 @@
severity = 9
if(-INFINITY to -95)
severity = 10
overlay_fullscreen("crit", /atom/movable/screen/fullscreen/crit, severity)
overlay_fullscreen("crit", /atom/movable/screen/fullscreen/stretch/crit, severity)
else if(stat == CONSCIOUS)
if(check_death_method())
clear_fullscreen("crit")
@@ -340,7 +340,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/stretch/oxy, severity)
else
clear_fullscreen("oxy")
@@ -356,7 +356,7 @@
if(45 to 70) severity = 4
if(70 to 85) severity = 5
if(85 to INFINITY) severity = 6
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/stretch/brute, severity)
else
clear_fullscreen("brute")
@@ -353,7 +353,7 @@
if((E && (E.status & ORGAN_DEAD)) || !.)
return FALSE
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/flash)
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash)
//Parent proc checks if a mob can_be_flashed()
. = ..()
@@ -1201,9 +1201,9 @@ so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/update_tint()
var/tinttotal = get_total_tint()
if(tinttotal >= TINT_BLIND)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/blind)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/stretch/blind)
else if(tinttotal >= TINT_IMPAIR)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 2)
overlay_fullscreen("tint", /atom/movable/screen/fullscreen/stretch/impaired, 2)
else
clear_fullscreen("tint", 0)
@@ -567,7 +567,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(w_uniform && istype(w_uniform, /obj/item/clothing/under))
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
w_uniform.screen_loc = ui_iclothing //...draw the item in the inventory screen
client.screen += w_uniform //Either way, add the item to the HUD
@@ -644,7 +644,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(wear_id)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
wear_id.screen_loc = ui_id
client.screen += wear_id
@@ -660,7 +660,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(gloves)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
gloves.screen_loc = ui_gloves //...draw the item in the inventory screen
client.screen += gloves //Either way, add the item to the HUD
@@ -702,7 +702,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
if(glasses)
var/mutable_appearance/new_glasses
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
client.screen += glasses //Either way, add the item to the HUD
@@ -744,7 +744,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
if(l_ear || r_ear)
if(l_ear)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
l_ear.screen_loc = ui_l_ear //...draw the item in the inventory screen
client.screen += l_ear //Either way, add the item to the HUD
@@ -761,7 +761,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays_standing[EARS_LAYER] = mutable_appearance('icons/mob/clothing/ears.dmi', "[t_type]", layer = -EARS_LAYER)
if(r_ear)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
r_ear.screen_loc = ui_r_ear //...draw the item in the inventory screen
client.screen += r_ear //Either way, add the item to the HUD
@@ -786,7 +786,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(shoes)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
shoes.screen_loc = ui_shoes //...draw the item in the inventory screen
client.screen += shoes //Either way, add the item to the HUD
@@ -822,7 +822,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(s_store)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
s_store.screen_loc = ui_sstore1
client.screen += s_store
@@ -872,7 +872,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
if(inv)
inv.update_icon()
if(hud_used.hud_shown && belt)
if(hud_used.hud_version == HUD_STYLE_STANDARD && belt)
client.screen += belt
belt.screen_loc = ui_belt
@@ -899,7 +899,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
inv.update_icon()
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit))
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown) //if the inventory is open ...
wear_suit.screen_loc = ui_oclothing //TODO //...draw the item in the inventory screen
client.screen += wear_suit //Either way, add the item to the HUD
@@ -948,7 +948,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
if(inv)
inv.update_icon()
if(hud_used.hud_shown)
if(hud_used.hud_version == HUD_STYLE_STANDARD)
if(l_store)
client.screen += l_store
l_store.screen_loc = ui_storage1
@@ -1082,21 +1082,21 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
//update whether our head item appears on our hud.
/mob/living/carbon/human/update_hud_head(obj/item/I)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown)
I.screen_loc = ui_head
client.screen += I
//update whether our mask item appears on our hud.
/mob/living/carbon/human/update_hud_wear_mask(obj/item/I)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
if(hud_used.inventory_shown)
I.screen_loc = ui_mask
client.screen += I
//update whether our back item appears on our hud.
/mob/living/carbon/human/update_hud_back(obj/item/I)
if(client && hud_used && hud_used.hud_shown)
if(client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD)
I.screen_loc = ui_back
client.screen += I
@@ -13,7 +13,7 @@
/mob/living/carbon/human/update_nearsighted_effects()
var/obj/item/clothing/glasses/G = glasses
if(HAS_TRAIT(src, TRAIT_NEARSIGHT) && (!istype(G) || !G.prescription))
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/stretch/impaired, 1)
else
clear_fullscreen("nearsighted")
+1 -1
View File
@@ -828,7 +828,7 @@
return TRUE
//called when the mob receives a bright flash
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/flash)
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash)
if(can_be_flashed(intensity, override_blindness_check))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), "flash", 25), 25)
+1 -1
View File
@@ -173,7 +173,7 @@
healths.icon_state = "health7"
severity = 6
if(severity > 0)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/stretch/brute, severity)
else
clear_fullscreen("brute")
if(health <= HEALTH_THRESHOLD_CRIT)
@@ -1,12 +1,19 @@
/mob/living/update_blind_effects()
/mob/living/update_blind_effects(sleeping = FALSE)
if(!has_vision(information_only=TRUE))
overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind)
if(sleeping)
overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 2 SECONDS)
overlay_fullscreen("disky", /atom/movable/screen/fullscreen/center/blind/disky, animated = 7 SECONDS)
throw_alert("blind", /atom/movable/screen/alert/blind)
return TRUE
overlay_fullscreen("blind", /atom/movable/screen/fullscreen/stretch/blind)
throw_alert("blind", /atom/movable/screen/alert/blind)
return TRUE
else
clear_fullscreen("blind")
clear_fullscreen("sleepblind")
clear_fullscreen("disky")
clear_alert("blind")
return 0
return FALSE
/mob/living/update_blurry_effects()
var/atom/movable/plane_master_controller/game_plane_master_controller = hud_used?.plane_master_controllers[PLANE_MASTERS_GAME]
@@ -19,7 +26,7 @@
/mob/living/update_druggy_effects()
if(AmountDruggy())
overlay_fullscreen("high", /atom/movable/screen/fullscreen/high)
overlay_fullscreen("high", /atom/movable/screen/fullscreen/stretch/high)
throw_alert("high", /atom/movable/screen/alert/high)
sound_environment_override = SOUND_ENVIRONMENT_DRUGGED
else
@@ -29,7 +36,7 @@
/mob/living/update_nearsighted_effects()
if(HAS_TRAIT(src, TRAIT_NEARSIGHT))
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/stretch/impaired, 1)
else
clear_fullscreen("nearsighted")
@@ -447,7 +447,7 @@
/mob/living/silicon/get_access()
return IGNORE_ACCESS //silicons always have access
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash/noise)
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/stretch/flash/noise)
if(affect_silicon)
return ..()
@@ -141,7 +141,7 @@ Difficulty: Hard
H.apply_status_effect(STATUS_EFFECT_BUBBLEGUM_CURSE, src)
if(second_life)
H.clear_fullscreen("Bubblegum")
H.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/fog, 2)
H.overlay_fullscreen("Bubblegum", /atom/movable/screen/fullscreen/stretch/fog, 2)
/mob/living/simple_animal/hostile/megafauna/bubblegum/death(gibbed)
@@ -194,7 +194,7 @@
healths.icon_state = "slime_health7"
severity = 6
if(severity > 0)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
overlay_fullscreen("brute", /atom/movable/screen/fullscreen/stretch/brute, severity)
else
clear_fullscreen("brute")
+5 -1
View File
@@ -19,8 +19,10 @@
if(updating)
update_sight()
update_blind_effects()
update_blind_effects(TRUE)
set_typing_indicator(FALSE)
if(hud_used && client)
hud_used.show_hud(HUD_STYLE_ACTIONHUD)
return TRUE
@@ -41,6 +43,8 @@
if(updating)
update_sight()
update_blind_effects()
if(hud_used && client)
hud_used.show_hud(HUD_STYLE_STANDARD)
return TRUE
+1 -1
View File
@@ -1254,7 +1254,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
sync_nightvision_screen() //Sync up the overlay used for nightvision to the amount of see_in_dark a mob has. This needs to be called everywhere sync_lighting_plane_alpha() is.
/mob/proc/sync_nightvision_screen()
var/atom/movable/screen/fullscreen/see_through_darkness/S = screens["see_through_darkness"]
var/atom/movable/screen/fullscreen/stretch/see_through_darkness/S = screens["see_through_darkness"]
if(S)
var/suffix = ""
switch(see_in_dark)
+3 -3
View File
@@ -30,7 +30,7 @@
/// Overlay we add to each grabbed atom.
var/image/kinesis_icon
/// Our mouse movement catcher.
var/atom/movable/screen/fullscreen/cursor_catcher/kinesis/kinesis_catcher
var/atom/movable/screen/fullscreen/stretch/cursor_catcher/kinesis/kinesis_catcher
/// The sounds playing while we grabbed an object.
var/datum/looping_sound/kinesis/soundloop
///The pixel_X of whatever we were grabbing before hand.
@@ -83,7 +83,7 @@
pre_pixel_x = grabbed_atom.pixel_x
pre_pixel_y = grabbed_atom.pixel_y
beam.chain = beam.Beam(grabbed_atom, icon_state = "kinesis", icon='icons/effects/beam.dmi', time = 100 SECONDS, maxdistance = 15, beam_type = /obj/effect/ebeam, beam_sleep_time = 3)
kinesis_catcher = mod.wearer.overlay_fullscreen("kinesis", /atom/movable/screen/fullscreen/cursor_catcher/kinesis, 0)
kinesis_catcher = mod.wearer.overlay_fullscreen("kinesis", /atom/movable/screen/fullscreen/stretch/cursor_catcher/kinesis, 0)
kinesis_catcher.assign_to_mob(mod.wearer)
soundloop.start()
START_PROCESSING(SSfastprocess, src)
@@ -249,7 +249,7 @@
complexity = 0
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
/atom/movable/screen/fullscreen/cursor_catcher/kinesis
/atom/movable/screen/fullscreen/stretch/cursor_catcher/kinesis
icon = 'icons/mob/screen_kinesis.dmi'
icon_state = "kinesis"
+1 -1
View File
@@ -545,7 +545,7 @@
/obj/machinery/disposal/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/stretch/impaired, 2)
/obj/machinery/disposal/force_eject_occupant(mob/target)
target.forceMove(get_turf(src))
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB