diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index f95ff93ac3..7b2dd8663c 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -54,6 +54,10 @@
#define EXAMINE_POSITION_BEFORE 2
//End positions
#define COMPONENT_EXNAME_CHANGED 1
+#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): ()
+ #define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
+ #define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
+#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays)
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMPONENT_ATOM_BLOCK_EXIT 1
diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm
index 49bdd3f3c0..93c3b63d1e 100644
--- a/code/_onclick/hud/ai.dm
+++ b/code/_onclick/hud/ai.dm
@@ -195,89 +195,107 @@
// Language menu
using = new /obj/screen/language_menu
using.screen_loc = ui_borg_language_menu
+ using.hud = src
static_inventory += using
//AI core
using = new /obj/screen/ai/aicore()
using.screen_loc = ui_ai_core
+ using.hud = src
static_inventory += using
//Camera list
using = new /obj/screen/ai/camera_list()
using.screen_loc = ui_ai_camera_list
+ using.hud = src
static_inventory += using
//Track
using = new /obj/screen/ai/camera_track()
using.screen_loc = ui_ai_track_with_camera
+ using.hud = src
static_inventory += using
//Camera light
using = new /obj/screen/ai/camera_light()
using.screen_loc = ui_ai_camera_light
+ using.hud = src
static_inventory += using
//Crew Monitoring
using = new /obj/screen/ai/crew_monitor()
using.screen_loc = ui_ai_crew_monitor
+ using.hud = src
static_inventory += using
//Crew Manifest
using = new /obj/screen/ai/crew_manifest()
using.screen_loc = ui_ai_crew_manifest
+ using.hud = src
static_inventory += using
//Alerts
using = new /obj/screen/ai/alerts()
using.screen_loc = ui_ai_alerts
+ using.hud = src
static_inventory += using
//Announcement
using = new /obj/screen/ai/announcement()
using.screen_loc = ui_ai_announcement
+ using.hud = src
static_inventory += using
//Shuttle
using = new /obj/screen/ai/call_shuttle()
using.screen_loc = ui_ai_shuttle
+ using.hud = src
static_inventory += using
//Laws
using = new /obj/screen/ai/state_laws()
using.screen_loc = ui_ai_state_laws
+ using.hud = src
static_inventory += using
//PDA message
using = new /obj/screen/ai/pda_msg_send()
using.screen_loc = ui_ai_pda_send
+ using.hud = src
static_inventory += using
//PDA log
using = new /obj/screen/ai/pda_msg_show()
using.screen_loc = ui_ai_pda_log
+ using.hud = src
static_inventory += using
//Take image
using = new /obj/screen/ai/image_take()
using.screen_loc = ui_ai_take_picture
+ using.hud = src
static_inventory += using
//View images
using = new /obj/screen/ai/image_view()
using.screen_loc = ui_ai_view_images
+ using.hud = src
static_inventory += using
//Medical/Security sensors
using = new /obj/screen/ai/sensors()
using.screen_loc = ui_ai_sensor
+ using.hud = src
static_inventory += using
//Multicamera mode
using = new /obj/screen/ai/multicam()
using.screen_loc = ui_ai_multicam
+ using.hud = src
static_inventory += using
//Add multicamera camera
using = new /obj/screen/ai/add_multicam()
using.screen_loc = ui_ai_add_multicam
+ using.hud = src
static_inventory += using
diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm
index 1f6ba28391..94585cbd52 100644
--- a/code/_onclick/hud/alien.dm
+++ b/code/_onclick/hud/alien.dm
@@ -43,18 +43,20 @@
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
+ using.hud = src
static_inventory += using
- using = new /obj/screen/act_intent/alien()
- using.icon_state = mymob.a_intent
- static_inventory += using
- action_intent = using
+ action_intent = new /obj/screen/act_intent/alien()
+ action_intent.icon_state = mymob.a_intent
+ action_intent.hud = src
+ static_inventory += action_intent
if(isalienhunter(mymob))
var/mob/living/carbon/alien/humanoid/hunter/H = mymob
@@ -64,43 +66,52 @@
using = new/obj/screen/language_menu
using.screen_loc = ui_alien_language_menu
+ using.hud = src
static_inventory += using
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
+ using.hud = src
static_inventory += using
using = new /obj/screen/resist()
using.icon = ui_style
using.screen_loc = ui_pull_resist
+ using.hud = src
hotkeybuttons += using
throw_icon = new /obj/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
+ throw_icon.hud = src
hotkeybuttons += throw_icon
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist
static_inventory += pull_icon
//begin indicators
healths = new /obj/screen/healths/alien()
+ healths.hud = src
infodisplay += healths
alien_plasma_display = new /obj/screen/alien/plasma_display()
+ alien_plasma_display.hud = src
infodisplay += alien_plasma_display
if(!isalienqueen(mymob))
alien_queen_finder = new /obj/screen/alien/alien_queen_finder
+ alien_queen_finder.hud = src
infodisplay += alien_queen_finder
zone_select = new /obj/screen/zone_sel/alien()
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm
index 3ffdd66fcd..0f3c6ccf17 100644
--- a/code/_onclick/hud/alien_larva.dm
+++ b/code/_onclick/hud/alien_larva.dm
@@ -5,26 +5,32 @@
..()
var/obj/screen/using
- using = new /obj/screen/act_intent/alien()
- using.icon_state = mymob.a_intent
- static_inventory += using
- action_intent = using
+ action_intent = new /obj/screen/act_intent/alien()
+ action_intent.icon_state = mymob.a_intent
+ action_intent.hud = src
+ static_inventory += action_intent
healths = new /obj/screen/healths/alien()
+ healths.hud = src
infodisplay += healths
alien_queen_finder = new /obj/screen/alien/alien_queen_finder()
+ alien_queen_finder.hud = src
infodisplay += alien_queen_finder
+
pull_icon = new /obj/screen/pull()
pull_icon.icon = 'icons/mob/screen_alien.dmi'
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist
hotkeybuttons += pull_icon
using = new/obj/screen/language_menu
using.screen_loc = ui_alien_language_menu
+ using.hud = src
static_inventory += using
zone_select = new /obj/screen/zone_sel/alien()
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm
index ab8bc459ae..8257b744d6 100644
--- a/code/_onclick/hud/blob_overmind.dm
+++ b/code/_onclick/hud/blob_overmind.dm
@@ -133,17 +133,21 @@
blobpwrdisplay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
blobpwrdisplay.layer = ABOVE_HUD_LAYER
blobpwrdisplay.plane = ABOVE_HUD_PLANE
+ blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob()
+ healths.hud = src
infodisplay += healths
using = new /obj/screen/blob/BlobHelp()
using.screen_loc = "WEST:6,NORTH:-3"
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/JumpToNode()
using.screen_loc = ui_inventory
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/JumpToCore()
@@ -153,18 +157,22 @@
using = new /obj/screen/blob/Blobbernaut()
using.screen_loc = ui_belt
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/ResourceBlob()
using.screen_loc = ui_back
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/NodeBlob()
using.screen_loc = ui_hand_position(2)
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/FactoryBlob()
using.screen_loc = ui_hand_position(1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/blob/ReadaptChemical()
@@ -174,4 +182,5 @@
using = new /obj/screen/blob/RelocateCore()
using.screen_loc = ui_storage2
+ using.hud = src
static_inventory += using
diff --git a/code/_onclick/hud/blobbernauthud.dm b/code/_onclick/hud/blobbernauthud.dm
index 17d3b11a72..ed45d5b1f6 100644
--- a/code/_onclick/hud/blobbernauthud.dm
+++ b/code/_onclick/hud/blobbernauthud.dm
@@ -3,7 +3,9 @@
..()
blobpwrdisplay = new /obj/screen/healths/blob/naut/core()
+ blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob/naut()
+ healths.hud = src
infodisplay += healths
diff --git a/code/_onclick/hud/constructs.dm b/code/_onclick/hud/constructs.dm
index 182495c236..06e657d136 100644
--- a/code/_onclick/hud/constructs.dm
+++ b/code/_onclick/hud/constructs.dm
@@ -5,9 +5,11 @@
..()
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_construct_pull
static_inventory += pull_icon
healths = new /obj/screen/healths/construct()
+ healths.hud = src
infodisplay += healths
diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm
index 40fdc37da3..fd2146424c 100644
--- a/code/_onclick/hud/devil.dm
+++ b/code/_onclick/hud/devil.dm
@@ -9,11 +9,13 @@
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
+ using.hud = src
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_drone_pull
static_inventory += pull_icon
@@ -26,6 +28,7 @@
using.screen_loc = ui_swaphand_position(owner,1)
using.layer = HUD_LAYER
using.plane = HUD_PLANE
+ using.hud = src
static_inventory += using
using = new /obj/screen/inventory()
@@ -35,14 +38,19 @@
using.screen_loc = ui_swaphand_position(owner,2)
using.layer = HUD_LAYER
using.plane = HUD_PLANE
+ using.hud = src
static_inventory += using
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
lingchemdisplay = new /obj/screen/ling/chems()
+ lingchemdisplay.hud = src
+
devilsouldisplay = new /obj/screen/devil/soul_counter
+ devilsouldisplay.hud = src
infodisplay += devilsouldisplay
diff --git a/code/_onclick/hud/generic_dextrous.dm b/code/_onclick/hud/generic_dextrous.dm
index 131b510f9b..dba9a59748 100644
--- a/code/_onclick/hud/generic_dextrous.dm
+++ b/code/_onclick/hud/generic_dextrous.dm
@@ -6,11 +6,13 @@
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
+ using.hud = src
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_drone_pull
static_inventory += pull_icon
@@ -20,12 +22,14 @@
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
+ using.hud = src
static_inventory += using
if(mymob.possible_a_intents)
@@ -36,20 +40,24 @@
action_intent = new /obj/screen/act_intent
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
+ action_intent.hud = src
static_inventory += action_intent
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
using = new /obj/screen/craft
using.icon = ui_style
+ using.hud = src
static_inventory += using
using = new /obj/screen/area_creator
using.icon = ui_style
+ using.hud = src
static_inventory += using
mymob.client.screen = list()
diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm
index 2b70392b39..549b6346ce 100644
--- a/code/_onclick/hud/ghost.dm
+++ b/code/_onclick/hud/ghost.dm
@@ -50,26 +50,32 @@
using = new /obj/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob
+ using.hud = src
static_inventory += using
using = new /obj/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit
+ using.hud = src
static_inventory += using
using = new /obj/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse
+ using.hud = src
static_inventory += using
using = new /obj/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport
+ using.hud = src
static_inventory += using
using = new /obj/screen/ghost/pai()
using.screen_loc = ui_ghost_pai
+ using.hud = src
static_inventory += using
using = new /obj/screen/language_menu
using.icon = ui_style
+ using.hud = src
static_inventory += using
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm
index a66558950a..35b40ee5db 100644
--- a/code/_onclick/hud/guardian.dm
+++ b/code/_onclick/hud/guardian.dm
@@ -4,26 +4,32 @@
var/obj/screen/using
healths = new /obj/screen/healths/guardian()
+ healths.hud = src
infodisplay += healths
using = new /obj/screen/guardian/Manifest()
using.screen_loc = ui_hand_position(2)
+ using.hud = src
static_inventory += using
using = new /obj/screen/guardian/Recall()
using.screen_loc = ui_hand_position(1)
+ using.hud = src
static_inventory += using
using = new owner.toggle_button_type()
using.screen_loc = ui_storage1
+ using.hud = src
static_inventory += using
using = new /obj/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory
+ using.hud = src
static_inventory += using
using = new /obj/screen/guardian/Communicate()
using.screen_loc = ui_back
+ using.hud = src
static_inventory += using
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 1d1836716b..09794444d1 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -61,6 +61,9 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
// subtypes can override this to force a specific UI style
var/ui_style
+ //Citadel stuff
+ var/obj/screen/arousal
+
/datum/hud/New(mob/owner)
mymob = owner
diff --git a/code/_onclick/hud/hud_cit.dm b/code/_onclick/hud/hud_cit.dm
deleted file mode 100644
index 18ecf2e929..0000000000
--- a/code/_onclick/hud/hud_cit.dm
+++ /dev/null
@@ -1,2 +0,0 @@
-/datum/hud
- var/obj/screen/arousal
\ No newline at end of file
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 3b5f851333..78a2d2fd17 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -95,18 +95,21 @@
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxcraft // CIT CHANGE
+ using.hud = src
static_inventory += using
using = new/obj/screen/language_menu
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxlang // CIT CHANGE
+ using.hud = src
static_inventory += using
using = new /obj/screen/area_creator
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxarea // CIT CHANGE
+ using.hud = src
static_inventory += using
using = new /obj/screen/voretoggle() //We fancy Vore now
@@ -114,16 +117,19 @@
using.screen_loc = ui_voremode
if(!widescreenlayout)
using.screen_loc = ui_boxvore
+ using.hud = src
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent
+ action_intent.hud = src
static_inventory += action_intent
using = new /obj/screen/mov_intent
using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
+ using.hud = src
static_inventory += using
//CITADEL CHANGES - sprint button
@@ -131,19 +137,21 @@
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.icon_state = (owner.sprinting ? "act_sprint_on" : "act_sprint")
using.screen_loc = ui_movi
+ using.hud = src
static_inventory += using
//END OF CITADEL CHANGES
//same as above but buffer.
- using = new /obj/screen/sprint_buffer
- using.screen_loc = ui_sprintbufferloc
- sprint_buffer = using
- static_inventory += using
+ sprint_buffer = new /obj/screen/sprint_buffer
+ sprint_buffer.screen_loc = ui_sprintbufferloc
+ sprint_buffer.hud = src
+ static_inventory += sprint_buffer
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
+ using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
@@ -168,12 +176,14 @@
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
+ using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
@@ -235,28 +245,33 @@
using = new /obj/screen/resist()
using.icon = ui_style
using.screen_loc = ui_overridden_resist // CIT CHANGE - changes this to overridden resist
+ using.hud = src
hotkeybuttons += using
//CIT CHANGES - rest and combat mode buttons
using = new /obj/screen/restbutton()
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_pull_resist
+ using.hud = src
static_inventory += using
using = new /obj/screen/combattoggle()
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_combat_toggle
+ using.hud = src
static_inventory += using
//END OF CIT CHANGES
using = new /obj/screen/human/toggle()
using.icon = ui_style
using.screen_loc = ui_inventory
+ using.hud = src
static_inventory += using
using = new /obj/screen/human/equip()
using.icon = ui_style
using.screen_loc = ui_equip_position(mymob)
+ using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
@@ -311,54 +326,71 @@
throw_icon = new /obj/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
+ throw_icon.hud = src
hotkeybuttons += throw_icon
internals = new /obj/screen/internals()
+ internals.hud = src
infodisplay += internals
healths = new /obj/screen/healths()
+ healths.hud = src
infodisplay += healths
//CIT CHANGE - adds arousal and stamina to hud
arousal = new /obj/screen/arousal()
arousal.icon_state = (owner.canbearoused == 1 ? "arousal0" : "")
+ arousal.hud = src
infodisplay += arousal
staminas = new /obj/screen/staminas()
+ staminas.hud = src
infodisplay += staminas
if(!CONFIG_GET(flag/disable_stambuffer))
staminabuffer = new /obj/screen/staminabuffer()
+ staminabuffer.hud = src
infodisplay += staminabuffer
//END OF CIT CHANGES
healthdoll = new /obj/screen/healthdoll()
+ healthdoll.hud = src
infodisplay += healthdoll
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
+ lingchemdisplay.hud = src
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
+ lingstingdisplay.hud = src
infodisplay += lingstingdisplay
devilsouldisplay = new /obj/screen/devil/soul_counter
+ devilsouldisplay.hud = src
infodisplay += devilsouldisplay
blood_display = new /obj/screen/bloodsucker/blood_counter // Blood Volume
+ blood_display.hud = src
infodisplay += blood_display
+
vamprank_display = new /obj/screen/bloodsucker/rank_counter // Vampire Rank
+ vamprank_display.hud = src
infodisplay += vamprank_display
+
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter // Sunlight
+ sunlight_display.hud = src
infodisplay += sunlight_display
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
diff --git a/code/_onclick/hud/lavaland_elite.dm b/code/_onclick/hud/lavaland_elite.dm
index 277ea8b898..a36d9a0f36 100644
--- a/code/_onclick/hud/lavaland_elite.dm
+++ b/code/_onclick/hud/lavaland_elite.dm
@@ -6,9 +6,9 @@
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
+ pull_icon.hud = src
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
- pull_icon.hud = src
static_inventory += pull_icon
healths = new /obj/screen/healths/lavaland_elite()
diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm
index bbf2cca9f9..3d3c3cf64a 100644
--- a/code/_onclick/hud/monkey.dm
+++ b/code/_onclick/hud/monkey.dm
@@ -7,21 +7,25 @@
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
action_intent.screen_loc = ui_acti
+ action_intent.hud = src
static_inventory += action_intent
using = new /obj/screen/mov_intent()
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
+ using.hud = src
static_inventory += using
using = new/obj/screen/language_menu
using.icon = ui_style
+ using.hud = src
static_inventory += using
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
+ using.hud = src
static_inventory += using
build_hand_slots()
@@ -30,12 +34,14 @@
using.icon = ui_style
using.icon_state = "swap_1_m" //extra wide!
using.screen_loc = ui_swaphand_position(owner,1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
+ using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
@@ -76,30 +82,37 @@
throw_icon = new /obj/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
+ throw_icon.hud = src
hotkeybuttons += throw_icon
internals = new /obj/screen/internals()
+ internals.hud = src
infodisplay += internals
healths = new /obj/screen/healths()
+ healths.hud = src
infodisplay += healths
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
- pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_pull_resist
+ pull_icon.hud = src
+ pull_icon.update_icon()
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
+ lingchemdisplay.hud = src
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
+ lingstingdisplay.hud = src
infodisplay += lingstingdisplay
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
mymob.client.screen = list()
@@ -107,6 +120,7 @@
using = new /obj/screen/resist()
using.icon = ui_style
using.screen_loc = ui_pull_resist
+ using.hud = src
hotkeybuttons += using
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
diff --git a/code/_onclick/hud/revenanthud.dm b/code/_onclick/hud/revenanthud.dm
index bc8a2bde7d..9369313941 100644
--- a/code/_onclick/hud/revenanthud.dm
+++ b/code/_onclick/hud/revenanthud.dm
@@ -3,4 +3,5 @@
..()
healths = new /obj/screen/healths/revenant()
+ healths.hud = src
infodisplay += healths
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 11517d79b8..00c89644b6 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -118,26 +118,31 @@
using = new/obj/screen/robot/language_menu
using.screen_loc = ui_borg_language_menu
+ using.hud = src
static_inventory += using
//Radio
using = new /obj/screen/robot/radio()
using.screen_loc = ui_borg_radio
+ using.hud = src
static_inventory += using
//Module select
using = new /obj/screen/robot/module1()
using.screen_loc = ui_inv1
+ using.hud = src
static_inventory += using
mymobR.inv1 = using
using = new /obj/screen/robot/module2()
using.screen_loc = ui_inv2
+ using.hud = src
static_inventory += using
mymobR.inv2 = using
using = new /obj/screen/robot/module3()
using.screen_loc = ui_inv3
+ using.hud = src
static_inventory += using
mymobR.inv3 = using
@@ -146,36 +151,43 @@
//Photography stuff
using = new /obj/screen/ai/image_take()
using.screen_loc = ui_borg_camera
+ using.hud = src
static_inventory += using
using = new /obj/screen/ai/image_view()
using.screen_loc = ui_borg_album
+ using.hud = src
static_inventory += using
//Sec/Med HUDs
using = new /obj/screen/robot/sensors()
using.screen_loc = ui_borg_sensor
+ using.hud = src
static_inventory += using
//Headlamp control
using = new /obj/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
+ using.hud = src
static_inventory += using
mymobR.lamp_button = using
//Thrusters
using = new /obj/screen/robot/thrusters()
using.screen_loc = ui_borg_thrusters
+ using.hud = src
static_inventory += using
mymobR.thruster_button = using
//Intent
action_intent = new /obj/screen/act_intent/robot()
action_intent.icon_state = mymob.a_intent
+ action_intent.hud = src
static_inventory += action_intent
//Health
healths = new /obj/screen/healths/robot()
+ healths.hud = src
infodisplay += healths
//Installed Module
@@ -185,17 +197,20 @@
//Store
module_store_icon = new /obj/screen/robot/store()
+ module_store_icon.hud = src
module_store_icon.screen_loc = ui_borg_store
pull_icon = new /obj/screen/pull()
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
- pull_icon.update_icon(mymob)
+ pull_icon.hud = src
+ pull_icon.update_icon()
pull_icon.screen_loc = ui_borg_pull
hotkeybuttons += pull_icon
zone_select = new /obj/screen/zone_sel/robot()
- zone_select.update_icon(mymob)
+ zone_select.hud = src
+ zone_select.update_icon()
static_inventory += zone_select
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 86b4b0c024..dec743d35c 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -110,21 +110,21 @@
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
if(world.time <= usr.next_move)
- return 1
+ return TRUE
if(usr.incapacitated())
- return 1
+ return TRUE
if(ismecha(usr.loc)) // stops inventory actions in a mech
- return 1
+ return TRUE
- if(hud && hud.mymob && slot_id)
+ if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
if(inv_item)
return inv_item.Click(location, control, params)
if(usr.attack_ui(slot_id))
usr.update_inv_hands()
- return 1
+ return TRUE
/obj/screen/inventory/MouseEntered()
..()
@@ -135,35 +135,37 @@
cut_overlay(object_overlays)
object_overlays.Cut()
-/obj/screen/inventory/update_icon()
+/obj/screen/inventory/update_icon_state()
if(!icon_empty)
icon_empty = icon_state
- if(hud && hud.mymob && slot_id && icon_full)
+ if(hud?.mymob && slot_id && icon_full)
if(hud.mymob.get_item_by_slot(slot_id))
icon_state = icon_full
else
icon_state = icon_empty
/obj/screen/inventory/proc/add_overlays()
- var/mob/user = hud.mymob
+ var/mob/user = hud?.mymob
- if(hud && user && slot_id)
- var/obj/item/holding = user.get_active_held_item()
+ if(!user || !slot_id)
+ return
- if(!holding || user.get_item_by_slot(slot_id))
- return
+ var/obj/item/holding = user.get_active_held_item()
- var/image/item_overlay = image(holding)
- item_overlay.alpha = 92
+ if(!holding || user.get_item_by_slot(slot_id))
+ return
- if(!user.can_equip(holding, slot_id, TRUE))
- item_overlay.color = "#FF0000"
- else
- item_overlay.color = "#00ff00"
+ var/image/item_overlay = image(holding)
+ item_overlay.alpha = 92
- object_overlays += item_overlay
- add_overlay(object_overlays)
+ if(!user.can_equip(holding, slot_id, TRUE))
+ item_overlay.color = "#FF0000"
+ else
+ item_overlay.color = "#00ff00"
+
+ object_overlays += item_overlay
+ add_overlay(object_overlays)
/obj/screen/inventory/hand
var/mutable_appearance/handcuff_overlay
@@ -171,45 +173,50 @@
var/held_index = 0
/obj/screen/inventory/hand/update_icon()
- ..()
+ . = ..()
if(!handcuff_overlay)
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state)
- cut_overlays()
+ cut_overlay(list(handcuff_overlay, blocked_overlay, "hand_active"))
- if(hud && hud.mymob)
- if(iscarbon(hud.mymob))
- var/mob/living/carbon/C = hud.mymob
- if(C.handcuffed)
- add_overlay(handcuff_overlay)
+ if(!hud?.mymob)
+ return
- if(held_index)
- if(!C.has_hand_for_held_index(held_index))
- add_overlay(blocked_overlay)
+ if(iscarbon(hud.mymob))
+ var/mob/living/carbon/C = hud.mymob
+ if(C.handcuffed)
+ add_overlay(handcuff_overlay)
- if(held_index == hud.mymob.active_hand_index)
- add_overlay("hand_active")
+ if(held_index)
+ if(!C.has_hand_for_held_index(held_index))
+ add_overlay(blocked_overlay)
+
+ if(held_index == hud.mymob.active_hand_index)
+ add_overlay("hand_active")
/obj/screen/inventory/hand/Click(location, control, params)
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
- if(world.time <= usr.next_move)
- return 1
- if(usr.incapacitated() || isobserver(usr))
- return 1
- if (ismecha(usr.loc)) // stops inventory actions in a mech
- return 1
+ var/mob/user = hud?.mymob
+ if(usr != user)
+ return TRUE
+ if(world.time <= user.next_move)
+ return TRUE
+ if(user.incapacitated())
+ return TRUE
+ if (ismecha(user.loc)) // stops inventory actions in a mech
+ return TRUE
- if(hud.mymob.active_hand_index == held_index)
- var/obj/item/I = hud.mymob.get_active_held_item()
+ if(user.active_hand_index == held_index)
+ var/obj/item/I = user.get_active_held_item()
if(I)
I.Click(location, control, params)
else
- hud.mymob.swap_hand(held_index)
- return 1
+ user.swap_hand(held_index)
+ return TRUE
/obj/screen/close
name = "close"
@@ -343,12 +350,8 @@
/obj/screen/mov_intent/Click()
toggle(usr)
-/obj/screen/mov_intent/update_icon(mob/user)
- if(!user && hud)
- user = hud.mymob
- if(!user)
- return
- switch(user.m_intent)
+/obj/screen/mov_intent/update_icon_state()
+ switch(hud?.mymob?.m_intent)
if(MOVE_INTENT_WALK)
icon_state = "walking"
if(MOVE_INTENT_RUN)
@@ -369,10 +372,8 @@
return
usr.stop_pulling()
-/obj/screen/pull/update_icon(mob/mymob)
- if(!mymob)
- return
- if(mymob.pulling)
+/obj/screen/pull/update_icon_state()
+ if(hud?.mymob?.pulling)
icon_state = "pull"
else
icon_state = "pull0"
@@ -401,11 +402,11 @@
var/mob/living/L = usr
L.lay_down()
-/obj/screen/rest/update_icon(mob/mymob)
- if(!isliving(mymob))
+/obj/screen/rest/update_icon_state()
+ var/mob/living/user = hud?.mymob
+ if(!istype(user))
return
- var/mob/living/L = mymob
- if(!L.resting)
+ if(!user.resting)
icon_state = "act_rest"
else
icon_state = "act_rest0"
@@ -448,7 +449,7 @@
name = "damage zone"
icon_state = "zone_sel"
screen_loc = ui_zonesel
- var/selecting = BODY_ZONE_CHEST
+ var/overlay_icon = 'icons/mob/screen_gen.dmi'
var/static/list/hover_overlays_cache = list()
var/hovering
@@ -541,26 +542,24 @@
return BODY_ZONE_HEAD
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
- if(isobserver(user))
+ if(user != hud?.mymob)
return
- if(choice != selecting)
- selecting = choice
- update_icon(usr)
- return 1
+ if(choice != hud.mymob.zone_selected)
+ hud.mymob.zone_selected = choice
+ update_icon()
-/obj/screen/zone_sel/update_icon(mob/user)
- cut_overlays()
- add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[selecting]"))
- user.zone_selected = selecting
+ return TRUE
+
+/obj/screen/zone_sel/update_overlays()
+ . = ..()
+ if(!hud?.mymob)
+ return
+ . += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]")
/obj/screen/zone_sel/alien
icon = 'icons/mob/screen_alien.dmi'
-
-/obj/screen/zone_sel/alien/update_icon(mob/user)
- cut_overlays()
- add_overlay(mutable_appearance('icons/mob/screen_alien.dmi', "[selecting]"))
- user.zone_selected = selecting
+ overlay_icon = 'icons/mob/screen_alien.dmi'
/obj/screen/zone_sel/robot
icon = 'icons/mob/screen_cyborg.dmi'
diff --git a/code/_onclick/hud/swarmer.dm b/code/_onclick/hud/swarmer.dm
index 6cf4c73e44..80cc01c3b3 100644
--- a/code/_onclick/hud/swarmer.dm
+++ b/code/_onclick/hud/swarmer.dm
@@ -69,24 +69,30 @@
using = new /obj/screen/swarmer/FabricateTrap()
using.screen_loc = ui_hand_position(2)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/Barricade()
using.screen_loc = ui_hand_position(1)
+ using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/Replicate()
using.screen_loc = ui_zonesel
+ using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/RepairSelf()
using.screen_loc = ui_storage1
+ using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/ToggleLight()
using.screen_loc = ui_back
+ using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/ContactSwarmers()
using.screen_loc = ui_inventory
+ using.hud = src
static_inventory += using
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index bb652208ee..85f8a4a101 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -185,9 +185,8 @@
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
block_chance = 50
-/obj/item/twohanded/bostaff/update_icon()
+/obj/item/twohanded/bostaff/update_icon_state()
icon_state = "bostaff[wielded]"
- return
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index f5e285a5c2..f65ea98cab 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -326,8 +326,13 @@ GLOBAL_LIST_EMPTY(teleportlocs)
F.update_fire_light(fire)
for(var/obj/machinery/light/L in src)
L.update()
-
-/area/proc/update_icon()
+/**
+ * Update the icon state of the area
+ *
+ * Im not sure what the heck this does, somethign to do with weather being able to set icon
+ * states on areas?? where the heck would that even display?
+ */
+/area/update_icon_state()
var/weather_icon
for(var/V in SSweather.processing)
var/datum/weather/W = V
@@ -337,7 +342,10 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(!weather_icon)
icon_state = null
-/area/space/update_icon()
+/**
+ * Update the icon of the area (overridden to always be null for space
+ */
+/area/space/update_icon_state()
icon_state = null
/*
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 7de5707032..66570205e3 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -24,6 +24,8 @@
var/list/add_overlays // a very temporary list of overlays to add
var/list/managed_vis_overlays //vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
+ ///overlays managed by update_overlays() to prevent removing overlays that weren't added by the same proc
+ var/list/managed_overlays
var/datum/proximity_monitor/proximity_monitor
var/buckle_message_cooldown = 0
@@ -310,6 +312,32 @@
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
+/// Updates the icon of the atom
+/atom/proc/update_icon()
+ // I expect we're going to need more return flags and options in this proc
+ var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
+
+ if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
+ update_icon_state()
+
+ if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
+ var/list/new_overlays = update_overlays()
+ if(managed_overlays)
+ cut_overlay(managed_overlays)
+ managed_overlays = null
+ if(length(new_overlays))
+ managed_overlays = new_overlays
+ add_overlay(new_overlays)
+
+/// Updates the icon state of the atom
+/atom/proc/update_icon_state()
+
+/// Updates the overlays of the atom
+/atom/proc/update_overlays()
+ SHOULD_CALL_PARENT(1)
+ . = list()
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
+
/atom/proc/relaymove(mob/user)
if(buckle_message_cooldown <= world.time)
buckle_message_cooldown = world.time + 50
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index 968cbe7254..24c9e32969 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -38,21 +38,22 @@
board.one_access = 1
board.accesses = req_one_access
-
-/obj/machinery/button/update_icon()
- cut_overlays()
+/obj/machinery/button/update_icon_state()
if(panel_open)
icon_state = "button-open"
- if(device)
- add_overlay("button-device")
- if(board)
- add_overlay("button-board")
-
+ else if(stat & (NOPOWER|BROKEN))
+ icon_state = "[skin]-p"
else
- if(stat & (NOPOWER|BROKEN))
- icon_state = "[skin]-p"
- else
- icon_state = skin
+ icon_state = skin
+
+/obj/machinery/button/update_overlays()
+ . = ..()
+ if(!panel_open)
+ return
+ if(device)
+ . += "button-device"
+ if(board)
+ . += "button-board"
/obj/machinery/button/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
@@ -168,7 +169,7 @@
if(device)
device.pulsed()
- addtimer(CALLBACK(src, .proc/update_icon), 15)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 15)
/obj/machinery/button/power_change()
..()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 17136d3c4f..bef5effb54 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -292,7 +292,7 @@
new /obj/item/stack/cable_coil(loc, 2)
qdel(src)
-/obj/machinery/camera/update_icon()
+/obj/machinery/camera/update_icon_state()
if(!status)
icon_state = "[initial(icon_state)]1"
else if (stat & EMPED)
diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm
index 40ccc61b2b..f3be6ac214 100644
--- a/code/game/machinery/defibrillator_mount.dm
+++ b/code/game/machinery/defibrillator_mount.dm
@@ -38,17 +38,21 @@
defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5%
update_icon()
-/obj/machinery/defibrillator_mount/update_icon()
- cut_overlays()
- if(defib)
- add_overlay("defib")
- if(defib.powered)
- add_overlay(defib.safety ? "online" : "emagged")
- var/ratio = defib.cell.charge / defib.cell.maxcharge
- ratio = CEILING(ratio * 4, 1) * 25
- add_overlay("charge[ratio]")
- if(clamps_locked)
- add_overlay("clamps")
+/obj/machinery/defibrillator_mount/update_overlays()
+ . = ..()
+ if(!defib)
+ return
+
+ . += "defib"
+
+ if(defib.powered)
+ . += (defib.safety ? "online" : "emagged")
+ var/ratio = defib.cell.charge / defib.cell.maxcharge
+ ratio = CEILING(ratio * 4, 1) * 25
+ . += "charge[ratio]"
+
+ if(clamps_locked)
+ . += "clamps"
/obj/machinery/defibrillator_mount/get_cell()
if(defib)
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 702347c220..07d58c1754 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -47,8 +47,7 @@
/obj/item/defibrillator/update_icon()
update_power()
- update_overlays()
- update_charge()
+ return ..()
/obj/item/defibrillator/proc/update_power()
if(!QDELETED(cell))
@@ -59,23 +58,20 @@
else
powered = FALSE
-/obj/item/defibrillator/proc/update_overlays()
- cut_overlays()
+/obj/item/defibrillator/update_overlays()
+ . = ..()
if(!on)
- add_overlay("[initial(icon_state)]-paddles")
+ . += "[initial(icon_state)]-paddles"
if(powered)
- add_overlay("[initial(icon_state)]-powered")
- if(!cell)
- add_overlay("[initial(icon_state)]-nocell")
- if(!safety)
- add_overlay("[initial(icon_state)]-emagged")
-
-/obj/item/defibrillator/proc/update_charge()
- if(powered) //so it doesn't show charge if it's unpowered
+ . += "[initial(icon_state)]-powered"
if(!QDELETED(cell))
var/ratio = cell.charge / cell.maxcharge
ratio = CEILING(ratio*4, 1) * 25
add_overlay("[initial(icon_state)]-charge[ratio]")
+ if(!cell)
+ . += "[initial(icon_state)]-nocell"
+ if(!safety)
+ . += "[initial(icon_state)]-emagged"
/obj/item/defibrillator/CheckParts(list/parts_list)
..()
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index fca7f9bc6d..a8d57fab69 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -224,7 +224,7 @@
merge_gases()
for(var/i in 1 to 6)
- addtimer(CALLBACK(src, .proc/update_icon), 20 + (i - 1) * 10)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 20 + (i - 1) * 10)
else if(valve_open && tank_one && tank_two)
split_gases()
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 51386c791c..f5dfa690db 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -173,9 +173,6 @@
/obj/proc/container_resist(mob/living/user)
return
-/obj/proc/update_icon()
- return
-
/mob/proc/unset_machine()
if(machine)
machine.on_unset_machine(src)
diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm
index b8137d831b..e7a0ac2d04 100644
--- a/code/game/objects/structures/divine.dm
+++ b/code/game/objects/structures/divine.dm
@@ -41,7 +41,7 @@
to_chat(user, "The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.")
user.reagents.add_reagent("godblood",20)
update_icon()
- addtimer(CALLBACK(src, .proc/update_icon), time_between_uses)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), time_between_uses)
/obj/structure/healingfountain/update_icon()
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 194014b61a..d14a4c7385 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -103,9 +103,9 @@
/turf/open/floor/blob_act(obj/structure/blob/B)
return
-/turf/open/floor/proc/update_icon()
+/turf/open/floor/update_icon()
+ . = ..()
update_visuals()
- return 1
/turf/open/floor/attack_paw(mob/user)
return attack_hand(user)
diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm
index b4e84648c2..8eab4c34fe 100644
--- a/code/game/turfs/simulated/wall/reinf_walls.dm
+++ b/code/game/turfs/simulated/wall/reinf_walls.dm
@@ -202,15 +202,20 @@
return 1
return 0
-/turf/closed/wall/r_wall/proc/update_icon()
+/turf/closed/wall/r_wall/update_icon()
+ . = ..()
if(d_state != INTACT)
smooth = SMOOTH_FALSE
clear_smooth_overlays()
- icon_state = "r_wall-[d_state]"
else
smooth = SMOOTH_TRUE
queue_smooth_neighbors(src)
queue_smooth(src)
+
+/turf/closed/wall/r_wall/update_icon_state()
+ if(d_state != INTACT)
+ icon_state = "r_wall-[d_state]"
+ else
icon_state = "r_wall"
/turf/closed/wall/r_wall/singularity_pull(S, current_size)
diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm
index f0f0667c37..db5fc8a1f8 100644
--- a/code/game/turfs/space/transit.dm
+++ b/code/game/turfs/space/transit.dm
@@ -103,10 +103,13 @@
for(var/atom/movable/AM in src)
throw_atom(AM)
-/turf/open/space/transit/proc/update_icon()
- icon_state = "speedspace_ns_[get_transit_state(src)]"
+/turf/open/space/transit/update_icon()
+ . = ..()
transform = turn(matrix(), get_transit_angle(src))
+/turf/open/space/transit/update_icon_state()
+ icon_state = "speedspace_ns_[get_transit_state(src)]"
+
/proc/get_transit_state(turf/T)
var/p = 9
. = 1
diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm
index 6b87278e00..2ac3b34f60 100644
--- a/code/modules/assembly/flash.dm
+++ b/code/modules/assembly/flash.dm
@@ -39,7 +39,7 @@
if(flash)
add_overlay(flashing_overlay)
attached_overlays += flashing_overlay
- addtimer(CALLBACK(src, .proc/update_icon), 5)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 5)
if(holder)
holder.update_icon()
@@ -308,7 +308,7 @@
else if(flash)
icon_state = "flashshield_flash"
item_state = "flashshield_flash"
- addtimer(CALLBACK(src, .proc/update_icon), 5)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 5)
if(holder)
holder.update_icon()
diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm
index 7b78facf00..1b4ebd6c1a 100644
--- a/code/modules/cargo/gondolapod.dm
+++ b/code/modules/cargo/gondolapod.dm
@@ -29,7 +29,7 @@
name = linked_pod.name
. = ..()
-/mob/living/simple_animal/pet/gondola/gondolapod/proc/update_icon()
+/mob/living/simple_animal/pet/gondola/gondolapod/update_icon_state()
if(opened)
icon_state = "gondolapod_open"
else
diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm
index 8724841643..239273e421 100644
--- a/code/modules/food_and_drinks/food/customizables.dm
+++ b/code/modules/food_and_drinks/food/customizables.dm
@@ -55,7 +55,7 @@
mix_filling_color(S)
S.reagents.trans_to(src,min(S.reagents.total_volume, 15)) //limit of 15, we don't want our custom food to be completely filled by just one ingredient with large reagent volume.
foodtype |= S.foodtype
- update_overlays(S)
+ update_snack_overlays(S)
to_chat(user, "You add the [I.name] to the [name].")
update_name(S)
else
@@ -103,7 +103,7 @@
rgbcolor[4] = (customcolor[4]+ingcolor[4])/2
filling_color = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3], rgbcolor[4])
-/obj/item/reagent_containers/food/snacks/customizable/update_overlays(obj/item/reagent_containers/food/snacks/S)
+/obj/item/reagent_containers/food/snacks/customizable/update_snack_overlays(obj/item/reagent_containers/food/snacks/S)
var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling")
if(S.filling_color == "#FFFFFF")
filling.color = pick("#FF0000","#0000FF","#008000","#FFFF00")
@@ -139,7 +139,7 @@
/obj/item/reagent_containers/food/snacks/customizable/initialize_slice(obj/item/reagent_containers/food/snacks/slice, reagents_per_slice)
..()
slice.filling_color = filling_color
- slice.update_overlays(src)
+ slice.update_snack_overlays(src)
/obj/item/reagent_containers/food/snacks/customizable/Destroy()
diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm
index 30a0195555..97e8423e78 100644
--- a/code/modules/food_and_drinks/food/snacks.dm
+++ b/code/modules/food_and_drinks/food/snacks.dm
@@ -269,7 +269,7 @@ All foods are distributed among various categories. Use common sense.
trash = null
return
-/obj/item/reagent_containers/food/snacks/proc/update_overlays(obj/item/reagent_containers/food/snacks/S)
+/obj/item/reagent_containers/food/snacks/proc/update_snack_overlays(obj/item/reagent_containers/food/snacks/S)
cut_overlays()
var/mutable_appearance/filling = mutable_appearance(icon, "[initial(icon_state)]_filling")
if(S.filling_color == "#FFFFFF")
diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm
index 13200d0276..de5d577193 100644
--- a/code/modules/food_and_drinks/food/snacks_pastry.dm
+++ b/code/modules/food_and_drinks/food/snacks_pastry.dm
@@ -692,13 +692,13 @@
to_chat(user, "You add the [I] to the [name].")
P.name = initial(P.name)
contents += P
- update_overlays(P)
+ update_snack_overlays(P)
if (P.contents.len)
for(var/V in P.contents)
P = V
P.name = initial(P.name)
contents += P
- update_overlays(P)
+ update_snack_overlays(P)
P = I
clearlist(P.contents)
return
@@ -707,7 +707,7 @@
return O.attackby(I, user, params)
..()
-/obj/item/reagent_containers/food/snacks/pancakes/update_overlays(obj/item/reagent_containers/food/snacks/P)
+/obj/item/reagent_containers/food/snacks/pancakes/update_snack_overlays(obj/item/reagent_containers/food/snacks/P)
var/mutable_appearance/pancake = mutable_appearance(icon, "[P.item_state]_[rand(1,3)]")
pancake.pixel_x = rand(-1,1)
pancake.pixel_y = 3 * contents.len - 1
diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm
index 3574f8a9c1..7b5b0586d1 100644
--- a/code/modules/holodeck/turfs.dm
+++ b/code/modules/holodeck/turfs.dm
@@ -111,11 +111,10 @@
/turf/open/floor/holofloor/carpet/Initialize()
. = ..()
- addtimer(CALLBACK(src, .proc/update_icon), 1)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 1)
/turf/open/floor/holofloor/carpet/update_icon()
- if(!..())
- return 0
+ . = ..()
if(intact)
queue_smooth(src)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 5bdfd174b5..2b9b01dc18 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -178,7 +178,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
* Hair will always update its dir, so if your sprite has no dirs the haircut will go all over the place.
* |- Ricotez
*/
-/mob/dead/observer/proc/update_icon(new_form)
+/mob/dead/observer/update_icon(new_form)
+ . = ..()
if(client) //We update our preferences in case they changed right before update_icon was called.
ghost_accs = client.prefs.ghost_accs
ghost_others = client.prefs.ghost_others
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 45211f7f44..0007233975 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -803,10 +803,8 @@
else
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
- if(hud_used.staminas)
- hud_used.staminas.icon_state = staminahudamount()
- if(hud_used.staminabuffer)
- hud_used.staminabuffer.icon_state = staminabufferhudamount()
+ hud_used.staminas?.update_icon_state()
+ hud_used.staminabuffer?.update_icon_state()
/mob/living/carbon/human/fully_heal(admin_revive = 0)
if(admin_revive)
diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
index f2ab3e56ed..03afecc66f 100644
--- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
+++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
@@ -51,7 +51,7 @@
weapon.attack(C, src)
playsound(src, 'sound/weapons/blade1.ogg', 50, TRUE, -1)
if(C.stat == DEAD)
- addtimer(CALLBACK(src, .proc/update_icon), 2)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 2)
back_to_idle()
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 7a653f4aa4..3397d9f4b6 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -840,7 +840,7 @@ Pass a positive integer as an argument to override a bot's default speed.
ejectpai(usr)
update_controls()
-/mob/living/simple_animal/bot/proc/update_icon()
+/mob/living/simple_animal/bot/update_icon_state()
icon_state = "[initial(icon_state)][on]"
// Machinery to simplify topic and access calls
diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm
index 724abea214..2de4ca39fd 100644
--- a/code/modules/mob/living/simple_animal/bot/honkbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm
@@ -50,7 +50,7 @@
/mob/living/simple_animal/bot/honkbot/proc/sensor_blink()
icon_state = "honkbot-c"
- addtimer(CALLBACK(src, .proc/update_icon), 5, TIMER_OVERRIDE|TIMER_UNIQUE)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 5, TIMER_OVERRIDE|TIMER_UNIQUE)
//honkbots react with sounds.
/mob/living/simple_animal/bot/honkbot/proc/react_ping()
@@ -177,7 +177,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
playsound(src, "honkbot_e", 50, 0)
spam_flag = TRUE // prevent spam
icon_state = "honkbot-e"
- addtimer(CALLBACK(src, .proc/update_icon), 30, TIMER_OVERRIDE|TIMER_UNIQUE)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 30, TIMER_OVERRIDE|TIMER_UNIQUE)
addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntimehorn)
/mob/living/simple_animal/bot/honkbot/proc/honk_attack(mob/living/carbon/C) // horn attack
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index c0a9a2082f..ee770fc2ca 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -250,7 +250,7 @@ Auto Patrol: []"},
var/judgement_criteria = judgement_criteria()
playsound(src, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
icon_state = "secbot-c"
- addtimer(CALLBACK(src, .proc/update_icon), 2)
+ addtimer(CALLBACK(src, /atom/.proc/update_icon), 2)
var/threat = 5
if(ishuman(C))
C.stuttering = 5
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 5ecd668b96..1a3f2fca3b 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -380,14 +380,10 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
spintime -= speed
/mob/proc/update_pull_hud_icon()
- if(hud_used)
- if(hud_used.pull_icon)
- hud_used.pull_icon.update_icon(src)
+ hud_used?.pull_icon?.update_icon()
/mob/proc/update_rest_hud_icon()
- if(hud_used)
- if(hud_used.rest_icon)
- hud_used.rest_icon.update_icon(src)
+ hud_used?.rest_icon?.update_icon()
/mob/verb/mode()
set name = "Activate Held Object"
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index a9f4c94397..c7365210ab 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -22,7 +22,7 @@
I'll make some notes on where certain variable defines should probably go.
Changing this around would probably require a good look-over the pre-existing code.
*/
- var/zone_selected = null
+ var/zone_selected = BODY_ZONE_CHEST
var/computer_id = null
var/list/logging = list()
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 1a836c06cf..04d47da56e 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -372,7 +372,7 @@
m_intent = MOVE_INTENT_RUN
if(hud_used && hud_used.static_inventory)
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
- selector.update_icon(src)
+ selector.update_icon()
/mob/verb/up()
set name = "Move Upwards"
diff --git a/modular_citadel/code/_onclick/hud/screen_objects.dm b/modular_citadel/code/_onclick/hud/screen_objects.dm
index 3a0eb364cb..6ad0603c49 100644
--- a/modular_citadel/code/_onclick/hud/screen_objects.dm
+++ b/modular_citadel/code/_onclick/hud/screen_objects.dm
@@ -18,10 +18,11 @@
var/mob/living/carbon/C = usr
C.toggle_combat_mode()
-/obj/screen/combattoggle/proc/rebasetointerbay(mob/living/carbon/C)
- if(!C)
+/obj/screen/combattoggle/update_icon_state()
+ var/mob/living/carbon/user = hud?.mymob
+ if(!istype(user))
return
- if(C.combatmode)
+ if(user.combatmode)
icon_state = "combat"
else
icon_state = "combat_off"
@@ -36,10 +37,11 @@
var/mob/living/carbon/C = usr
C.toggle_vore_mode()
-/obj/screen/voretoggle/proc/rebaseintomygut(mob/living/carbon/C)
- if(!C)
+/obj/screen/voretoggle/update_icon_state()
+ var/mob/living/carbon/user = hud?.mymob
+ if(!istype(user))
return
- if(C.voremode && !C.combatmode)
+ if(user.voremode && !user.combatmode)
icon_state = "nom"
else
icon_state = "nom_off"
diff --git a/modular_citadel/code/_onclick/hud/sprint.dm b/modular_citadel/code/_onclick/hud/sprint.dm
index 290fcd368e..6b0594a543 100644
--- a/modular_citadel/code/_onclick/hud/sprint.dm
+++ b/modular_citadel/code/_onclick/hud/sprint.dm
@@ -12,10 +12,11 @@
var/mob/living/carbon/human/H = usr
H.togglesprint()
-/obj/screen/sprintbutton/proc/insert_witty_toggle_joke_here(mob/living/carbon/human/H)
- if(!H)
+/obj/screen/sprintbutton/update_icon_state()
+ var/mob/living/user = hud?.mymob
+ if(istype(user))
return
- if(H.sprinting)
+ if(user.sprinting)
icon_state = "act_sprint_on"
else
icon_state = "act_sprint"
diff --git a/modular_citadel/code/_onclick/hud/stamina.dm b/modular_citadel/code/_onclick/hud/stamina.dm
index 781b7cb25f..8914d1c74c 100644
--- a/modular_citadel/code/_onclick/hud/stamina.dm
+++ b/modular_citadel/code/_onclick/hud/stamina.dm
@@ -13,31 +13,16 @@
var/mob/living/L = usr
to_chat(L, "You have [L.getStaminaLoss()] stamina loss.
Your stamina buffer can take [L.stambuffer] stamina loss, and will use 50% of that stamina loss when recharging.
Your stamina buffer is [(L.stambuffer*(100/L.stambuffer))-(L.bufferedstam*(100/L.stambuffer))]% full.")
-/mob/living/carbon/human/proc/staminahudamount()
- if(stat == DEAD || recoveringstam)
- return "staminacrit"
+/obj/screen/staminas/update_icon_state()
+ var/mob/living/carbon/user = hud?.mymob
+ if(!user)
+ return
+ if(user.stat == DEAD || user.recoveringstam || (user.hal_screwyhud in 1 to 2))
+ icon_state = "staminacrit"
+ else if(user.hal_screwyhud == 5)
+ icon_state = "stamina0"
else
- switch(hal_screwyhud)
- if(1 to 2)
- return "staminacrit"
- if(5)
- return "stamina0"
- else
- switch(100 - getStaminaLoss())
- if(100 to INFINITY)
- return "stamina0"
- if(80 to 100)
- return "stamina1"
- if(60 to 80)
- return "stamina2"
- if(40 to 60)
- return "stamina3"
- if(20 to 40)
- return "stamina4"
- if(0 to 20)
- return "stamina5"
- else
- return "stamina6"
+ icon_state = "stamina[max(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
//stam buffer
/obj/screen/staminabuffer
@@ -48,31 +33,29 @@
layer = ABOVE_HUD_LAYER + 0.1
mouse_opacity = 0
-/mob/living/carbon/human/proc/staminabufferhudamount()
- if(stat == DEAD || recoveringstam)
- return "stambuffer7"
+/obj/screen/staminabuffer/update_icon_state()
+ var/mob/living/carbon/user = hud?.mymob
+ if(!user)
+ return
+ if(user.stat == DEAD || user.recoveringstam || (user.hal_screwyhud in 1 to 2))
+ icon_state = "stambuffer7"
+ else if(user.hal_screwyhud == 5)
+ icon_state = "stambuffer0"
else
- switch(hal_screwyhud)
- if(1 to 2)
- return "stambuffer7"
- if(5)
- return "stambuffer0"
+ switch(user.bufferedstam / user.stambuffer)
+ if(0.95 to INFINITY)
+ icon_state = "stambuffer7"
+ if(0.9 to 0.95)
+ icon_state = "stambuffer6"
+ if(0.8 to 0.9)
+ icon_state = "stambuffer5"
+ if(0.6 to 0.8)
+ icon_state = "stambuffer4"
+ if(0.4 to 0.6)
+ icon_state = "stambuffer3"
+ if(0.2 to 0.4)
+ icon_state = "stambuffer2"
+ if(0.05 to 0.2)
+ icon_state = "stambuffer1"
else
- var/percentmult = 100/stambuffer
- switch(stambuffer*percentmult - bufferedstam*percentmult)
- if(95 to INFINITY)
- return "stambuffer0"
- if(90 to 95)
- return "stambuffer1"
- if(80 to 90)
- return "stambuffer2"
- if(60 to 80)
- return "stambuffer3"
- if(40 to 60)
- return "stambuffer4"
- if(20 to 40)
- return "stambuffer5"
- if(5 to 20)
- return "stambuffer6"
- else
- return "stambuffer7"
+ icon_state = "stambuffer0"
diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
index 1c6b957d9f..34ea0e789f 100644
--- a/modular_citadel/code/modules/mob/living/carbon/carbon.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
@@ -41,18 +41,16 @@
playsound_local(src, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
if(client)
client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting
- if(hud_used && hud_used.static_inventory)
- for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
- selector.rebasetointerbay(src)
+ var/obj/screen/combattoggle/T = locate() in hud_used?.static_inventory
+ T?.update_icon_state()
combatmessagecooldown = 10 SECONDS + world.time //This is set 100% of the time to make sure squeezing regen out of process cycles doesn't result in the combat mode message getting spammed
SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode)
return TRUE
mob/living/carbon/proc/toggle_vore_mode()
voremode = !voremode
- if(hud_used && hud_used.static_inventory)
- for(var/obj/screen/voretoggle/selector in hud_used.static_inventory)
- selector.rebaseintomygut(src)
+ var/obj/screen/voretoggle/T = locate() in hud_used?.static_inventory
+ T?.update_icon_state()
if(combatmode)
return FALSE //let's not override the main draw of the game these days
SEND_SIGNAL(src, COMSIG_VORE_TOGGLED, src, voremode)
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm
index 15e08907d5..0b6903c9fe 100644
--- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm
@@ -1,6 +1,3 @@
-/mob/living/carbon/human
- var/sprinting = FALSE
-
/mob/living/carbon/human/Move(NewLoc, direct)
var/oldpseudoheight = pseudo_z_axis
. = ..()
@@ -28,9 +25,8 @@
playsound_local(src, 'sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
else
playsound_local(src, 'sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
- if(hud_used && hud_used.static_inventory)
- for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
- selector.insert_witty_toggle_joke_here(src)
+ var/obj/screen/sprintbutton/S = locate() in hud_used?.static_inventory
+ S?.update_icon_state()
return TRUE
/mob/living/carbon/human/proc/sprint_hotkey(targetstatus)
diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm
index 16bf776171..513a80cae0 100644
--- a/modular_citadel/code/modules/mob/living/living.dm
+++ b/modular_citadel/code/modules/mob/living/living.dm
@@ -1,4 +1,5 @@
/mob/living
+ var/sprinting = FALSE
var/recoveringstam = FALSE
var/incomingstammult = 1
var/bufferedstam = 0
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
index 59630186d1..3f88513372 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm
@@ -1,6 +1,3 @@
-/mob/living/silicon/robot
- var/sprinting = FALSE
-
/mob/living/silicon/robot/Move(NewLoc, direct)
. = ..()
if(. && sprinting && !(movement_type & FLYING) && canmove && !resting)
@@ -24,9 +21,8 @@
if(shutdown)
playsound_local(src, 'sound/effects/light_flicker.ogg', 50, FALSE, pressure_affected = FALSE)
playsound_local(src, 'sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
- if(hud_used && hud_used.static_inventory)
- for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
- selector.insert_witty_toggle_joke_here(src)
+ var/obj/screen/sprintbutton/S = locate() in hud_used?.static_inventory
+ S?.update_icon_state()
return TRUE
/mob/living/silicon/robot/proc/sprint_hotkey(targetstatus)
diff --git a/tgstation.dme b/tgstation.dme
index 25b7c3e6f3..5526e5eaf0 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -199,7 +199,6 @@
#include "code\_onclick\hud\ghost.dm"
#include "code\_onclick\hud\guardian.dm"
#include "code\_onclick\hud\hud.dm"
-#include "code\_onclick\hud\hud_cit.dm"
#include "code\_onclick\hud\human.dm"
#include "code\_onclick\hud\lavaland_elite.dm"
#include "code\_onclick\hud\monkey.dm"