Okay.
This commit is contained in:
@@ -102,8 +102,7 @@
|
||||
St.volume *= St.purity
|
||||
St.purity = 1
|
||||
N.volume -= 0.002
|
||||
St.data.["grown_volume"] += added_volume
|
||||
St.data = St.data.["grown_volume"]
|
||||
St.data["grown_volume"] = St.data["grown_volume"] + added_volume
|
||||
|
||||
/datum/chemical_reaction/styptic_powder
|
||||
name = "Styptic Powder"
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
name = "graft synthtissue"
|
||||
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
|
||||
repeatable = TRUE
|
||||
time = 50
|
||||
time = 75
|
||||
chems_needed = list("synthtissue")
|
||||
var/obj/item/organ/chosen_organ
|
||||
var/health_restored = 10
|
||||
|
||||
/datum/surgery_step/graft_synthtissue/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(implement_type in implements)
|
||||
@@ -38,23 +39,32 @@
|
||||
organs[O.name] = O
|
||||
chosen_organ = input("Target which organ?", "Surgery", null, null) as null|anything in organs
|
||||
chosen_organ = organs[chosen_organ]
|
||||
if(chosen_organ.organ_flags & ORGAN_FAILING)
|
||||
to_chat(user, "<span class='notice'>[target]'s [chosen_organ] is too damaged to graft onto!</span>")
|
||||
if(!chosen_organ)
|
||||
return -1
|
||||
if(!target.reagents.has_reagent("synthtissue"))
|
||||
to_chat(user, "<span class='notice'>There's no synthtissue available for use on [chosen_organ]</span>")
|
||||
return -1
|
||||
var/datum/reagent/synthtissue/Sf = locate(/datum/reagent/synthtissue) in target.reagents.reagent_list
|
||||
if(Sf.volume < 10)
|
||||
to_chat(user, "<span class='notice'>There's not enough synthtissue to perform the operation! There needs to be at least 10u.</span>")
|
||||
return -1
|
||||
|
||||
user.visible_message("[user] begins to repair damaged portions of [target]'s [chosen_organ].</span>")
|
||||
if((chosen_organ.organ_flags & ORGAN_FAILING) && !(Sf.data["grown_volume"] >= 115))
|
||||
to_chat(user, "<span class='notice'>[chosen_organ] is too damaged to graft onto!</span>")
|
||||
return -1
|
||||
|
||||
|
||||
user.visible_message("[user] begins to graft synthtissue onto [chosen_organ].</span>")
|
||||
target.reagents.remove_reagent("synthtissue", 10)
|
||||
if(health_restored != 10)
|
||||
health_restored = 10
|
||||
health_restored += (Sf.data["grown_volume"]/10)
|
||||
|
||||
/datum/surgery_step/graft_synthtissue/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if((!chosen_organ)||(chosen_organ.organ_flags & ORGAN_FAILING))
|
||||
to_chat(user, "[target] has no [chosen_organ] capable of repair!")
|
||||
else
|
||||
user.visible_message("[user] successfully repairs part of [target]'s [chosen_organ].", "<span class='notice'>You succeed in repairing parts of [target]'s [chosen_organ].</span>")
|
||||
chosen_organ.applyOrganDamage(-10)
|
||||
user.visible_message("[user] successfully repairs part of [chosen_organ].", "<span class='notice'>You succeed in repairing parts of [chosen_organ].</span>")
|
||||
chosen_organ.applyOrganDamage(health_restored)
|
||||
|
||||
/datum/surgery_step/graft_synthtissue/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if((!chosen_organ)||(chosen_organ.organ_flags & ORGAN_FAILING))
|
||||
to_chat(user, "[target] has no [chosen_organ] capable of repair!")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] accidentally damages part of [target]'s [chosen_organ]!</span>", "<span class='warning'>You damage [target]'s [chosen_organ]! Apply more synthtissue if it's run out.</span>")
|
||||
chosen_organ.applyOrganDamage(10)
|
||||
user.visible_message("<span class='warning'>[user] accidentally damages part of [chosen_organ]!</span>", "<span class='warning'>You damage [chosen_organ]! Apply more synthtissue if it's run out.</span>")
|
||||
chosen_organ.applyOrganDamage(10)
|
||||
return FALSE
|
||||
|
||||
@@ -115,35 +115,34 @@
|
||||
to_chat(M, "<span class='danger'>You feel your [target] heal! It stings like hell!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
if(method==INJECT)
|
||||
data.["injected_vol"] += reac_volume
|
||||
message_admins("inject! [data.["injected_vol"]], [reac_volume]")
|
||||
data["injected_vol"] = data["injected_vol"] + reac_volume
|
||||
..()
|
||||
|
||||
/datum/reagent/synthtissue/on_mob_life(mob/living/carbon/C)
|
||||
if(!iscarbon(C))
|
||||
return ..()
|
||||
if(data.["injected_vol"] > 14)
|
||||
if(data.["grown_volume"] > 150) //I don't think this is even possible, but damn to I want to see if someone can (bare in mind it takes 2s to grow 0.05u)
|
||||
if(data["injected_vol"] > 14)
|
||||
if(data["grown_volume"] > 175) //I don't think this is even possible, but damn to I want to see if someone can (bare in mind it takes 2s to grow 0.05u)
|
||||
if(volume >= 14)
|
||||
if(C.regenerate_organs(only_one = TRUE))
|
||||
C.reagents.remove_reagent(id, 15)
|
||||
to_chat(C, "<span class='notice'>You feel something reform inside of you!</span>")
|
||||
|
||||
data.["injected_vol"] -= metabolization_rate
|
||||
data["injected_vol"] -= metabolization_rate
|
||||
..()
|
||||
|
||||
/datum/reagent/synthtissue/on_merge(passed_data)
|
||||
if(passed_data.["grown_volume"] > data.["grown_volume"])
|
||||
data.["grown_volume"] = passed_data.["grown_volume"]
|
||||
if(!data)
|
||||
data = passed_data
|
||||
if(!passed_data)
|
||||
return ..()
|
||||
if(passed_data["grown_volume"] > data["grown_volume"])
|
||||
data["grown_volume"] = passed_data["grown_volume"]
|
||||
..()
|
||||
|
||||
/datum/reagent/synthtissue/on_new(passed_data)
|
||||
if(passed_data.["grown_volume"] > data.["grown_volume"])
|
||||
data.["grown_volume"] = passed_data.["grown_volume"]
|
||||
if(!data)
|
||||
data = passed_data
|
||||
if(!passed_data)
|
||||
return ..()
|
||||
if(passed_data["grown_volume"] > data["grown_volume"])
|
||||
data["grown_volume"] = passed_data["grown_volume"]
|
||||
..()
|
||||
|
||||
/datum/reagent/synthtissue/
|
||||
|
||||
Reference in New Issue
Block a user