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
@@ -344,8 +344,10 @@
return FALSE
/obj/item/hypospray/mkii/AltClick(mob/user)
. = ..()
if(vial)
vial.attack_self(user)
return TRUE
// Gunna allow this for now, still really don't approve - Pooj
/obj/item/hypospray/mkii/emag_act(mob/user)
@@ -88,13 +88,25 @@
if(reagents.total_volume && user.canUseTopic(src, BE_CLOSE))
to_chat(user, "<span class='notice'>You start squeezing the liquids out of \the [src]...</span>")
if(do_after(user, action_speed, TRUE, src))
to_chat(user, "<span class='notice'>You squeeze \the [src] dry.</span>")
var/atom/react_loc = get_turf(src)
if(ismob(react_loc))
react_loc = react_loc.loc
if(react_loc)
reagents.reaction(react_loc, TOUCH)
reagents.clear_reagents()
var/msg = "You squeeze \the [src]"
var/obj/item/target
if(Adjacent(user)) //Allows the user to drain the reagents into a beaker if adjacent (no telepathy).
for(var/obj/item/I in user.held_items)
if(I == src)
continue
if(I.is_open_container() && !I.reagents.holder_full())
target = I
break
if(!target)
msg += " dry"
reagents.reaction(get_turf(src), TOUCH)
reagents.clear_reagents()
else
msg += "'s liquids into \the [target]"
reagents.trans_to(target, reagents.total_volume)
to_chat(user, "<span class='notice'>[msg].</span>")
return TRUE
/obj/item/reagent_containers/rag/towel
name = "towel"
@@ -177,4 +189,4 @@
extinguish_efficiency = 5
action_speed = 15
damp_threshold = 0.8
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.