Silicon Chamo properly hides huds (#22312)

* hide hud

* more documentation

* Update code/modules/mob/mob_vars.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* Update code/modules/mob/mob_vars.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

---------

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
GDN
2023-11-01 15:10:15 -05:00
committed by GitHub
parent 357c62b6d7
commit e7b396eddf
11 changed files with 59 additions and 46 deletions
-13
View File
@@ -3,11 +3,6 @@
~Sayu
*/
// THESE DO NOT AFFECT THE BASE 1 DECISECOND DELAY OF NEXT_CLICK
/mob/var/next_move_adjust = 0 //Amount to adjust action delays by, + or -
/mob/var/next_move_modifier = 1 //Value to multiply action delays by
//Delays the mob's next action by num deciseconds
// eg: 10-3 = 7 deciseconds of delay
// eg: 10*0.5 = 5 deciseconds of delay
@@ -16,14 +11,6 @@
/mob/proc/changeNext_move(num)
next_move = world.time + ((num+next_move_adjust)*next_move_modifier)
// 1 decisecond click delay (above and beyond mob/next_move)
//This is mainly modified by click code, to modify click delays elsewhere, use next_move and changeNext_move()
/mob/var/next_click = 0
// THESE DO AFFECT THE BASE 1 DECISECOND DELAY OF NEXT_CLICK
/mob/var/next_click_adjust = 0
/mob/var/next_click_modifier = 1 //Value to multiply click delays by
//Delays the mob's next click by num deciseconds
// eg: 10-3 = 7 deciseconds of delay
// eg: 10*0.5 = 5 deciseconds of delay
+2
View File
@@ -81,6 +81,8 @@ GLOBAL_LIST_INIT(huds, list(
/datum/atom_hud/proc/add_to_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client
if(!M || !M.client || !A)
return
if(A.invisibility > M.see_invisible) // yee yee ass snowflake check for our yee yee ass snowflake huds
return
for(var/i in hud_icons)
if(A.hud_list[i])
M.client.images |= A.hud_list[i]
-2
View File
@@ -1,5 +1,3 @@
/mob/var/suiciding = 0
/mob/living/verb/suicide() // imagine this shit with BORERS lmao
set hidden = 1
@@ -14,11 +14,11 @@
/datum/action/changeling/digitalcamo/sting_action(mob/user)
if(HAS_TRAIT_FROM(user, TRAIT_AI_UNTRACKABLE, CHANGELING_TRAIT))
REMOVE_TRAIT(user, TRAIT_AI_UNTRACKABLE, CHANGELING_TRAIT)
user.invisibility = initial(user.invisibility)
user.set_invisible(INVISIBILITY_MINIMUM)
to_chat(user, "<span class='notice'>We return to normal.</span>")
else
ADD_TRAIT(user, TRAIT_AI_UNTRACKABLE, CHANGELING_TRAIT)
to_chat(user, "<span class='notice'>We distort our form to prevent AI-tracking.</span>")
user.invisibility = SEE_INVISIBLE_LIVING
user.set_invisible(SEE_INVISIBLE_LIVING)
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
return TRUE
@@ -45,12 +45,12 @@
. = ..()
if(slot == SLOT_HUD_JUMPSUIT)
ADD_TRAIT(user, TRAIT_AI_UNTRACKABLE, "silicon_cham[UID()]")
user.invisibility = SEE_INVISIBLE_LIVING
user.set_invisible(SEE_INVISIBLE_LIVING)
to_chat(user, "<span class='notice'>You feel a slight shiver as the cybernetic obfuscators activate.</span>")
/obj/item/clothing/under/syndicate/silicon_cham/dropped(mob/user)
. = ..()
if(user)
REMOVE_TRAIT(user, TRAIT_AI_UNTRACKABLE, "silicon_cham[UID()]")
user.invisibility = initial(user.invisibility)
user.set_invisible(INVISIBILITY_MINIMUM)
to_chat(user, "<span class='notice'>You feel a slight shiver as the cybernetic obfuscators deactivate.</span>")
@@ -1,11 +1,3 @@
/mob
var/bloody_hands = 0
var/list/feet_blood_DNA
var/feet_blood_color
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0, BLOOD_BASE_ALPHA = BLOODY_FOOTPRINT_BASE_ALPHA)
/obj/item/clothing/gloves
var/transfer_blood = 0
-3
View File
@@ -781,9 +781,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/proc/is_dead()
return stat == DEAD
/mob
var/newPlayerType = /mob/new_player
/mob/verb/abandon_mob()
set name = "Respawn"
set category = "OOC"
+13
View File
@@ -807,3 +807,16 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
/mob/proc/attempt_listen_to_deadsay()
/// Proc to PROPERLY set mob invisibility, huds gotta get set too!
/mob/proc/set_invisible(invis_value)
if(invis_value)
invisibility = invis_value
else
invisibility = initial(invisibility)
for(var/hud in hud_possible)
var/image/actual_hud = hud_list[hud]
if(invis_value)
actual_hud.invisibility = invis_value
else
actual_hud.invisibility = initial(actual_hud.invisibility)
+40 -5
View File
@@ -42,7 +42,6 @@
var/obj/machinery/machine = null
var/currently_grab_pulled = null /// only set while the move is ongoing, to prevent shuffling between pullees
var/memory = ""
var/next_move = null
var/notransform = FALSE //Carbon
/// True for left hand active, otherwise for right hand active
var/hand = null
@@ -216,8 +215,44 @@
var/runechat_msg_location
/// The datum receiving keyboard input. parent mob by default.
var/datum/input_focus = null
/// lazy list. contains /obj/screen/alert only. On /mob so clientless mobs will throw alerts properly
var/list/alerts
/// Is our mob currently suiciding? Used for suicide code along with many different revival checks
var/suiciding = FALSE
/// Used for some screen objects, such as
var/list/screens = list()
/// lazy list. contains /obj/screen/alert only, On /mob so clientless mobs will throw alerts properly
var/list/alerts
/// Makes items bloody if you touch them
var/bloody_hands = 0
/// Basically a lazy list, copies the DNA of blood you step in
var/list/feet_blood_DNA
/// affects the blood color of your feet, color taken from the blood you step in
var/feet_blood_color
/// Weirdly named, effects how blood transfers onto objects
var/blood_state = BLOOD_STATE_NOT_BLOODY
/// Assoc list for tracking how "bloody" a mobs feet are, used for creating bloody foot/shoeprints on turfs when moving
var/list/bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0, BLOOD_BASE_ALPHA = BLOODY_FOOTPRINT_BASE_ALPHA)
/// set when typing in an input window instead of chatline, this var could probably be removed soon enough
var/hud_typing = 0
/// Affects if you have a typing indicator
var/typing
/// Last thing we typed in to the typing indicator, probably does not need to exist
var/last_typed
/// Last time we typed something in to the typing popup
var/last_typed_time
// Ran after next_click on most item interactions, used in any case where we aren't required to use next click Eg: Action buttons
var/next_move
/// Unused, used to adjust our next move on a linar skill world.time + (how_many_deciseconds + Next move adjust) = Next move
var/next_move_adjust = 0
/// Value to multiply action delays by, actually used world.time + (how_many_deciseconds * Next move Adjust) = Next move
var/next_move_modifier = 1
// 1 decisecond click delay (above and beyond mob/next_move)
/// This is mainly modified by click code, to modify click delays elsewhere, use next_move and changeNext_move(), Controls the click delay. Changed with
var/next_click = 0
// Does not effect the build in tick delay of click, can't go below 1 click per tick
/// Unused
var/next_click_adjust = 0
/// Unused
var/next_click_modifier = 1
/// Tracks the open UIs that a mob has, used in TGUI for various things, such as updating UIs
var/list/open_uis = list()
-5
View File
@@ -1,10 +1,5 @@
#define TYPING_INDICATOR_LIFETIME 30 * 10 //grace period after which typing indicator disappears regardless of text in chatbar
/mob/var/hud_typing = 0 //set when typing in an input window instead of chatline
/mob/var/typing
/mob/var/last_typed
/mob/var/last_typed_time
GLOBAL_LIST_EMPTY(typing_indicator)
/**
-6
View File
@@ -116,12 +116,6 @@
*/
/datum/var/list/tgui_shared_states
/**
* global
*
* Used to track UIs for a mob.
*/
/mob/var/list/open_uis = list()
/**
* public
*