[MIRROR] AFK Status/Toggle (#8410)

Co-authored-by: Killian <49700375+KillianKirilenko@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-05-18 16:16:29 -07:00
committed by GitHub
parent f5ccf14fdf
commit 30fc646229
4 changed files with 15 additions and 0 deletions

View File

@@ -117,6 +117,19 @@
else
to_chat(src, span_blue("You are not injured enough to succumb to death!"))
/mob/living/verb/toggle_afk()
set name = "Toggle AFK"
set category = "IC.Game" //CHOMPEdit
set desc = "Mark yourself as Away From Keyboard, or clear that status!"
if(away_from_keyboard)
remove_status_indicator("afk")
to_chat(src, "<span class='notice'>You are no longer marked as AFK.</span>")
away_from_keyboard = FALSE
else
add_status_indicator("afk")
to_chat(src, "<span class='notice'>You are now marked as AFK.</span>")
away_from_keyboard = TRUE
/mob/living/proc/updatehealth()
if(status_flags & GODMODE)
health = 100

View File

@@ -972,6 +972,7 @@
cut_overlays()
if(typing) //CHOMPAdd, needed as we don't have priority overlays anymore
add_overlay(typing_indicator, TRUE) //CHOMPAdd, needed as we don't have priority overlays anymore
handle_status_indicators() //CHOMPAdd, needed as we don't have priority overlays anymore
icon = sprite_datum.sprite_icon
icon_state = sprite_datum.sprite_icon_state

View File

@@ -156,6 +156,7 @@
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
var/can_be_antagged = FALSE // To prevent pAIs/mice/etc from getting antag in autotraitor and future auto- modes. Uses inheritance instead of a bunch of typechecks.
var/away_from_keyboard = FALSE //are we at, or away, from our keyboard?
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now unused.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB