Merge pull request #8708 from Birdtalon/nanocalcium

Nanocalcium: Bone repair drug.
This commit is contained in:
tigercat2000
2018-03-19 13:37:20 -07:00
committed by GitHub
5 changed files with 82 additions and 2 deletions
@@ -1035,3 +1035,40 @@
color = "#F5F5F5"
// This reagent's effects are handled in heart attack handling code
/datum/reagent/medicine/nanocalcium
name = "Nano-Calcium"
id = "nanocalcium"
description = "Highly advanced nanites equipped with calcium payloads designed to repair bones. Nanomachines son."
color = "#9b3401"
metabolization_rate = 0.5
/datum/reagent/medicine/nanocalcium/on_mob_life(mob/living/carbon/human/M)
switch(current_cycle)
if(1 to 19)
M.AdjustJitter(4)
if(prob(10))
to_chat(M, "<span class='warning'>Your skin feels hot and your veins are on fire!</span>")
if(20 to 43)
//If they have stimulants or stimulant drugs then just apply toxin damage instead.
if(M.reagents.has_reagent("methamphetamine") || M.reagents.has_reagent("crank") || M.reagents.has_reagent("bath_salts") || M.reagents.has_reagent("stimulative_agent") || M.reagents.has_reagent("stimulants"))
M.adjustToxLoss(10)
else //apply debilitating effects
if(prob(75))
M.AdjustConfused(5)
else
M.AdjustWeakened(5)
if(44)
to_chat(M, "<span class='warning'>Your body goes rigid, you cannot move at all!</span>")
M.AdjustWeakened(15)
if(45 to INFINITY) // Start fixing bones | If they have stimulants or stimulant drugs in their system then the nanites won't work.
if(M.reagents.has_reagent("methamphetamine") || M.reagents.has_reagent("crank") || M.reagents.has_reagent("bath_salts") || M.reagents.has_reagent("stimulative_agent") || M.reagents.has_reagent("stimulants"))
return ..()
else
for(var/obj/item/organ/external/E in M.bodyparts)
if(E.is_broken())
if(prob(50)) // Each tick has a 50% chance of repearing a bone.
to_chat(M, "<span class='notice'>You feel a burning sensation in your [E.name] as it straightens involuntarily!</span>")
E.rejuvenate() //Repair it completely.
break
..()
@@ -39,6 +39,8 @@
add_logs(user, M, "injected", src, "([contained])")
return TRUE
/obj/item/weapon/reagent_containers/hypospray/CMO
list_reagents = list("omnizine" = 30)
@@ -75,6 +77,7 @@
return
..()
update_icon()
return TRUE
/obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon()
if(reagents.total_volume > 0)
@@ -110,4 +113,17 @@
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(50)
volume = 50
list_reagents = list("stimulants" = 50)
list_reagents = list("stimulants" = 50)
/obj/item/weapon/reagent_containers/hypospray/autoinjector/nanocalcium
name = "nanocalcium autoinjector"
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
icon_state = "bonepen"
amount_per_transfer_from_this = 30
possible_transfer_amounts = list(30)
volume = 30
list_reagents = list("nanocalcium" = 30)
/obj/item/weapon/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
if(..())
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)