[MIRROR] Syringe toggle has been replaced with left-click to inject, right-click to draw. You can also now change transfer amount. (#3345)

* Syringe toggle has been replaced with left-click to inject, right-click to draw. You can also now change transfer amount. (#56865)

* Syringe toggle has been replaced with left-click to inject, right-click to draw. You can also now change transfer amount.

Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-02-13 10:13:50 +00:00
committed by GitHub
co-authored by Mothblocks
parent 2e2b0b5931
commit b43845d267
7 changed files with 100 additions and 143 deletions
+6 -8
View File
@@ -520,12 +520,6 @@
if(IS_EDIBLE(O) || istype(O, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too)
var/obj/item/reagent_containers/reagent_source = O
if(istype(reagent_source, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/syr = reagent_source
if(syr.mode != 1)
to_chat(user, "<span class='warning'>You can't get any extract out of this plant.</span>" )
return
if(!reagent_source.reagents.total_volume)
to_chat(user, "<span class='warning'>[reagent_source] is empty!</span>")
return 1
@@ -548,8 +542,6 @@
if(istype(reagent_source, /obj/item/reagent_containers/syringe/))
var/obj/item/reagent_containers/syringe/syr = reagent_source
visi_msg="[user] injects [target] with [syr]"
if(syr.reagents.total_volume <= syr.amount_per_transfer_from_this)
syr.mode = 0
// Beakers, bottles, buckets, etc.
if(reagent_source.is_drainable())
playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE)
@@ -741,6 +733,12 @@
else
return ..()
/obj/machinery/hydroponics/attackby_secondary(obj/item/weapon, mob/user, params)
if (istype(weapon, /obj/item/reagent_containers/syringe))
to_chat(user, "<span class='warning'>You can't get any extract out of this plant.</span>")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
return SECONDARY_ATTACK_CALL_NORMAL
/obj/machinery/hydroponics/can_be_unfasten_wrench(mob/user, silent)
if (!unwrenchable) // case also covered by NODECONSTRUCT checks in default_unfasten_wrench
return CANT_UNFASTEN