Merge branch 'release' of https://github.com/VOREStation/VOREStation into voreupdate

This commit is contained in:
izac112
2024-12-28 14:43:02 +01:00
964 changed files with 15598 additions and 12083 deletions
+14 -14
View File
@@ -35,17 +35,17 @@ var/const/CE_STABLE_THRESHOLD = 0.5
return
if(!amt)
vessel.add_reagent("blood",species.blood_volume)
vessel.add_reagent(REAGENT_ID_BLOOD,species.blood_volume)
else
vessel.add_reagent("blood", clamp(amt, 1, species.blood_volume))
vessel.add_reagent(REAGENT_ID_BLOOD, clamp(amt, 1, species.blood_volume))
//Resets blood data
/mob/living/carbon/human/proc/fixblood()
for(var/datum/reagent/blood/B in vessel.reagent_list)
if(B.id == "blood")
if(B.id == REAGENT_ID_BLOOD)
B.data = list( "donor"=src,"viruses"=null,"species"=species.name,"blood_DNA"=dna.unique_enzymes,"blood_colour"= species.get_blood_colour(src),"blood_type"=dna.b_type, \
"resistances"=null,"trace_chem"=null, "virus2" = null, "antibodies" = list(), "blood_name" = species.get_blood_name(src))
"resistances"=null,"trace_chem"=null, "virus2" = null, REAGENT_ID_ANTIBODIES = list(), "blood_name" = species.get_blood_name(src))
if(isSynthetic())
B.data["species"] = "synthetic"
@@ -63,7 +63,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
if(stat != DEAD && bodytemperature >= 170) //Dead or cryosleep people do not pump the blood.
var/blood_volume_raw = vessel.get_reagent_amount("blood")
var/blood_volume_raw = vessel.get_reagent_amount(REAGENT_ID_BLOOD)
var/blood_volume = round((blood_volume_raw/species.blood_volume)*100) // Percentage.
//Blood regeneration if there is some space
@@ -222,14 +222,14 @@ var/const/CE_STABLE_THRESHOLD = 0.5
if(!amt)
return 0
var/current_blood = vessel.get_reagent_amount("blood")
var/current_blood = vessel.get_reagent_amount(REAGENT_ID_BLOOD)
if(current_blood < BLOOD_MINIMUM_STOP_PROCESS)
return 0 //We stop processing under 3 units of blood because apparently weird shit can make it overflowrandomly.
if(amt > current_blood)
amt = current_blood - 2 // Bit of a safety net; it's impossible to add blood if there's not blood already in the vessel.
return vessel.remove_reagent("blood",amt)
return vessel.remove_reagent(REAGENT_ID_BLOOD,amt)
/****************************************************
BLOOD TRANSFERS
@@ -281,7 +281,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
if(!should_have_organ(O_HEART))
return null
if(vessel.get_reagent_amount("blood") < max(amount, BLOOD_MINIMUM_STOP_PROCESS))
if(vessel.get_reagent_amount(REAGENT_ID_BLOOD) < max(amount, BLOOD_MINIMUM_STOP_PROCESS))
return null
. = ..()
@@ -299,8 +299,8 @@ var/const/CE_STABLE_THRESHOLD = 0.5
ContractDisease(D)
if (injected.data["resistances"] && prob(5))
antibodies |= injected.data["resistances"]
if (injected.data["antibodies"] && prob(5))
antibodies |= injected.data["antibodies"]
if (injected.data[REAGENT_ID_ANTIBODIES] && prob(5))
antibodies |= injected.data[REAGENT_ID_ANTIBODIES]
var/list/chems = list()
chems = params2list(injected.data["trace_chem"])
for(var/C in chems)
@@ -311,7 +311,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
/mob/living/carbon/human/inject_blood(var/datum/reagent/blood/injected, var/amount)
if(!should_have_organ(O_HEART))
reagents.add_reagent("blood", amount, injected.data)
reagents.add_reagent(REAGENT_ID_BLOOD, amount, injected.data)
reagents.update_total()
return
@@ -329,7 +329,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
log_debug("Failed to re-initialize blood datums on [src]!")
return
if(vessel.total_volume < species.blood_volume)
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
vessel.add_reagent(REAGENT_ID_BLOOD, species.blood_volume - vessel.total_volume)
else if(vessel.total_volume > species.blood_volume)
vessel.maximum_volume = species.blood_volume
fixblood()
@@ -340,10 +340,10 @@ var/const/CE_STABLE_THRESHOLD = 0.5
if(blood_incompatible(injected.data["blood_type"],our.data["blood_type"],injected.data["species"],our.data["species"]) )
reagents.add_reagent("toxin",amount * 0.5)
reagents.add_reagent(REAGENT_ID_TOXIN,amount * 0.5)
reagents.update_total()
else
vessel.add_reagent("blood", amount, injected.data)
vessel.add_reagent(REAGENT_ID_BLOOD, amount, injected.data)
vessel.update_total()
..()
+2 -4
View File
@@ -7,10 +7,8 @@
var/inflame_progress = 0
/mob/living/carbon/human/proc/appendicitis()
if(stat == DEAD)
return 0
ForceContractDisease(new /datum/disease/appendicitis)
return 0
return ForceContractDisease(new /datum/disease/appendicitis)
/*
/obj/item/organ/internal/appendix/process()
..()
+1 -1
View File
@@ -284,7 +284,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
name = "Promethean Revival"
id = "prom_revival"
result = null
required_reagents = list("phoron" = 40)
required_reagents = list(REAGENT_ID_PHORON = 40)
result_amount = 1
/decl/chemical_reaction/instant/promethean_brain_revival/can_happen(var/datum/reagents/holder)
+2 -2
View File
@@ -11,7 +11,7 @@
if(owner.life_tick % PROCESS_ACCURACY == 0)
//High toxins levels are dangerous
if(owner.getToxLoss() >= 50 && !owner.reagents.has_reagent("anti_toxin"))
if(owner.getToxLoss() >= 50 && !owner.reagents.has_reagent(REAGENT_ID_ANTITOXIN))
//Healthy liver suffers on its own
if (src.damage < min_broken_damage)
src.damage += 0.2 * PROCESS_ACCURACY
@@ -22,7 +22,7 @@
O.damage += 0.2 * PROCESS_ACCURACY
//Detox can heal small amounts of damage
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin"))
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent(REAGENT_ID_ANTITOXIN))
src.damage -= 0.2 * PROCESS_ACCURACY
if(src.damage < 0)
+2 -2
View File
@@ -15,7 +15,7 @@
if(owner.life_tick % spleen_tick == 0)
//High toxins levels are dangerous
if(owner.getToxLoss() >= 30 && !owner.reagents.has_reagent("anti_toxin"))
if(owner.getToxLoss() >= 30 && !owner.reagents.has_reagent(REAGENT_ID_ANTITOXIN))
//Healthy liver suffers on its own
if (src.damage < min_broken_damage)
src.damage += 0.2 * spleen_tick
@@ -34,7 +34,7 @@
B.adjust_germ_level(round(rand(-3 * spleen_efficiency, -10 * spleen_efficiency)))
//Detox can heal small amounts of damage
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin"))
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent(REAGENT_ID_ANTITOXIN))
src.damage -= 0.2 * spleen_tick * spleen_efficiency
if(src.damage < 0)
+3 -3
View File
@@ -6,7 +6,7 @@
unacidable = TRUE // Don't melt when holding your acid, dangit.
var/acidtype = "stomacid" // Incase you want some stomach organ with, say, polyacid instead, or sulphuric.
var/acidtype = REAGENT_ID_STOMACID // Incase you want some stomach organ with, say, polyacid instead, or sulphuric.
var/max_acid_volume = 30
var/deadly_hold = TRUE // Does the stomach do damage to mobs eaten by its owner? Xenos should probably have this FALSE.
@@ -47,7 +47,7 @@
/obj/item/organ/internal/stomach/xeno
color = "#555555"
acidtype = "pacid"
acidtype = REAGENT_ID_PACID
/obj/item/organ/internal/stomach/machine
name = "reagent cycler"
@@ -56,7 +56,7 @@
robotic = ORGAN_ROBOT
acidtype = "sacid"
acidtype = REAGENT_ID_SACID
organ_verbs = list(/mob/living/carbon/human/proc/reagent_purge) //VOREStation Add
+2 -2
View File
@@ -11,7 +11,7 @@
/obj/item/organ/internal/borer/process()
// Borer husks regenerate health, feel no pain, and are resistant to stuns and brainloss.
for(var/chem in list("tricordrazine","tramadol","hyperzine","alkysine"))
for(var/chem in list(REAGENT_ID_TRICORDRAZINE,REAGENT_ID_TRAMADOL,REAGENT_ID_HYPERZINE,REAGENT_ID_ALKYSINE))
if(owner.reagents.get_reagent_amount(chem) < 3)
owner.reagents.add_reagent(chem, 5)
@@ -59,4 +59,4 @@
/obj/item/organ/internal/stack/vox/stack
name = "vox cortical stack"
icon_state = "cortical_stack"
icon_state = "cortical_stack"
+2 -2
View File
@@ -177,7 +177,7 @@ var/list/organ_cache = list()
if(!owner && reagents)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
if(B && prob(40) && !isbelly(loc)) //VOREStation Edit
reagents.remove_reagent("blood",0.1)
reagents.remove_reagent(REAGENT_ID_BLOOD,0.1)
blood_splatter(src,B,1)
if(CONFIG_GET(flag/organs_decay) && decays) damage += rand(1,3)
if(damage >= max_damage)
@@ -275,7 +275,7 @@ var/list/organ_cache = list()
adjust_germ_level(rand(2,3))
if(501 to INFINITY)
adjust_germ_level(rand(3,5))
owner.reagents.add_reagent("toxin", rand(1,2))
owner.reagents.add_reagent(REAGENT_ID_TOXIN, rand(1,2))
/obj/item/organ/proc/receive_chem(chemical as obj)
return 0
+49 -15
View File
@@ -3,9 +3,15 @@
****************************************************/
//These control the damage thresholds for the various ways of removing limbs
#define DROPLIMB_THRESHOLD_EDGE 5
#define DROPLIMB_THRESHOLD_TEAROFF 2
#define DROPLIMB_THRESHOLD_DESTROY 1
/// <summary>
/// Arms and legs have 80 damage, which is a good baseline to go off of.
/// The droplimb_threshold is "Divide the limb's max health by this number"
/// That is the damage required (in ONE hit) to tear off or destroy a limb.
/// If the damage dealt per hit is below that, it can NOT remove limbs.
/// </summary>
#define DROPLIMB_THRESHOLD_EDGE 8 //For limb of 80(arm/leg) requires 10 or more damage to cut off.
#define DROPLIMB_THRESHOLD_TEAROFF 3 //Requires 26.66 or more damage to cut off an arm/leg with a blunt object. Lower than the
#define DROPLIMB_THRESHOLD_DESTROY 3.34 //Requires 24 damage or more to DESTROY a arm/leg with a blunt object. Blunt is going to DESTROY over just knocking something off!
/obj/item/organ/external
name = "external"
@@ -359,13 +365,24 @@
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner && !is_stump())
if(!cannot_amputate && CONFIG_GET(flag/limbs_can_break) && (brute_dam + burn_dam) >= (max_damage * CONFIG_GET(number/organ_health_multiplier)))
/// <summary>
/// This determines if the limb is ELIGIBLE to be chopped off or not.
/// It checks if it's amputatable, if the config setting is set, then continues down the proc.
/// </summary>
if(!cannot_amputate && CONFIG_GET(flag/limbs_can_break))
//organs can come off in three cases
//1. If the damage source is edge_eligible and the brute damage dealt exceeds the edge threshold, then the organ is cut off.
//2. If the damage amount dealt exceeds the disintegrate threshold, the organ is completely obliterated.
//3. If the organ has already reached or would be put over it's max damage amount (currently redundant),
// and the brute damage dealt exceeds the tearoff threshold, the organ is torn off.
// Let's calculate how INJURED our limb is. Determines the chance the next attack will take our limb off!
var/damage_factor = ((max_damage*CONFIG_GET(number/organ_health_multiplier))/(brute_dam + burn_dam))*100
// Max_damage of 80 and brute_dam of 80? Factor = 100
// Max_damage of 80 and brute_dam of 40? Factor = 50
// Max_damage of 80 and brute_dam of 5? Factor = 5
// This lowers our chances of having our limb removed when it has less damage. The more damaged the limb, the higher the chance it falls off!
//Check edge eligibility
var/edge_eligible = 0
if(edge)
@@ -376,22 +393,39 @@
else
edge_eligible = 1
//VOREStation Add
if(nonsolid && damage >= max_damage)
droplimb(TRUE, DROPLIMB_EDGE)
else if (robotic >= ORGAN_NANOFORM && damage >= max_damage)
droplimb(TRUE, DROPLIMB_BURN)
//VOREStation Add End
//VOREStation Edit - We have special droplimb handling for prom/proteans
else if(edge_eligible && brute >= max_damage / DROPLIMB_THRESHOLD_EDGE && prob(brute))
//Math:
//Edge w/ 10 damage on an 80 hp limb. First hit: Prob(10) && Prob(12.5) = 1.25% Second hit: Prob(10) && Prob(25) = 2.5, etc up to 10.
//Edge w/ 20 damage on an 80 hp limb. First hit: Prob(20) && Prob(25)= 5% Second hit: Prob(20) && Prob(50)=10%, etc up to max 20.
else if(edge_eligible && brute >= max_damage / DROPLIMB_THRESHOLD_EDGE && prob(brute) && prob(damage_factor))
droplimb(0, DROPLIMB_EDGE)
else if((burn >= max_damage / DROPLIMB_THRESHOLD_DESTROY) && prob(burn*0.33))
//Math:
//Burn w/ 25dmg on an 80 hp limb. First hit: Prob(18.75) && Prob(31.25) = ~6% Second Hit: Prob(18.75) && Prob (62.5) =~12, etc up to 18.75
//Burn w/ 25dmg on a 50 hp limb. First hit: Prob(18.75) && Prob(50) = ~9% Second hit: 18.75%
else if((burn >= max_damage / DROPLIMB_THRESHOLD_DESTROY) && prob(burn*0.75) && prob(damage_factor))
droplimb(0, DROPLIMB_BURN)
else if((brute >= max_damage / DROPLIMB_THRESHOLD_DESTROY && prob(brute)))
//Brute it special. It gets both a chance to destroy AND a chance to knock a limb off!
//Math:
//Brute w/ 25dmg on an 80 hp limb. First hit: Prob(25) && Prob (31.25) = ~8% Second Hit: ~16% etc up to 25%
//Brute w/ 25dmg on a 50 hp limb. First hit: Prob(25) && Prob (50) = 12.5 Second hit: 25%
else if((brute >= max_damage / DROPLIMB_THRESHOLD_DESTROY && prob(brute)) && prob(damage_factor))
droplimb(0, DROPLIMB_BLUNT)
//VOREStation Edit End
else if(brute >= max_damage / DROPLIMB_THRESHOLD_TEAROFF && prob(brute*0.33))
//This is where brute gets it SECOND chance to affect the limb! Much lower probability.
//This means you can add this to the above to get brute damage's TRUE drop chance IF the damage is high enough to hit BOTH the DROPLIMB_THRESHOLD_DESTROY & the DROPLIMB_THRESHOLD_TEAROFF
//Ex: If it hits
//Math:
//Brute w/ 25dmg on an 80 hp limb. First hit: Prob(8.25) && Prob(31.25) = ~2.6% Second Hit: Prob(8.25) && Prob(62.5) = 5%. (This can't ACTUALLY happen with 25 damage with the current numbers, but it's an example to keep it similar to the above.)
//Brute w/ 25dmg on a 50 hp limb. First hit: Prob(8.25) && Prob (50) = ~4% Second hit: 8.25%
else if(brute >= max_damage / DROPLIMB_THRESHOLD_TEAROFF && prob(brute*0.33) && prob(damage_factor))
droplimb(0, DROPLIMB_EDGE)
else if(spread_dam && owner && parent && (brute_overflow || burn_overflow) && (brute_overflow >= 5 || burn_overflow >= 5) && !permutation) //No infinite damage loops.
var/brute_third = brute_overflow * 0.33
var/burn_third = burn_overflow * 0.33
@@ -757,9 +791,9 @@ Note that amputating the affected organ does in fact remove the infection from t
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && owner.bodytemperature >= 170)
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline")
var/myeldose = owner.reagents.get_reagent_amount("myelamine")
var/bicardose = owner.reagents.get_reagent_amount(REAGENT_ID_BICARIDINE)
var/inaprovaline = owner.reagents.get_reagent_amount(REAGENT_ID_INAPROVALINE)
var/myeldose = owner.reagents.get_reagent_amount(REAGENT_ID_MYELAMINE)
if(!(W.can_autoheal() || (bicardose && inaprovaline) || myeldose)) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing
W.open_wound(0.1 * wound_update_accuracy)
+1 -1
View File
@@ -3,7 +3,7 @@
return 0
//This is a terrible hack and I should be ashamed.
var/datum/seed/diona = SSplants.seeds["diona"]
var/datum/seed/diona = SSplants.seeds[PLANT_DIONA]
if(!diona)
return 0
+2 -2
View File
@@ -59,10 +59,10 @@
var/modifier = 1 - 0.5 * is_bruised()
if(owner.bloodstr.has_reagent("phoron"))
if(owner.bloodstr.has_reagent(REAGENT_ID_PHORON))
adjust_plasma(round(4 * modifier))
if(owner.ingested.has_reagent("phoron"))
if(owner.ingested.has_reagent(REAGENT_ID_PHORON))
adjust_plasma(round(2 * modifier))
adjust_plasma(2) //Make it a decent amount so people can actually build stuff without stealing all of medbays phoron
+2 -2
View File
@@ -39,10 +39,10 @@
var/modifier = 1 - 0.5 * is_bruised()
if(owner.bloodstr.has_reagent("phoron"))
if(owner.bloodstr.has_reagent(REAGENT_ID_PHORON))
adjust_plasma(round(4 * modifier))
if(owner.ingested.has_reagent("phoron"))
if(owner.ingested.has_reagent(REAGENT_ID_PHORON))
adjust_plasma(round(2 * modifier))
adjust_plasma(1)