diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 93ba24563d2..8d31a9ff9e5 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -74,7 +74,7 @@ return if(standard_splash_obj(user, target)) return - + if(istype(target, /obj/)) var/obj/O = target if(!(O.flags & NOBLUDGEON) && reagents) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 01a999c0194..90ac7838cbe 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -4,7 +4,7 @@ /obj/item/reagent_containers/hypospray name = "hypospray" - desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for administration of drugs to patients." + desc = "The Zeng-Hu Pharmaceuticals hypospray is a sterile, air-needle autoinjector for administration of drugs to patients." icon = 'icons/obj/syringe.dmi' item_state = "hypo" icon_state = "hypo" @@ -15,13 +15,24 @@ flags = OPENCONTAINER slot_flags = SLOT_BELT center_of_mass = null + drop_sound = 'sound/items/drop/bottle.ogg' var/armorcheck = 1 var/time = 3 SECONDS + var/has_level_sprites = TRUE matter = list("glass" = 400, DEFAULT_WALL_MATERIAL = 200) +/obj/item/reagent_containers/hypospray/Initialize() + . = ..() + update_icon() + +/obj/item/reagent_containers/hypospray/on_reagent_change() + update_icon() + return + /obj/item/reagent_containers/hypospray/cmo name = "premium hypospray" - desc = "The DeForest Medical Corporation premium hypospray is a cutting-edge, sterile, air-needle autoinjector for rapid administration of drugs to patients." + 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" volume = 30 time = 0 @@ -36,6 +47,22 @@ if(!do_mob(user, M, inj_time)) 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" + /obj/item/reagent_containers/hypospray/afterattack(var/mob/M, var/mob/user, proximity) if (!istype(M)) @@ -74,6 +101,7 @@ amount_per_transfer_from_this = 5 volume = 5 time = 0 + has_level_sprites = FALSE /obj/item/reagent_containers/hypospray/autoinjector/Initialize() . =..() @@ -168,6 +196,7 @@ volume = 20 armorcheck = 0 time = 0 + has_level_sprites = FALSE /obj/item/reagent_containers/hypospray/combat/Initialize() . = ..() diff --git a/html/changelogs/alberyk-hypospray.yml b/html/changelogs/alberyk-hypospray.yml new file mode 100644 index 00000000000..13a67786d73 --- /dev/null +++ b/html/changelogs/alberyk-hypospray.yml @@ -0,0 +1,41 @@ +################################ +# 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: Alberyk, BRAINOS + +# 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: "Added new hypospray sprites." diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 4869be25ea4..37e0e3fa68c 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 94de5a488be..609914ad28d 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 26a3e8313d5..b91f292e61a 100644 Binary files a/icons/obj/syringe.dmi and b/icons/obj/syringe.dmi differ