mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 21:42:41 +00:00
Chemistry Map + Equipment Improvements (#5633)
Remapped Chemistry a bit to include more missing equipment, as well as to make it more spacious and less compact. AutoInhalers and autoinjectors were added to the chemistry locker. Most of stuff found in chemistry was added to the chemistry locker for space reasons. Medical belts can now store inhalers and inhaler cartridges. Same with the smartfridge.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
user.visible_message("<span class='warning'>[user] is trying to inject \the [M] with \the [src]!</span>","<span class='notice'>You are trying to inject \the [M] with \the [src].</span>")
|
||||
user.visible_message("<span class='warning'>\The [user] is trying to inject \the [M] with \the [src]!</span>","<span class='notice'>You are trying to inject \the [M] with \the [src].</span>")
|
||||
if(armorcheck && H.run_armor_check(target_zone,"melee",0,"Your armor slows down the injection!","Your armor slows down the injection!"))
|
||||
if(!do_mob(user, M, 60))
|
||||
return 1
|
||||
@@ -42,52 +42,87 @@
|
||||
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
to_chat(user,"<span class='notice'>You inject [M] with [src].</span>")
|
||||
to_chat(user,"<span class='notice'>You inject \the [M] with \the [src].</span>")
|
||||
to_chat(M,"<span class='notice'>You feel a tiny prick!</span>")
|
||||
playsound(src, 'sound/items/hypospray.ogg',25)
|
||||
|
||||
if(M.reagents)
|
||||
var/contained = reagentlist()
|
||||
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, reagents.get_temperature(), trans)
|
||||
admin_inject_log(user, M, src, contained, temp, trans)
|
||||
to_chat(user,"<span class='notice'>[trans] units injected. [reagents.total_volume] units remaining in \the [src].</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector
|
||||
name = "autoinjector"
|
||||
desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel."
|
||||
icon_state = "autoinjector"
|
||||
icon_state = "autoinjector1"
|
||||
var/empty_state = "autoinjector0"
|
||||
item_state = "autoinjector"
|
||||
flags = OPENCONTAINER
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 5
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/Initialize()
|
||||
. =..()
|
||||
icon_state = empty_state
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/afterattack(var/mob/M, var/mob/user, proximity)
|
||||
if(..())
|
||||
used = TRUE
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(var/mob/M, var/mob/user, target_zone)
|
||||
if(is_open_container())
|
||||
to_chat(user,"<span class='notice'>You must secure the reagents inside \the [src] before using it!</span>")
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack_self(mob/user as mob)
|
||||
if(is_open_container())
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
to_chat(user,"<span class='notice'>With a quick twist of \the [src]'s lid, you secure the reagents inside.</span>")
|
||||
flags &= ~OPENCONTAINER
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user,"<span class='notice'>You can't secure \the [src] without putting reagents in!</span>")
|
||||
else
|
||||
to_chat(user,"<span class='notice'>The reagents inside \the [src] are already secured.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0 && !is_open_container())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = empty_state
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user)
|
||||
..(user)
|
||||
if(reagents && reagents.reagent_list.len && !used)
|
||||
user << "<span class='notice'>It is currently loaded.</span>"
|
||||
else if(used)
|
||||
user << "<span class='notice'>It is spent.</span>"
|
||||
else
|
||||
user << "<span class='notice'>It is empty.</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/inaprovaline
|
||||
name = "autoinjector (inaprovaline)"
|
||||
desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel."
|
||||
volume = 5
|
||||
amount_per_transfer_from_this = 20
|
||||
flags = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/inaprovaline/Initialize()
|
||||
. =..()
|
||||
reagents.add_reagent("inaprovaline", 5)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(mob/M as mob, mob/user as mob)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
flags &= ~OPENCONTAINER
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user)
|
||||
..(user)
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
user << "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
user << "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/stimpack
|
||||
name = "stimpack"
|
||||
desc = "A simple chemical cocktail of hyperzine and tramadol designed to boost efficiency by 6,000% (estimated). Hoo-rah!"
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
desc = "A rapid and safe way to administer small amounts of drugs into the lungs by untrained or trained personnel."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "autoinjector"
|
||||
icon_state = "inhaler"
|
||||
icon_state = "inhaler1"
|
||||
var/empty_state = "inhaler0"
|
||||
unacidable = 1
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 5
|
||||
@@ -14,6 +15,12 @@
|
||||
flags = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
center_of_mass = null
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/Initialize()
|
||||
. =..()
|
||||
icon_state = empty_state
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/afterattack(var/mob/living/carbon/human/H, var/mob/user, var/proximity)
|
||||
|
||||
@@ -54,36 +61,56 @@
|
||||
user.do_attack_animation(H)
|
||||
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] injects themselves with the [src]</span>","<span class='notice'>You stick the [src] in your mouth and press the injection button.</span>")
|
||||
user.visible_message("<span class='notice'>\The [user] injects themselves with \the [src]</span>","<span class='notice'>You stick the \the [src] in your mouth and press the injection button.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] attempts to administer \the [src] to [H]...</span>","<span class='notice'>You attempt to administer \the [src] to [H]...</span>")
|
||||
user.visible_message("<span class='warning'>\The [user] attempts to administer \the [src] to \the [H]...</span>","<span class='notice'>You attempt to administer \the [src] to \the [H]...</span>")
|
||||
if (!do_after(user, 1 SECONDS, act_target = H))
|
||||
to_chat(user,"<span class='notice'>You and the target need to be standing still in order to inject \the [src].</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] injects [H] with the [src].</span>","<span class='notice'>You stick \the [src] in [H]'s mouth and press the injection button.</span>")
|
||||
user.visible_message("<span class='notice'>\The [user] injects \the [H] with \the [src].</span>","<span class='notice'>You stick \the [src] in \the [H]'s mouth and press the injection button.</span>")
|
||||
|
||||
if(H.reagents)
|
||||
var/contained = reagentlist()
|
||||
var/temp = reagents.get_temperature()
|
||||
var/trans = reagents.trans_to_mob(H, amount_per_transfer_from_this, CHEM_BREATHE, bypass_checks = TRUE)
|
||||
admin_inject_log(user, H, src, contained, reagents.get_temperature(), trans)
|
||||
admin_inject_log(user, H, src, contained, temp, trans)
|
||||
playsound(src.loc, 'sound/items/stimpack.ogg', 50, 1)
|
||||
to_chat(user,"<span class='notice'>[trans] units injected. [reagents.total_volume] units remaining in \the [src].</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/afterattack(var/mob/M, var/mob/user, proximity)
|
||||
if(..())
|
||||
used = TRUE
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/attack(mob/M as mob, mob/user as mob)
|
||||
if(is_open_container())
|
||||
to_chat(user,"<span class='notice'>You must secure the reagents inside \the [src] before using it!</span>")
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/autoinjector/attack_self(mob/user as mob)
|
||||
if(is_open_container())
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
to_chat(user,"<span class='notice'>With a quick twist of \the [src]'s lid, you secure the reagents inside.</span>")
|
||||
flags &= ~OPENCONTAINER
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user,"<span class='notice'>You can't secure \the [src] without putting reagents in!</span>")
|
||||
else
|
||||
to_chat(user,"<span class='notice'>The reagents inside \the [src] are already secured.</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
flags &= ~OPENCONTAINER
|
||||
if(reagents.total_volume > 0 && !is_open_container())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
icon_state = empty_state
|
||||
|
||||
/obj/item/weapon/reagent_containers/inhaler/examine(mob/user)
|
||||
..(user)
|
||||
@@ -135,7 +162,8 @@
|
||||
/obj/item/weapon/reagent_containers/inhaler/phoron_special
|
||||
name = "vaurca autoinhaler (phoron)"
|
||||
desc = "A strange device that contains some sort of heavy-duty bag and mouthpiece combo."
|
||||
icon_state = "anthaler"
|
||||
icon_state = "anthaler1"
|
||||
empty_state = "anthaler0"
|
||||
volume = 10
|
||||
Initialize()
|
||||
. =..()
|
||||
@@ -146,7 +174,8 @@
|
||||
/obj/item/weapon/reagent_containers/inhaler/soporific
|
||||
name = "autoinhaler (soporific)"
|
||||
desc = "A rapid and safe way to administer small amounts of drugs into the lungs by untrained or trained personnel. This one contains soporific."
|
||||
icon_state = "so_inhaler"
|
||||
icon_state = "so_inhaler1"
|
||||
empty_state = "so_inhaler0"
|
||||
volume = 10
|
||||
|
||||
Initialize()
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
/obj/item/weapon/reagent_containers/personal_inhaler_cartridge/attack_self(mob/user as mob)
|
||||
if(is_open_container())
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
to_chat(user,"<span class='notice'>With a quick twist of the cartridge's lid, you secure the reagents inside \the [src].</span>")
|
||||
to_chat(user,"<span class='notice'>With a quick twist of \the [src]'s lid, you secure the reagents inside.</span>")
|
||||
flags ^= OPENCONTAINER
|
||||
else
|
||||
to_chat(user,"<span class='notice'>You can't secure the cartridge without putting reagents in!</span>")
|
||||
to_chat(user,"<span class='notice'>You can't secure \the [src] without putting reagents in!</span>")
|
||||
else
|
||||
to_chat(user,"<span class='notice'>\The reagents inside [src] are already secured.</span>")
|
||||
to_chat(user,"<span class='notice'>The reagents inside \the [src] are already secured.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/personal_inhaler_cartridge/large
|
||||
|
||||
Reference in New Issue
Block a user