diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index a85befce77..a18fa2db63 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -119,7 +119,7 @@ var/list/_client_preferences_by_type /datum/client_preference/show_typing_indicator/toggled(var/mob/preference_mob, var/enabled) if(!enabled) - preference_mob.set_typing_indicator(0) + preference_mob.set_typing_indicator(FALSE) /datum/client_preference/show_ooc description ="OOC chat" diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index bcd4e3a0c1..4b225b55d4 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -98,11 +98,11 @@ toggle_preference(pref_path) - src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] see the speech indicator." + src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] have the speech indicator." prefs.save_preferences() - feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + feedback_add_details("admin_verb","TTIND") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggle_ahelp_sound() set name = "Toggle Admin Help Sound" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 589f410f01..82255877b2 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -706,34 +706,29 @@ return 0 /mob/living/silicon/robot/updateicon() - overlays.Cut() + cut_overlays() if(stat == CONSCIOUS) - overlays += "eyes-[module_sprites[icontype]]" + add_overlay("eyes-[module_sprites[icontype]]") if(opened) var/panelprefix = custom_sprite ? "[src.ckey]-[src.name]" : "ov" if(wiresexposed) - overlays += "[panelprefix]-openpanel +w" + add_overlay("[panelprefix]-openpanel +w") else if(cell) - overlays += "[panelprefix]-openpanel +c" + add_overlay("[panelprefix]-openpanel +c") else - overlays += "[panelprefix]-openpanel -c" + add_overlay("[panelprefix]-openpanel -c") if(has_active_type(/obj/item/borg/combat/shield)) var/obj/item/borg/combat/shield/shield = locate() in src if(shield && shield.active) - overlays += "[module_sprites[icontype]]-shield" + add_overlay("[module_sprites[icontype]]-shield") if(modtype == "Combat") if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) icon_state = "[module_sprites[icontype]]-roll" else icon_state = module_sprites[icontype] - return - - if(typing) - typing = FALSE - set_typing_indicator(1) /mob/living/silicon/robot/proc/installed_modules() if(weapon_lock) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index cc446a0488..cdc6b6af74 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -219,9 +219,7 @@ var/get_rig_stats = 0 //Moved from computer.dm - - var/hud_typing = 0 //Typing indicator stuff. - var/typing //Simple mobs use this variable. + var/typing var/obj/effect/decal/typing_indicator var/low_priority = FALSE //Skip processing life() if there's just no players on this Z-level diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index b5add4f23f..206450c909 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -11,7 +11,7 @@ set name = "Say" set category = "IC" - set_typing_indicator(0) + set_typing_indicator(FALSE) usr.say(message) /mob/verb/me_verb(message as text) @@ -24,7 +24,7 @@ message = sanitize(message) - set_typing_indicator(0) + set_typing_indicator(FALSE) if(use_me) usr.emote("me",usr.emote_type,message) else diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index 5b164a8499..5f0d089454 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -1,41 +1,34 @@ /mob/proc/set_typing_indicator(var/state) //Leaving this here for mobs. + if(!is_preference_enabled(/datum/client_preference/show_typing_indicator)) + cut_overlay(typing_indicator, TRUE) + return + if(!typing_indicator) typing_indicator = new typing_indicator.icon = 'icons/mob/talk.dmi' typing_indicator.icon_state = "[speech_bubble_appearance()]_typing" - if(client && !stat) - typing_indicator.invisibility = invisibility - if(!is_preference_enabled(/datum/client_preference/show_typing_indicator)) - add_overlay(typing_indicator) - else - if(state) - if(!typing) - add_overlay(typing_indicator) - typing = 1 - else - if(typing) - cut_overlay(typing_indicator) - typing = 0 - return state + if(state && !typing) + add_overlay(typing_indicator, TRUE) + typing = TRUE + else if(typing) + cut_overlay(typing_indicator, TRUE) + typing = FALSE + + if(shadow) //Multi-Z above-me shadows + shadow.set_typing_indicator(state) + + return state /mob/verb/say_wrapper() set name = ".Say" set hidden = 1 - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(1) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 1 - + set_typing_indicator(TRUE) var/message = input("","say (text)") as text - - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(0) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 0 - + set_typing_indicator(FALSE) + if(message) say_verb(message) @@ -43,17 +36,9 @@ set name = ".Me" set hidden = 1 - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(1) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 1 - + set_typing_indicator(TRUE) var/message = input("","me (text)") as text - - if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 0 - else if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(0) + set_typing_indicator(FALSE) if(message) me_verb(message) diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index 10af55f5a3..f5648abf59 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -117,13 +117,6 @@ if(shadow) shadow.visible_message(message, self_message, blind_message) -// We should show the typing indicator so people above us can tell we're about to talk. -/mob/set_typing_indicator(var/state) - var/old_typing = src.typing - . = ..() - if(shadow && old_typing != src.typing) - shadow.set_typing_indicator(state) // Okay the real proc changed something! That means we should handle things too - /mob/zshadow/set_typing_indicator(var/state) if(!typing_indicator) typing_indicator = new