Merge pull request #9983 from Ghommie/Ghommie-cit408

refactoring altclick interaction to allow parent calls without forcing the turf contents stat menu open.
This commit is contained in:
Lin
2019-12-10 23:52:31 +00:00
committed by Archie
parent 7ed460e9fe
commit b0779fe2d7
96 changed files with 10279 additions and 10117 deletions
@@ -207,8 +207,10 @@
var/mob/M = loc
M.update_inv_hands()
/obj/item/gun/ballistic/automatic/AM4B/AltClick(mob/living/user)
. = ..()
if(!in_range(src, user)) //Basic checks to prevent abuse
return
. = TRUE
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
@@ -217,6 +219,7 @@
if(body_color_input)
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
update_icon()
/obj/item/gun/ballistic/automatic/AM4B/examine(mob/user)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
@@ -37,8 +37,10 @@ obj/item/gun/energy/e_gun/cx/update_icon()
M.update_inv_hands()
obj/item/gun/energy/e_gun/cx/AltClick(mob/living/user)
. = ..()
if(!in_range(src, user)) //Basic checks to prevent abuse
return
. = TRUE
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
@@ -83,15 +83,17 @@
return 1
/obj/item/gun/energy/pumpaction/AltClick(mob/living/user) //for changing firing modes since attackself is already used for pumping
. = ..()
if(!in_range(src, user)) //Basic checks to prevent abuse
return
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(ammo_type.len > 1)
select_fire(user)
update_icon()
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
else
select_fire(user)
update_icon()
return TRUE
/obj/item/gun/energy/pumpaction/examine(mob/user) //so people don't ask HOW TO CHANGE FIRING MODE
. = ..()