mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Improved typing indicator episode 2 the revenge (#28120)
* Improved typing indicator episode 2 the revenge * lil oops
This commit is contained in:
@@ -47,6 +47,7 @@ var/datum/subsystem/more_init/SSmore_init
|
|||||||
|
|
||||||
init_wizard_apprentice_setups()
|
init_wizard_apprentice_setups()
|
||||||
machinery_rating_cache = cache_machinery_components_rating()
|
machinery_rating_cache = cache_machinery_components_rating()
|
||||||
|
typing_indicator = new
|
||||||
|
|
||||||
/proc/cache_machinery_components_rating()
|
/proc/cache_machinery_components_rating()
|
||||||
var/list/cache = list()
|
var/list/cache = list()
|
||||||
|
|||||||
@@ -5,32 +5,23 @@ I IS TYPIN'!'
|
|||||||
|
|
||||||
// Ported from Baystation12 : https://github.com/Baystation12/Baystation12
|
// Ported from Baystation12 : https://github.com/Baystation12/Baystation12
|
||||||
|
|
||||||
/mob
|
var/atom/movable/typing_indicator/typing_indicator
|
||||||
var/atom/movable/overlay/typing_indicator/typing_indicator = null
|
|
||||||
|
|
||||||
/atom/movable/overlay/typing_indicator
|
/atom/movable/typing_indicator
|
||||||
icon = 'icons/mob/talk.dmi'
|
icon = 'icons/mob/talk.dmi'
|
||||||
icon_state = "talking"
|
icon_state = "talking"
|
||||||
|
vis_flags = VIS_INHERIT_ID
|
||||||
|
|
||||||
/atom/movable/overlay/typing_indicator/New()
|
/atom/movable/typing_indicator/Destroy()
|
||||||
. = ..()
|
stack_trace("Something deleted the global typing indicator. Probably not intended.")
|
||||||
if(!istype(master, /mob))
|
return ..()
|
||||||
CRASH("Master of typing_indicator has invalid type: [master.type].")
|
|
||||||
|
|
||||||
/atom/movable/overlay/typing_indicator/Destroy()
|
|
||||||
var/mob/M = master
|
|
||||||
M.typing_indicator = null
|
|
||||||
. = ..()
|
|
||||||
|
|
||||||
/mob/proc/create_typing_indicator()
|
/mob/proc/create_typing_indicator()
|
||||||
if(client && !stat && client.prefs.typing_indicator && src.is_visible() && isturf(src.loc))
|
if(client && !stat && client.prefs.typing_indicator && src.is_visible() && isturf(src.loc))
|
||||||
if(!typing_indicator)
|
vis_contents |= typing_indicator
|
||||||
typing_indicator = new(src)
|
|
||||||
typing_indicator.invisibility = 0
|
|
||||||
|
|
||||||
/mob/proc/remove_typing_indicator() // A bit excessive, but goes with the creation of the indicator I suppose
|
/mob/proc/remove_typing_indicator()
|
||||||
if(typing_indicator)
|
vis_contents -= typing_indicator
|
||||||
typing_indicator.invisibility = INVISIBILITY_MAXIMUM
|
|
||||||
|
|
||||||
/mob/Logout()
|
/mob/Logout()
|
||||||
remove_typing_indicator()
|
remove_typing_indicator()
|
||||||
|
|||||||
Reference in New Issue
Block a user