mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 07:23:16 +00:00
Merge pull request #9369 from mwerezak/action-icons
Ports "Makes update_action_buttons() work on-demand"
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
@@ -36,6 +37,7 @@
|
||||
return 0
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
if (ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.update_inv_back()
|
||||
M.update_action_buttons()
|
||||
|
||||
usr << "You toggle the thrusters [on? "on":"off"]."
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user