diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 9147b7851b6..496298adfa6 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -5,7 +5,7 @@ /mob/proc/set_fullscreen(condition, screen_name, screen_type, arg) condition ? overlay_fullscreen(screen_name, screen_type, arg) : clear_fullscreen(screen_name) -/mob/proc/overlay_fullscreen(category, type, severity) +/mob/proc/overlay_fullscreen(category, type, severity, animated = 0) var/obj/screen/fullscreen/screen = screens[category] if(screen) @@ -17,6 +17,8 @@ if(!screen) screen = new type() + if(animated) + screen.alpha = 0 screen.icon_state = "[initial(screen.icon_state)][severity]" screen.severity = severity @@ -24,6 +26,8 @@ screens[category] = screen if(client && (stat != DEAD || screen.allstate)) client.screen += screen + if(animated) + animate(screen, alpha = initial(screen.alpha), time = animated) return screen /mob/proc/clear_fullscreen(category, animated = 10) diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm index ab5db7d0e78..9bdb4a56c7e 100644 --- a/code/game/objects/items/weapons/candle.dm +++ b/code/game/objects/items/weapons/candle.dm @@ -57,7 +57,7 @@ if(!wax) new /obj/item/trash/candle(src.loc) if(istype(src.loc, /mob)) - src.dropped() + src.dropped(user) to_chat(user, SPAN_NOTICE("The candle burns out.")) playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1) STOP_PROCESSING(SSprocessing, src) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 80c2b6d03d0..67966e7b3aa 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -90,6 +90,18 @@ return 0 return 1 +// putting on to a slot +/obj/item/clothing/equipped(mob/user, slot, assisted_equip) + . = ..() + if(tint) + user.handle_vision() + +// taking off +/obj/item/clothing/dropped(mob/user) + . = ..() + if(tint) + user.handle_vision() + /obj/item/clothing/proc/return_own_image() var/image/our_image if(icon_override) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 5d75ce3e1fa..ff234238435 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -519,6 +519,7 @@ BLIND // can't see anything to_chat(usr, "You push \the [src] up out of your face.") update_clothing_icon() usr.update_action_buttons() + usr.handle_vision() /obj/item/clothing/glasses/aug/welding name = "glare dampeners" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index bc1d9ffeee8..2cdfe9c95f7 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -76,6 +76,7 @@ to_chat(usr, "You push the [src] up out of your face.") update_clothing_icon() //so our mob-overlays usr.update_action_buttons() + usr.handle_vision() /* @@ -224,7 +225,7 @@ new /obj/item/clothing/head/pumpkin(src.loc) new /obj/item/trash/candle(src.loc) if(istype(src.loc, /mob)) - src.dropped() + src.dropped(user) to_chat(user, SPAN_NOTICE("The candle burns out.")) playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1) STOP_PROCESSING(SSprocessing, src) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 298688cd220..895a01fe6df 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -700,7 +700,7 @@ playsound(src, 'sound/machines/rig/rig_retract.ogg', 20, FALSE) use_obj.canremove = 1 holder.drop_from_inventory(use_obj,get_turf(src)) //TODO: TEST THIS CODE! - use_obj.dropped() + use_obj.dropped(wearer) use_obj.canremove = 0 use_obj.forceMove(src) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 9caf728e481..ac2cae6889a 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -170,7 +170,7 @@ var/list/slot_equipment_priority = list( \ else W.forceMove(get_turf(W)) W.layer = initial(W.layer) - W.dropped() + W.dropped(src) return 0 // Removes an item from inventory and places it in the target atom. diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index d0ac2aa6099..2b27491f899 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -521,7 +521,10 @@ H.set_fullscreen(H.stat == UNCONSCIOUS, "blackout", /obj/screen/fullscreen/blackout) if(config.welder_vision) - H.set_fullscreen(H.equipment_tint_total, "welder", /obj/screen/fullscreen/impaired, H.equipment_tint_total) + if(H.equipment_tint_total) + H.overlay_fullscreen("welder", /obj/screen/fullscreen/impaired, H.equipment_tint_total, 0.5 SECONDS) + else + H.clear_fullscreen("welder") var/how_nearsighted = get_how_nearsighted(H) H.set_fullscreen(how_nearsighted, "nearsighted", /obj/screen/fullscreen/oxy, how_nearsighted) H.set_fullscreen(H.eye_blurry, "blurry", /obj/screen/fullscreen/blurry) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 4a9d225341a..9eaa8b1b1bb 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -126,7 +126,7 @@ return FALSE return TRUE -/mob/living/proc/handle_vision() +/mob/living/handle_vision() update_sight() if(stat == DEAD) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index c00cc573962..dfa9c62e90f 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1246,4 +1246,7 @@ proc/is_blind(A) if(r_grab.wielded) . = max(MOB_GRAB_FIREMAN, .) else - . = max(MOB_GRAB_NORMAL, .) \ No newline at end of file + . = max(MOB_GRAB_NORMAL, .) + +/mob/proc/handle_vision() + return diff --git a/html/changelogs/geeves-better_screen_tints.yml b/html/changelogs/geeves-better_screen_tints.yml new file mode 100644 index 00000000000..3638233ce95 --- /dev/null +++ b/html/changelogs/geeves-better_screen_tints.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Improved the sprites for impaired vision, most commonly from wearing welding gear or unactivated hardsuits." + - rscadd: "Putting on or removing vision impairing equipment will now update it immediately, flipping welding mask/goggles will do the same. This also updates flash and welding protection." diff --git a/icons/mob/screen/full.dmi b/icons/mob/screen/full.dmi index 79dbd79f564..4098cc91720 100644 Binary files a/icons/mob/screen/full.dmi and b/icons/mob/screen/full.dmi differ diff --git a/icons/mob/screen_full.dmi b/icons/mob/screen_full.dmi deleted file mode 100644 index e8602a41ced..00000000000 Binary files a/icons/mob/screen_full.dmi and /dev/null differ