Merge pull request #5284 from Anewbe/item_zoom

Swapping hands cancels zoom
This commit is contained in:
Atermonera
2018-05-24 13:19:36 -07:00
committed by GitHub
4 changed files with 52 additions and 0 deletions
@@ -340,6 +340,11 @@ This saves us from having to call add_fingerprint() any time something is put in
if(W.action_button_name)
update_action_buttons()
if(W.zoom)
W.zoom()
W.in_inactive_hand(src)
return 1
//Checks if a given slot can be accessed at this time, either to equip or unequip I
+7
View File
@@ -1113,6 +1113,13 @@ default behaviour is:
else
hud_used.l_hand_hud_object.icon_state = "l_hand_inactive"
hud_used.r_hand_hud_object.icon_state = "r_hand_active"
// We just swapped hands, so the thing in our inactive hand will notice it's not the focus
var/obj/item/I = get_inactive_hand()
if(I)
if(I.zoom)
I.zoom()
I.in_inactive_hand(src) //This'll do specific things, determined by the item
return
/mob/living/proc/activate_hand(var/selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.