Merge pull request #9369 from mwerezak/action-icons

Ports "Makes update_action_buttons() work on-demand"
This commit is contained in:
Chinsky
2015-05-21 03:35:41 +03:00
10 changed files with 14 additions and 5 deletions
+1
View File
@@ -276,6 +276,7 @@ BLIND // can't see anything
set_light(0)
light_applied = 0
update_icon(user)
user.update_action_buttons()
/obj/item/clothing/head/update_icon(var/mob/user)
+2 -1
View File
@@ -30,6 +30,7 @@
if(activation_sound)
usr << activation_sound
usr << "You activate the optical matrix on the [src]."
user.update_action_buttons()
/obj/item/clothing/glasses/meson
name = "Optical Meson Scanner"
@@ -173,8 +174,8 @@
body_parts_covered &= ~EYES
icon_state = "[initial(icon_state)]up"
usr << "You push \the [src] up out of your face."
update_clothing_icon()
usr.update_action_buttons()
/obj/item/clothing/glasses/welding/superior
name = "superior welding goggles"
+2 -1
View File
@@ -48,7 +48,8 @@
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face."
update_clothing_icon() //so our mob-overlays update
update_clothing_icon() //so our mob-overlays
usr.update_action_buttons()
/*
+1
View File
@@ -33,6 +33,7 @@
if(icon_base) icon_state = "[icon_base]1"
user << "You enable the mag-pulse traction system."
user.update_inv_shoes() //so our mob-overlays update
user.update_action_buttons()
/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user)
var/mob/living/carbon/human/H = user
+1 -1
View File
@@ -151,12 +151,12 @@
user << "You will have to put on the [src] before you can do that."
return
flags |= NOSLIP
magpulse = 1
canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly.
user << "You dig your claws deeply into the flooring, bracing yourself."
user << "It would be hard to take off the [src] without relaxing your grip first."
user.update_action_buttons()
//In case they somehow come off while enabled.
/obj/item/clothing/shoes/magboots/vox/dropped(mob/user as mob)
@@ -35,6 +35,7 @@
camera.replace_networks(camera_networks)
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
user.update_action_buttons()
return 1
..()
@@ -315,6 +315,9 @@ This saves us from having to call add_fingerprint() any time something is put in
W.layer = 20
if(W.icon_action_button)
update_action_buttons()
return 1
//Checks if a given slot can be accessed at this time, either to equip or unequip I
@@ -1131,8 +1131,6 @@
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg, global_hud.thermal, global_hud.meson, global_hud.science)
update_action_buttons()
if(damageoverlay.overlays)
damageoverlay.overlays = list()