From 8b5e3e6004708e908da17bd713d3f13f295e0480 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 5 Feb 2020 14:55:47 +0100 Subject: [PATCH 1/4] Removes the shitty verb --- .../reagents/reagent_containers/hypospray.dm | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index f4bb5e0d08..da99cd184b 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -423,18 +423,19 @@ else unload_hypo(vial,user) -/obj/item/hypospray/mkii/verb/modes() - set name = "Toggle Application Mode" - set category = "Object" - set src in usr - var/mob/M = usr - switch(mode) - if(HYPO_SPRAY) - mode = HYPO_INJECT - to_chat(M, "[src] is now set to inject contents on application.") - if(HYPO_INJECT) - mode = HYPO_SPRAY - to_chat(M, "[src] is now set to spray contents on application.") +/obj/item/hypospray/mkii/AltClick(mob/living/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE,)) + 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.") + +/obj/item/hypospray/mkii/examine(mob/user) + . = ..() + . += "You can click on it while holding Alt to toggle its mode from spraying to injecting." #undef HYPO_SPRAY #undef HYPO_INJECT From 9951f291fd0f9a0359886a851d00abc079036693 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 5 Feb 2020 20:14:35 +0100 Subject: [PATCH 2/4] Reviewer suggestions --- code/modules/reagents/reagent_containers/hypospray.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index da99cd184b..d459206c99 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -424,7 +424,7 @@ unload_hypo(vial,user) /obj/item/hypospray/mkii/AltClick(mob/living/user) - if(user.canUseTopic(src, BE_CLOSE, FALSE,)) + if(user.canUseTopic(src, FALSE)) switch(mode) if(HYPO_SPRAY) mode = HYPO_INJECT @@ -432,10 +432,11 @@ if(HYPO_INJECT) mode = HYPO_SPRAY to_chat(user, "[src] is now set to spray contents on application.") + return TRUE /obj/item/hypospray/mkii/examine(mob/user) . = ..() - . += "You can click on it while holding Alt to toggle its mode from spraying to injecting." + . += "Alt-Click it to toggle its mode from spraying to injecting and vice versa." #undef HYPO_SPRAY #undef HYPO_INJECT From 560228901380f2a238df380a11f15428385305f9 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 5 Feb 2020 20:25:04 +0100 Subject: [PATCH 3/4] Parent call Failed to get in the previous commit for some reason. --- code/modules/reagents/reagent_containers/hypospray.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index d459206c99..034f52bd2c 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -424,6 +424,7 @@ unload_hypo(vial,user) /obj/item/hypospray/mkii/AltClick(mob/living/user) + ..() if(user.canUseTopic(src, FALSE)) switch(mode) if(HYPO_SPRAY) From 23834ce3f5811f15fc5325593440f996e956dea5 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Wed, 5 Feb 2020 22:54:01 +0200 Subject: [PATCH 4/4] Parent call Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/reagents/reagent_containers/hypospray.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 034f52bd2c..02c8798329 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -424,7 +424,7 @@ unload_hypo(vial,user) /obj/item/hypospray/mkii/AltClick(mob/living/user) - ..() + . = ..() if(user.canUseTopic(src, FALSE)) switch(mode) if(HYPO_SPRAY)