mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
POLARIS: Improve robot and typing overlays
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user