diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 16577429b8..cfbd8be32c 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -97,6 +97,9 @@ BRAIN:[M.getOrganLoss(ORGAN_SLOT_BRAIN)] STAMINA:[M.getStaminaLoss()] AROUSAL:[M.getArousalLoss()] + "} + if(GLOB.Debug2) + atomsnowflake += {" HEART:[M.getOrganLoss(ORGAN_SLOT_HEART)] LIVER:[M.getOrganLoss(ORGAN_SLOT_LIVER)] LUNGS:[M.getOrganLoss(ORGAN_SLOT_LUNGS)] @@ -105,7 +108,9 @@ STOMACH:[M.getOrganLoss(ORGAN_SLOT_STOMACH)] TONGUE:[M.getOrganLoss(ORGAN_SLOT_TONGUE)] APPENDIX:[M.getOrganLoss(ORGAN_SLOT_APPENDIX)] - + "} + atomsnowflake += {" + "} else atomsnowflake += "[D]" diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 61273d181d..558639640a 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -550,6 +550,10 @@ if (multiplier == 0) fermiEnd() return + for(var/P in C.required_catalysts) + if(!has_reagent(P)) + fermiEnd() + return for(var/P in cached_results) targetVol = cached_results[P]*multiplier @@ -676,7 +680,7 @@ STOP_PROCESSING(SSprocessing, src) return 0 - C.FermiCreate(src)//proc that calls when step is done + C.FermiCreate(src, addChemAmmount, purity)//proc that calls when step is done //Apply pH changes and thermal output of reaction to beaker chem_temp = round(cached_temp + (C.ThermicConstant * addChemAmmount)) diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 59865dd1da..2c75fc8827 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -68,6 +68,41 @@ results = list("synthflesh" = 3) required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) +/datum/chemical_reaction/synthtissue + name = "Synthtissue" + id = "synthtissue" + results = list("synthtissue" = 0.05) + required_reagents = list("synthflesh" = 0.01) + required_catalysts = list("nutriment" = 0.1) + //FermiChem vars: + OptimalTempMin = 305 // Lower area of bell curve for determining heat based rate reactions + OptimalTempMax = 315 // Upper end for above + ExplodeTemp = 1050 // Temperature at which reaction explodes + OptimalpHMin = 9 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + OptimalpHMax = 9.5 // Higest value for above + ReactpHLim = 2 // How far out pH wil react, giving impurity place (Exponential phase) + CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst) + CurveSharpT = 2.5 // How sharp the temperature exponential curve is (to the power of value) + CurveSharppH = 2.5 // How sharp the pH exponential curve is (to the power of value) + ThermicConstant = 0.01 // Temperature change per 1u produced + HIonRelease = 0.01 // pH change per 1u reaction (inverse for some reason) + RateUpLim = 0.02 // Optimal/max rate possible if all conditions are perfect + FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics + PurityMin = 0 + +/datum/chemical_reaction/synthtissue/FermiCreate(datum/reagents/holder, added_volume, added_purity) + var/datum/reagent/St = holder.has_reagent("synthtissue") + var/datum/reagent/N = holder.has_reagent("nutriment") + if(!St) + return + if(holder.chem_temp > 320) + var/temp_ratio = 1-(330 - holder.chem_temp)/10 + holder.remove_reagent(src.id, added_volume*temp_ratio) + if(St.purity < 1) + St.volume *= St.purity + St.purity = 1 + N.volume -= 0.002 + /datum/chemical_reaction/styptic_powder name = "Styptic Powder" id = "styptic_powder" diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index e53723425d..34fcc86a10 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -30,19 +30,25 @@ /obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) -/obj/item/organ/tongue/onDamage(damage_mod) - if (maxHealth == "alien") - return +/obj/item/organ/tongue/applyOrganDamage(var/d, var/maximum = maxHealth) if (maxHealth == "bone") + if(owner) + return var/target = owner.get_bodypart(BODY_ZONE_HEAD) - owner.apply_damage(damage_mod, BURN, target) - to_chat(owner, "The drink burns your skull! Oof, your bones!") - return - if(damage+damage_mod < 0) - damage = 0 + owner.apply_damage(d, BURN, target) + to_chat(owner, "You feel your skull burning! Oof, your bones!") return - damage += damage_mod + if(!d) //Micro-optimization. + return + if(maximum < damage) + return + damage = CLAMP(damage + d, 0, maximum) + var/mess = check_damage_thresholds(owner) + prev_damage = damage + if(mess && owner) + to_chat(owner, mess) + if ((damage / maxHealth) > 1) to_chat(owner, "Your tongue is singed beyond recognition, and disintegrates!") SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi") @@ -167,7 +173,7 @@ icon_state = "tonguexeno" say_mod = "hisses" taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED - maxHealth = "alien" //Their blood is acid, so, no, though a tongueless xeno might be funny + maxHealth = 500 //They've a little mouth for a tongue, so it's pretty rhobust modifies_speech = TRUE // not really, they just hiss var/static/list/languages_possible_alien = typecacheof(list( /datum/language/xenocommon, diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm index 9a5a2a9247..5a8d74d30b 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm @@ -95,12 +95,13 @@ ..() -/datum/reagent/fermi/synthtissue +/datum/reagent/synthtissue name = "Synthtissue" id = "synthtissue" description = "Synthetic tissue used for grafting onto damaged organs during surgery, or for treating limb damage." + pH = 7.6 -/datum/reagent/fermi/synthtissue/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) +/datum/reagent/synthtissue/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) if(iscarbon(M)) var/target = M.zone_selected if (M.stat == DEAD) @@ -112,3 +113,5 @@ to_chat(M, "You feel your damaged [target] heal! It stings like hell!") SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) ..() + +//NEEDS ON_MOB_DEAD() diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index d993322fcb..78765434b2 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -2,7 +2,7 @@ mix_sound = 'sound/effects/bubbles.ogg' //Called for every reaction step -/datum/chemical_reaction/proc/FermiCreate(holder) +/datum/chemical_reaction/proc/FermiCreate(datum/reagents) return //Called when reaction STOP_PROCESSING