diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index 90ac7838cbe..bb7a0f9db82 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -4,7 +4,9 @@
/obj/item/reagent_containers/hypospray
name = "hypospray"
- desc = "The Zeng-Hu Pharmaceuticals hypospray is a sterile, air-needle autoinjector for administration of drugs to patients."
+ desc = "A sterile, air-needle autoinjector for administration of drugs to patients."
+ description_fluff = "The Zeng-Hu Pharmaceuticals' Hypospray - 9 out of 10 doctors recommend it!"
+ description_info = "Unlike a syringe, reagents have to be poured into the hypospray before it can be used."
icon = 'icons/obj/syringe.dmi'
item_state = "hypo"
icon_state = "hypo"
@@ -14,11 +16,10 @@
possible_transfer_amounts = null
flags = OPENCONTAINER
slot_flags = SLOT_BELT
- center_of_mass = null
- drop_sound = 'sound/items/drop/bottle.ogg'
+ drop_sound = 'sound/items/drop/gun.ogg'
var/armorcheck = 1
var/time = 3 SECONDS
- var/has_level_sprites = TRUE
+ var/image/filling //holds a reference to the current filling overlay
matter = list("glass" = 400, DEFAULT_WALL_MATERIAL = 200)
/obj/item/reagent_containers/hypospray/Initialize()
@@ -31,8 +32,10 @@
/obj/item/reagent_containers/hypospray/cmo
name = "premium hypospray"
- desc = "The Zeng-Hu Pharmaceuticalsn premium hypospray is a cutting-edge, sterile, air-needle autoinjector for rapid administration of drugs to patients."
- item_state = "cmo_hypo"
+ desc = "A high-end version of the regular hypospray, it allows for a substantially higher rate of drug administration to patients."
+ description_fluff = "The Zeng-Hu Pharmaceuticals' Hypospray Mk-II is a cutting-edge version of the regular hypospray, with a much more expensive and streamlined injection process."
+ description_info = "This version of the hypospray has no delay before injecting a patient with reagent."
+ icon_state = "cmo_hypo"
volume = 30
time = 0
@@ -40,7 +43,7 @@
. = ..()
var/mob/living/carbon/human/H = M
if(istype(H))
- user.visible_message("\The [user] is trying to inject \the [M] with \the [src]!","You are trying to inject \the [M] with \the [src].")
+ user.visible_message(span("warning", "\The [user] is trying to inject \the [M] with \the [src]!"),span("notice", "You are trying to inject \the [M] with \the [src]."))
var/inj_time = time
if(armorcheck && H.run_armor_check(target_zone,"melee",0,"Your armor slows down the injection!","Your armor slows down the injection!"))
inj_time += 6 SECONDS
@@ -48,21 +51,18 @@
return 1
/obj/item/reagent_containers/hypospray/update_icon()
- if(!has_level_sprites)
- return
- var/percent = round((reagents.total_volume / 10) * 100)
- switch(percent)
- if(0 to 25)
- icon_state = "[item_state]"
- if(26 to 50)
- icon_state = "[item_state]_25"
- if(51 to 75)
- icon_state = "[item_state]_50"
- if(76 to 99)
- icon_state = "[item_state]_75"
- if(100 to INFINITY)
- icon_state = "[item_state]_100"
+ cut_overlays()
+ var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / (volume / 5)))
+ icon_state = "[initial(icon_state)]_[rounded_vol]"
+
+ if(reagents.total_volume)
+ filling = image('icons/obj/syringe.dmi', src, "[initial(icon_state)][volume]")
+
+ filling.icon_state = "[initial(icon_state)][rounded_vol]"
+
+ filling.color = reagents.get_color()
+ add_overlay(filling)
/obj/item/reagent_containers/hypospray/afterattack(var/mob/M, var/mob/user, proximity)
if (!istype(M))
@@ -72,13 +72,13 @@
return
if(!reagents.total_volume)
- to_chat(user,"\The [src] is empty.")
+ to_chat(user,span("warning", "\The [src] is empty."))
return
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
user.do_attack_animation(M)
- to_chat(user,"You inject \the [M] with \the [src].")
- to_chat(M,"You feel a tiny prick!")
+ to_chat(user,span("notice", "You inject \the [M] with \the [src]."))
+ to_chat(M,span("notice", "You feel a tiny prick!"))
playsound(src, 'sound/items/hypospray.ogg',25)
if(M.reagents)
@@ -86,7 +86,7 @@
var/temp = reagents.get_temperature()
var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD)
admin_inject_log(user, M, src, contained, temp, trans)
- to_chat(user,"[trans] units injected. [reagents.total_volume] units remaining in \the [src].")
+ to_chat(user,span("notice", "[trans] units injected. [reagents.total_volume] units remaining in \the [src]."))
update_icon()
return TRUE
@@ -101,7 +101,6 @@
amount_per_transfer_from_this = 5
volume = 5
time = 0
- has_level_sprites = FALSE
/obj/item/reagent_containers/hypospray/autoinjector/Initialize()
. =..()
@@ -110,25 +109,25 @@
/obj/item/reagent_containers/hypospray/autoinjector/attack(var/mob/M, var/mob/user, target_zone)
if(is_open_container())
- to_chat(user,"You must secure the reagents inside \the [src] before using it!")
+ to_chat(user,span("notice", "You must secure the reagents inside \the [src] before using it!"))
return FALSE
. = ..()
/obj/item/reagent_containers/hypospray/autoinjector/attack_self(mob/user as mob)
if(is_open_container())
if(reagents && reagents.reagent_list.len)
- to_chat(user,"With a quick twist of \the [src]'s lid, you secure the reagents inside.")
+ to_chat(user,span("notice", "With a quick twist of \the [src]'s lid, you secure the reagents inside."))
flags &= ~OPENCONTAINER
update_icon()
else
- to_chat(user,"You can't secure \the [src] without putting reagents in!")
+ to_chat(user,span("notice", "You can't secure \the [src] without putting reagents in!"))
else
- to_chat(user,"The reagents inside \the [src] are already secured.")
+ to_chat(user,span("notice", "The reagents inside \the [src] are already secured."))
return
/obj/item/reagent_containers/hypospray/autoinjector/attackby(obj/item/W, mob/user)
if(W.isscrewdriver() && !is_open_container())
- to_chat(user,"Using \the [W], you unsecure the autoinjector's lid.") // it locks shut after being secured
+ to_chat(user,span("notice", "Using \the [W], you unsecure the autoinjector's lid.")) // it locks shut after being secured
flags |= OPENCONTAINER
update_icon()
return
@@ -143,9 +142,9 @@
/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user)
..(user)
if(reagents && reagents.reagent_list.len)
- to_chat(user, "It is currently loaded.")
+ to_chat(user, span("notice", "It is currently loaded."))
else
- to_chat(user, "It is empty.")
+ to_chat(user, span("notice", "It is empty."))
/obj/item/reagent_containers/hypospray/autoinjector/norepinephrine
@@ -196,7 +195,6 @@
volume = 20
armorcheck = 0
time = 0
- has_level_sprites = FALSE
/obj/item/reagent_containers/hypospray/combat/Initialize()
. = ..()
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index 448d7b36b17..4bd6555438d 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -153,25 +153,25 @@
if(SYRINGE_DRAW)
if(!reagents.get_free_space())
- to_chat(user, "The syringe is full.")
+ to_chat(user, span("warning", "The syringe is full."))
mode = SYRINGE_INJECT
return
if(ismob(target))//Blood!
if(reagents.has_reagent("blood"))
- to_chat(user, "There is already a blood sample in this syringe.")
+ to_chat(user, span("notice", "There is already a blood sample in this syringe."))
return
if(istype(target, /mob/living/carbon))
if(istype(target, /mob/living/carbon/slime))
- to_chat(user, "You are unable to locate any blood.")
+ to_chat(user, span("warning", "You are unable to locate any blood."))
return
var/amount = reagents.get_free_space()
var/mob/living/carbon/T = target
if(!T.dna)
- to_chat(user, "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum).")
+ to_chat(user, span("warning", "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)."))
return
if(NOCLONE in T.mutations) //target done been et, no more blood in him
- to_chat(user, "You are unable to locate any blood.")
+ to_chat(user, span("warning", "You are unable to locate any blood."))
return
var/datum/reagent/B
@@ -189,21 +189,21 @@
reagents.update_total()
on_reagent_change()
reagents.handle_reactions()
- to_chat(user, "You take a blood sample from [target].")
+ to_chat(user, span("notice", "You take a blood sample from [target]."))
for(var/mob/O in viewers(4, user))
- O.show_message("[user] takes a blood sample from [target].", 1)
+ O.show_message(span("notice", "[user] takes a blood sample from [target]."), 1)
else //if not mob
if(!target.reagents.total_volume)
- to_chat(user, "[target] is empty.")
+ to_chat(user, span("notice", "[target] is empty."))
return
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers) && !istype(target, /obj/item/slime_extract))
- to_chat(user, "You cannot directly remove reagents from this object.")
+ to_chat(user, span("notice", "You cannot directly remove reagents from this object."))
return
var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this)
- to_chat(user, "You fill the syringe with [trans] units of the solution.")
+ to_chat(user, span("notice", "You fill the syringe with [trans] units of the solution."))
update_icon()
if(!reagents.get_free_space())
@@ -212,17 +212,17 @@
if(SYRINGE_INJECT)
if(!reagents.total_volume)
- to_chat(user, "The syringe is empty.")
+ to_chat(user, span("notice", "The syringe is empty."))
mode = SYRINGE_DRAW
return
if(istype(target, /obj/item/implantcase/chem))
return
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/storage/fancy/cigarettes))
- to_chat(user, "You cannot directly fill this object.")
+ to_chat(user, span("notice", "You cannot directly fill this object."))
return
if(!target.reagents.get_free_space())
- to_chat(user, "[target] is full.")
+ to_chat(user, span("notice", "[target] is full."))
return
var/mob/living/carbon/human/H = target
@@ -230,10 +230,10 @@
if(istype(H))
affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
- to_chat(user, "\The [H] is missing that limb!")
+ to_chat(user, span("danger", "\The [H] is missing that limb!"))
return
else if(affected.status & ORGAN_ROBOT)
- to_chat(user, "You cannot inject a robotic limb.")
+ to_chat(user, span("danger", "You cannot inject a robotic limb."))
return
if(ismob(target) && target != user)
@@ -256,12 +256,12 @@
return
if(injtime == time)
- user.visible_message("[user] is trying to inject [target] with [visible_name]!")
+ user.visible_message(span("warning", "[user] is trying to inject [target] with [visible_name]!"))
else
if(isvaurca(H))
- user.visible_message("[user] begins hunting for an injection port on [target]'s carapace!")
+ user.visible_message(span("warning", "[user] begins hunting for an injection port on [target]'s carapace!"))
else
- user.visible_message("[user] begins hunting for an injection port on [target]'s suit!")
+ user.visible_message(span("warning", "[user] begins hunting for an injection port on [target]'s suit!"))
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
user.do_attack_animation(target)
@@ -269,7 +269,7 @@
if(!do_mob(user, target, injtime))
return
- user.visible_message("[user] injects [target] with the syringe!")
+ user.visible_message(span("warning", "[user] injects [target] with the syringe!"))
var/trans
if(ismob(target))
@@ -279,7 +279,7 @@
admin_inject_log(user, target, src, contained, reagents.get_temperature(), trans)
else
trans = reagents.trans_to(target, amount_per_transfer_from_this)
- to_chat(user, "You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units.")
+ to_chat(user, span("notice", "You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."))
if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT)
mode = SYRINGE_DRAW
update_icon()
@@ -335,7 +335,7 @@
var/obj/item/organ/external/affecting = H.get_organ(target_zone)
if (!affecting || affecting.is_stump())
- to_chat(user, "They are missing that limb!")
+ to_chat(user, span("danger", "They are missing that limb!"))
return
var/hit_area = affecting.name
@@ -345,7 +345,7 @@
if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50))
for(var/mob/O in viewers(world.view, user))
- O.show_message(text("[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!"), 1)
+ O.show_message(text(span("danger", "[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!")), 1)
user.remove_from_mob(src)
qdel(src)
@@ -355,13 +355,13 @@
return
- user.visible_message("[user] stabs [target] in \the [hit_area] with [src.name]!")
+ user.visible_message(span("danger", "[user] stabs [target] in \the [hit_area] with [src.name]!"))
if(affecting.take_damage(3))
H.UpdateDamageIcon()
else
- user.visible_message("[user] stabs [target] with [src.name]!")
+ user.visible_message(span("danger", "[user] stabs [target] with [src.name]!"))
target.take_organ_damage(3)// 7 is the same as crowbar punch
var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand
@@ -390,10 +390,10 @@
/obj/item/reagent_containers/syringe/ld50_syringe/afterattack(obj/target, mob/user, flag)
if(mode == SYRINGE_DRAW && ismob(target)) // No drawing 50 units of blood at once
- to_chat(user, "This needle isn't designed for drawing blood.")
+ to_chat(user, span("notice", "This needle isn't designed for drawing blood."))
return
if(user.a_intent == "hurt" && ismob(target)) // No instant injecting
- to_chat(user, "This syringe is too big to stab someone with it.")
+ to_chat(user, span("notice", "This syringe is too big to stab someone with it."))
..()
////////////////////////////////////////////////////////////////////////////////
diff --git a/html/changelogs/wezzy_hypospraytweak.yml b/html/changelogs/wezzy_hypospraytweak.yml
new file mode 100644
index 00000000000..b4b954a2c10
--- /dev/null
+++ b/html/changelogs/wezzy_hypospraytweak.yml
@@ -0,0 +1,44 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: Wowzewow (Wezzy)
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - imageadd: "Changes the hypospray sprite again."
+ - bugfix: "CMO's hypospray should have a inhand again."
+ - tweak: "Reagents inside syringes and hyposprays should be more visible now."
+ - tweak: "Made hypospray descriptions much more descriptive."
diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi
index 37e0e3fa68c..2460062e623 100644
Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ
diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi
index 609914ad28d..0c3cb46d2f2 100644
Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ
diff --git a/icons/obj/syringe.dmi b/icons/obj/syringe.dmi
index b91f292e61a..1fbea3cc5d0 100644
Binary files a/icons/obj/syringe.dmi and b/icons/obj/syringe.dmi differ