mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Added new hypospray sprites. (#8161)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user