diff --git a/code/__DEFINES/hud_locations.dm b/code/__DEFINES/hud_locations.dm index 3c907ddf9b5..c475b4d7a4d 100644 --- a/code/__DEFINES/hud_locations.dm +++ b/code/__DEFINES/hud_locations.dm @@ -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) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index e93a0a206bd..afc30ca3422 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -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 diff --git a/code/_onclick/hud/hud_datum.dm b/code/_onclick/hud/hud_datum.dm index 804e0c0f90f..566e07c7bb9 100644 --- a/code/_onclick/hud/hud_datum.dm +++ b/code/_onclick/hud/hud_datum.dm @@ -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, "You can not change huds while asleep!") + return if(hud_used && client) hud_used.show_hud() //Shows the next hud preset to_chat(src, "Switched HUD mode. Press the key you just pressed to toggle the HUD mode again.") diff --git a/code/_onclick/hud/human_hud.dm b/code/_onclick/hud/human_hud.dm index 848fd46b2b9..68eb065069f 100644 --- a/code/_onclick/hud/human_hud.dm +++ b/code/_onclick/hud/human_hud.dm @@ -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 diff --git a/code/_onclick/hud/other_mobs_hud.dm b/code/_onclick/hud/other_mobs_hud.dm index 39fe3a31552..51e1562a73c 100644 --- a/code/_onclick/hud/other_mobs_hud.dm +++ b/code/_onclick/hud/other_mobs_hud.dm @@ -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) ..() diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index 321239833a4..bc7ae0dca0f 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -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() . = ..() diff --git a/code/_onclick/hud/robot_hud.dm b/code/_onclick/hud/robot_hud.dm index b2c692dfc32..30fae75f816 100644 --- a/code/_onclick/hud/robot_hud.dm +++ b/code/_onclick/hud/robot_hud.dm @@ -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 diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 38f94e4ce89..4e976e9e5d6 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -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 diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index e65da3535cd..1a93201a1d9 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -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) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 071cf52415f..d440e7624d3 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -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)) diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 8c5a22d2544..ee045ecb935 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -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) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 3dde46e83a2..151e2c22692 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 5d80c18fe1a..194ad6dd440 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -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 diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index bb77fd7f3e4..aedb6c68765 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -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="(Click to jump to!)", 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() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 4e696bc6025..0fac7c4668c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -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. diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm index 5732c200ee6..ac13fd82732 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm @@ -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 diff --git a/code/modules/mob/living/carbon/carbon_life.dm b/code/modules/mob/living/carbon/carbon_life.dm index 4f393cbe8ee..381443e3e9a 100644 --- a/code/modules/mob/living/carbon/carbon_life.dm +++ b/code/modules/mob/living/carbon/carbon_life.dm @@ -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") diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 1807cdb3533..6cbdbd9d46f 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 78100d015d6..feaad4085f9 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_update_status.dm b/code/modules/mob/living/carbon/human/human_update_status.dm index 855a3d39e74..ee7fe70d3ee 100644 --- a/code/modules/mob/living/carbon/human/human_update_status.dm +++ b/code/modules/mob/living/carbon/human/human_update_status.dm @@ -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") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7f083bd1755..b7bb510dc0f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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) diff --git a/code/modules/mob/living/living_life.dm b/code/modules/mob/living/living_life.dm index 1611a0a09c8..fad7b238c42 100644 --- a/code/modules/mob/living/living_life.dm +++ b/code/modules/mob/living/living_life.dm @@ -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) diff --git a/code/modules/mob/living/living_update_status.dm b/code/modules/mob/living/living_update_status.dm index 041d28afdf3..7394a6de87a 100644 --- a/code/modules/mob/living/living_update_status.dm +++ b/code/modules/mob/living/living_update_status.dm @@ -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") diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index a487def354f..42d8bf19b98 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -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 ..() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 94af1932245..09585012a39 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm index 4e880cfa7f7..16e4a8773f9 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm @@ -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") diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm index 8048e4cb75a..2d72e6e498a 100644 --- a/code/modules/mob/living/stat_states.dm +++ b/code/modules/mob/living/stat_states.dm @@ -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 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5bf5402ba26..b89bb7ec75a 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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) diff --git a/code/modules/mod/modules/module_kinesis.dm b/code/modules/mod/modules/module_kinesis.dm index dcacecc1737..c2c9242fb40 100644 --- a/code/modules/mod/modules/module_kinesis.dm +++ b/code/modules/mod/modules/module_kinesis.dm @@ -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" diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index f273631c1f5..76740a9a988 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -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)) diff --git a/icons/mob/screen_sleeping.dmi b/icons/mob/screen_sleeping.dmi new file mode 100644 index 00000000000..c86eff475d5 Binary files /dev/null and b/icons/mob/screen_sleeping.dmi differ diff --git a/icons/mob/screen_tight.dmi b/icons/mob/screen_tight.dmi new file mode 100644 index 00000000000..2bf7de62e4b Binary files /dev/null and b/icons/mob/screen_tight.dmi differ