mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MODULAR] Rebinds Hypospray Controls (#9558)
* god * Update hyposprays_II.dm * finally * a bit of clean up * it's just like a gun * Update hyposprays_II.dm * Update modular_skyrat/modules/hyposprays/code/hyposprays_II.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
@@ -99,7 +99,6 @@
|
||||
. += "[vial] has [vial.reagents.total_volume]u remaining."
|
||||
else
|
||||
. += "It has no vial loaded in."
|
||||
. += "[src] is set to [mode ? "Inject" : "Spray"] contents on application."
|
||||
|
||||
/obj/item/hypospray/mkii/proc/unload_hypo(obj/item/hypo, mob/user)
|
||||
if((istype(hypo, /obj/item/reagent_containers/glass/vial)))
|
||||
@@ -149,12 +148,18 @@
|
||||
insert_vial(used_item, user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/AltClick(mob/user)
|
||||
/obj/item/hypospray/mkii/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(vial)
|
||||
vial.attack_self(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/attack_self_secondary(mob/user)
|
||||
. = ..()
|
||||
if(vial)
|
||||
vial.attack_self_secondary(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
@@ -170,12 +175,14 @@
|
||||
obj_flags |= EMAGGED
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/attack_hand(mob/user)
|
||||
. = ..() //Don't bother changing this or removing it from containers will break.
|
||||
|
||||
/obj/item/hypospray/mkii/attack(obj/item/hypo, mob/user, params)
|
||||
mode = HYPO_INJECT
|
||||
return
|
||||
|
||||
/obj/item/hypospray/mkii/attack_secondary(obj/item/hypo, mob/user, params)
|
||||
mode = HYPO_SPRAY
|
||||
return SECONDARY_ATTACK_CONTINUE_CHAIN
|
||||
|
||||
/obj/item/hypospray/mkii/afterattack(atom/target, mob/living/user, proximity)
|
||||
if(istype(target, /obj/item/reagent_containers/glass/vial))
|
||||
insert_vial(target, user, vial)
|
||||
@@ -231,31 +238,24 @@
|
||||
to_chat(user, span_notice("You [fp_verb] [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/hypospray/mkii/attack_self(mob/living/user)
|
||||
if(user)
|
||||
/obj/item/hypospray/mkii/afterattack_secondary(atom/target, mob/living/user, proximity)
|
||||
return SECONDARY_ATTACK_CALL_NORMAL
|
||||
|
||||
/obj/item/hypospray/mkii/attack_hand(mob/living/user)
|
||||
if(user && loc == user && user.is_holding(src))
|
||||
if(user.incapacitated())
|
||||
return
|
||||
else if(!vial)
|
||||
to_chat(user, "This Hypo needs to be loaded first!")
|
||||
. = ..()
|
||||
return
|
||||
else
|
||||
unload_hypo(vial,user)
|
||||
|
||||
/obj/item/hypospray/mkii/CtrlClick(mob/living/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, FALSE) && user.get_active_held_item(src))
|
||||
switch(mode)
|
||||
if(HYPO_SPRAY)
|
||||
mode = HYPO_INJECT
|
||||
to_chat(user, "[src] is now set to inject contents on application.")
|
||||
if(HYPO_INJECT)
|
||||
mode = HYPO_SPRAY
|
||||
to_chat(user, "[src] is now set to spray contents on application.")
|
||||
return TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/hypospray/mkii/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_notice("<b>Ctrl-Click</b> it to toggle its mode from spraying to injecting and vice versa.")
|
||||
. += span_notice("<b>Left-Click</b> on patients to inject, <b>Right-Click</b> to spray.")
|
||||
|
||||
#undef HYPO_SPRAY
|
||||
#undef HYPO_INJECT
|
||||
|
||||
Reference in New Issue
Block a user