This commit is contained in:
Poojawa
2018-03-06 21:45:16 -06:00
parent 95cb6b23f2
commit 455ee7e687
36 changed files with 691 additions and 531 deletions
@@ -0,0 +1,91 @@
/obj/item/reagent_containers/medspray
name = "medical spray"
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap."
icon = 'icons/obj/chemical.dmi'
icon_state = "medspray"
item_state = "spraycan"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
flags_1 = NOBLUDGEON_1
obj_flags = UNIQUE_RENAME
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 7
amount_per_transfer_from_this = 10
volume = 60
var/can_fill_from_container = TRUE
var/apply_type = PATCH
var/apply_method = "spray"
var/self_delay = 30
var/squirt_mode = 0
var/squirt_amount = 5
/obj/item/reagent_containers/medspray/attack_self(mob/user)
squirt_mode = !squirt_mode
if(squirt_mode)
amount_per_transfer_from_this = squirt_amount
else
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You will now apply the medspray's contents in [squirt_mode ? "short bursts":"extended sprays"]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
/obj/item/reagent_containers/medspray/attack(mob/M, mob/user, def_zone)
if(!reagents || !reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(M == user)
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on themselves.</span>")
if(self_delay)
if(!do_mob(user, M, self_delay))
return
if(!reagents || !reagents.total_volume)
return
to_chat(M, "<span class='notice'>You [apply_method] yourself with [src].</span>")
else
add_logs(user, M, "attempted to apply", src, reagents.log_list())
M.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [M].</span>", \
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [M].</span>")
if(!do_mob(user, M))
return
if(!reagents || !reagents.total_volume)
return
M.visible_message("<span class='danger'>[user] [apply_method]s [M] down with [src].</span>", \
"<span class='userdanger'>[user] [apply_method]s [M] down with [src].</span>")
if(!reagents || !reagents.total_volume)
return
else
add_logs(user, M, "applied", src, reagents.log_list())
playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6)
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
reagents.reaction(M, apply_type, fraction)
reagents.trans_to(M, amount_per_transfer_from_this)
return
/obj/item/reagent_containers/medspray/styptic
name = "medical spray (styptic powder)"
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains styptic powder, for treating cuts and bruises."
icon_state = "brutespray"
list_reagents = list("styptic_powder" = 60)
/obj/item/reagent_containers/medspray/silver_sulf
name = "medical spray (silver sulfadiazine)"
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains silver sulfadiazine, useful for treating burns."
icon_state = "burnspray"
list_reagents = list("silver_sulfadiazine" = 60)
/obj/item/reagent_containers/medspray/synthflesh
name = "medical spray (synthflesh)"
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains synthflesh, an apex brute and burn healing agent."
icon_state = "synthspray"
list_reagents = list("synthflesh" = 60)
/obj/item/reagent_containers/medspray/sterilizine
name = "sterilizer spray"
desc = "Spray bottle loaded with non-toxic sterilizer. Useful in preparation for surgery."
list_reagents = list("sterilizine" = 60)
@@ -171,19 +171,6 @@
list_reagents = list("spraytan" = 50)
/obj/item/reagent_containers/spray/medical
name = "medical spray"
icon = 'icons/obj/chemical.dmi'
icon_state = "medspray"
volume = 100
/obj/item/reagent_containers/spray/medical/sterilizer
name = "sterilizer spray"
desc = "Spray bottle loaded with non-toxic sterilizer. Useful in preparation for surgery."
list_reagents = list("sterilizine" = 100)
//pepperspray
/obj/item/reagent_containers/spray/pepper
name = "pepperspray"