Well it compiles; just synthtissue and TongueLoss now.

This commit is contained in:
Fermi
2019-09-19 01:14:12 +01:00
parent dfa40a4b22
commit 107dd67cbe
29 changed files with 107 additions and 106 deletions
+9 -12
View File
@@ -4,7 +4,7 @@
/datum/surgery/graft_synthtissue
name = "Graft_synthtissue"
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
steps = list(
/datum/surgery_step/incise,
@@ -16,8 +16,8 @@
/datum/surgery_step/close
)
//repair lungs step
/datum/surgery_step/repair_synthtissue
//repair organs
/datum/surgery_step/graft_synthtissue
name = "graft synthtissue"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
repeatable = TRUE
@@ -25,10 +25,8 @@
chems_needed = list("synthtissue")
var/obj/item/organ/chosen_organ
//Repair lungs
/datum/surgery_step/repair_synthtissue/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(implement_type in implements_extract)
current_type = "insert"
/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)
var/list/organs = target.getorganszone(target_zone)
if(!organs.len)
to_chat(user, "<span class='notice'>There are no targetable organs in [target]'s [parse_zone(target_zone)]!</span>")
@@ -39,24 +37,23 @@
organs -= O
organs[O.name] = O
chosen_organ = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
if(chosen_organ.organ_flags & ORGAN_FAILING))
if(chosen_organ.organ_flags & ORGAN_FAILING)
to_chat(user, "<span class='notice'>[target]'s [chosen_organ] is too damaged to repair graft onto!</span>")
return -1
user.visible_message("[user] begins to repair damaged portions of [target]'s [chosen_organ].</span>")
/datum/surgery_step/repair_synthtissue/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/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)
/datum/surgery_step/repair_synthtissue/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/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)
return FALSE
@@ -103,7 +103,7 @@
/obj/item/organ/cyberimp/brain/anti_stun/on_life()
..()
if((crit_fail || !(organ_flags & ORGAN_FAILING)) && amount > 0)
if(crit_fail || !(organ_flags & ORGAN_FAILING))
return
owner.adjustStaminaLoss(-3.5) //Citadel edit, makes it more useful in Stamina based combat
if(owner.AmountStun() > STUN_SET_AMOUNT)
-2
View File
@@ -15,10 +15,8 @@
healing_factor = STANDARD_ORGAN_HEALING
decay_factor = STANDARD_ORGAN_DECAY
var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol
var/failing //is this liver failing?
var/maxHealth = LIVER_DEFAULT_HEALTH
var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off
var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
var/filterToxins = TRUE //whether to filter toxins
+6 -6
View File
@@ -416,13 +416,13 @@
var/cold_modifier = H.dna.species.coldmod
if(breath_temperature < cold_level_3_threshold)
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_3_damage*cold_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_3_damage*cold_modifier*2))
if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold)
H.apply_damage_type(cold_level_2_damage*cold_modifier, cold_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_2_damage*cold_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_2_damage*cold_modifier*2))
if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold)
H.apply_damage_type(cold_level_1_damage*cold_modifier, cold_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_1_damage*cold_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_1_damage*cold_modifier*2))
if(breath_temperature < cold_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
@@ -431,13 +431,13 @@
var/heat_modifier = H.dna.species.heatmod
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_1_damage*heat_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_1_damage*heat_modifier*2))
if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold)
H.apply_damage_type(heat_level_2_damage*heat_modifier, heat_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_2_damage*heat_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_2_damage*heat_modifier*2))
if(breath_temperature > heat_level_3_threshold)
H.apply_damage_type(heat_level_3_damage*heat_modifier, heat_damage_type)
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_3_damage*heat_modifier*2))
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_3_damage*heat_modifier*2))
if(breath_temperature > heat_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [hot_message] in your [name]!</span>")
+2 -13
View File
@@ -29,17 +29,6 @@
var/high_threshold_cleared
var/low_threshold_cleared
/obj/item/organ/proc/Assemble_Failure_Message() //need to assemble a failure message since we can't have variables be based off of the same object's variables
var/name_length
//if no unique failure message is set, output the generic one, otherwise give the one we have set
if(!Unique_Failure_Msg)
name_length = lentext(name)
if(name[name_length] == "s") //plural case, done without much sanitization since I don't know any organ that ends with an "s" that isn't plural at the moment
Unique_Failure_Msg = "<span class='danger'>Subject's [name] are too damaged to function, and needs to be replaced or fixed!</span>"
else
Unique_Failure_Msg = "<span class='danger'>Subject's [name] is too damaged to function, and needs to be replaced or fixed!</span>"
return Unique_Failure_Msg
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
if(!iscarbon(M) || owner == M)
return
@@ -94,8 +83,8 @@
var/healing_amount = -(maxHealth * healing_factor)
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
applyOrganDamage(healing_amount) //FERMI_TWEAK
applyOrganDamage(healing_amount) //to FERMI_TWEAK
/obj/item/organ/examine(mob/user)
. = ..()
if(organ_flags & ORGAN_FAILING)
+1 -4
View File
@@ -25,9 +25,6 @@
if(!(organ_flags & ORGAN_FAILING))
H.dna.species.handle_digestion(H)
handle_disgust(H)
if(Nutri)
if(damage < low_threshold)
return
@@ -44,7 +41,7 @@
H.vomit(damage)
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H)
if(H.disgust)
+1 -2
View File
@@ -10,8 +10,7 @@
var/list/languages_possible
var/say_mod = null
var/taste_sensitivity = 15 // lower is more sensitive.
var/maxHealth = TONGUE_MAX_HEALTH
var/damage = 0
maxHealth = TONGUE_MAX_HEALTH
var/modifies_speech = FALSE
var/static/list/languages_possible_base = typecacheof(list(
/datum/language/common,