mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-10 15:36:56 +01:00
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:
@@ -442,10 +442,11 @@
|
||||
return final_list
|
||||
|
||||
/obj/machinery/chem_dispenser/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
icon_state = "mixer0b"
|
||||
|
||||
/obj/machinery/chem_heater/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
|
||||
@@ -237,10 +237,11 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/pandemic/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user