Merge pull request #10212 from Ghommie/Ghommie-cit471

Ports some hud and update_icon code updates.
This commit is contained in:
Lin
2019-12-28 04:07:03 +00:00
committed by GitHub
56 changed files with 423 additions and 264 deletions
+2 -1
View File
@@ -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
@@ -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)
@@ -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()
@@ -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
@@ -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
@@ -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
+2 -6
View File
@@ -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"
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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"