Skip to content

Commit

Permalink
Ports some erismed tweaks (#4709)
Browse files Browse the repository at this point in the history
* Ports some erismed tweaks

discordia-space/CEV-Eris#8216

Hooooboy. Full credit to Humonitarian.

Suffice it to say, I did not port the integration with their mutation system(which was blessedly only one line it looks like.)

changelog quote

Makes Erismed 4 significantly more lethal, generally encourages organs to die more often. Adds a lot of helpful defines.

Changes include:

Reduction in the health of most small organs
Creation of defines for such health values
Change to fracture code, so instead of fractures being required before organ damage, the damage is instead directed to the bones until they break
Limb internal organ lists now associate organ with their size for weight-based targeting

* FIXES LINTS MAYBE?

* LINTERS PLEASE.

* Gloves now protect from trash 100%.

Rather than tune back the danger of picking in trash piles, which has been massively magnified by much smaller organ damage(and trash piles doing direct organ damage.) i've instead buffed glove protection to not be a 95% chance. If you're wearing protective gear, it should protect you.

* More tweak.s

Doubles progression time for infections.

Adds some defines for wound progression

Trash piles no longer directly macerate your muscles when scratching you.
  • Loading branch information
cdb-is-not-good authored Oct 30, 2023
1 parent d141764 commit 11e804f
Show file tree
Hide file tree
Showing 56 changed files with 197 additions and 159 deletions.
23 changes: 20 additions & 3 deletions code/__DEFINES/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,22 @@
#define DROPLIMB_EDGE_BURN 3

// INTERNAL ORGANS
#define IORGAN_STANDARD_HEALTH 12
#define IORGAN_SMALL_HEALTH 8
#define IORGAN_VITAL_HEALTH 12 // Heart
#define IORGAN_VITAL_BRUISE 6
#define IORGAN_VITAL_BREAK 8
#define IORGAN_STANDARD_HEALTH 8
#define IORGAN_STANDARD_BRUISE 3
#define IORGAN_STANDARD_BREAK 5
#define IORGAN_SMALL_HEALTH 6
#define IORGAN_SMALL_BRUISE 2
#define IORGAN_SMALL_BREAK 4
#define IORGAN_TINY_HEALTH 4
#define IORGAN_TINY_BRUISE 1
#define IORGAN_TINY_BREAK 2
#define IORGAN_SKELETAL_HEALTH 14
#define IORGAN_MAX_HEALTH 14
#define IORGAN_SKELETAL_BRUISE 4
#define IORGAN_SKELETAL_BREAK 6
#define IORGAN_MAX_HEALTH 14 // Brain

#define IORGAN_KIDNEY_TOX_RATIO 0.25
#define IORGAN_LIVER_TOX_RATIO 0.75
Expand All @@ -155,6 +167,11 @@
#define IWOUND_3_MINUTES 90
#define IWOUND_4_MINUTES 120
#define IWOUND_5_MINUTES 150
#define IWOUND_6_MINUTES 180
#define IWOUND_8_MINUTES 240
#define IWOUND_10_MINUTES 300
#define IWOUND_12_MINUTES 360


// Organ generation
#define ORGAN_HAS_BONES (1<<0)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/hooks-defs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* Debrained hook.
* Called in brain_item.dm when someone gets debrained.
* Parameters: var/obj/item/organ/internal/brain
* Parameters: var/obj/item/organ/internal/vital/brain
*/
/hook/debrain

Expand Down
8 changes: 4 additions & 4 deletions code/datums/autolathe/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

/datum/design/organ/heart
materials = list(MATERIAL_BIOMATTER = 30)
build_path = /obj/item/organ/internal/heart
build_path = /obj/item/organ/internal/vital/heart

/datum/design/organ/lungs
materials = list(MATERIAL_BIOMATTER = 20)
build_path = /obj/item/organ/internal/lungs
build_path = /obj/item/organ/internal/vital/lungs

/datum/design/organ/kidney_left
materials = list()
Expand Down Expand Up @@ -49,12 +49,12 @@
/datum/design/organ/back_alley/ex_lungs
name = "Extended Lungs"
materials = list(MATERIAL_BIOMATTER = 30)
build_path = /obj/item/organ/internal/lungs/long
build_path = /obj/item/organ/internal/vital/lungs/long

/datum/design/organ/back_alley/huge_heart
name = "Huge Heart"
materials = list(MATERIAL_BIOMATTER = 45)
build_path = /obj/item/organ/internal/heart/huge
build_path = /obj/item/organ/internal/vital/heart/huge

/datum/design/organ/back_alley/big_liver
name = "Big Liver"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/repositories/crew/binary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if(H.name in GLOB.ignore_health_alerts_from)
crew_data["muted"] = TRUE
if(!H.isSynthetic())
var/obj/item/organ/internal/heart/O = H.random_organ_by_process(OP_HEART)
var/obj/item/organ/internal/vital/heart/O = H.random_organ_by_process(OP_HEART)
if(O && BP_IS_ORGANIC(O))
var/pulse = H.pulse()
if(pulse == PULSE_NONE || pulse == PULSE_THREADY)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/repositories/crew/vital.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
crew_data["pulse_span"] = "neutral"

if(!H.isSynthetic() && H.should_have_process(OP_HEART))
var/obj/item/organ/internal/heart/O = H.random_organ_by_process(OP_HEART)
var/obj/item/organ/internal/vital/heart/O = H.random_organ_by_process(OP_HEART)
if(O && BP_IS_ORGANIC(O)) // Don't make medical freak out over prosthetic hearts
crew_data["true_pulse"] = H.pulse()
crew_data["pulse"] = H.get_pulse(1)
Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/bioprinter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
var/max_matter = 300
var/loaded_dna //Blood sample for DNA hashing.
var/list/products = list(
OP_HEART = list(/obj/item/organ/internal/heart, 50),
OP_LUNGS = list(/obj/item/organ/internal/lungs, 40),
OP_HEART = list(/obj/item/organ/internal/vital/heart, 50),
OP_LUNGS = list(/obj/item/organ/internal/vital/lungs, 40),
OP_KIDNEYS = list(/obj/item/organ/internal/kidney, 20),
OP_EYES = list(/obj/item/organ/internal/eyes, 30),
OP_LIVER = list(/obj/item/organ/internal/liver, 50),
Expand Down Expand Up @@ -48,8 +48,8 @@
if(SSticker.current_state != GAME_STATE_PLAYING)
stored_matter = 200
products = list(
OP_HEART = list(/obj/item/organ/internal/heart, 50),
OP_LUNGS = list(/obj/item/organ/internal/lungs, 40),
OP_HEART = list(/obj/item/organ/internal/vital/heart, 50),
OP_LUNGS = list(/obj/item/organ/internal/vital/lungs, 40),
OP_KIDNEYS = list(/obj/item/organ/internal/kidney, 20),
OP_EYES = list(/obj/item/organ/internal/eyes, 30),
OP_LIVER = list(/obj/item/organ/internal/liver, 50),
Expand Down Expand Up @@ -124,8 +124,8 @@
stored_matter = 200

products = list(
OP_HEART = list(/obj/item/organ/internal/heart/prosthetic, 50),
OP_LUNGS = list(/obj/item/organ/internal/lungs/prosthetic, 40),
OP_HEART = list(/obj/item/organ/internal/vital/heart/prosthetic, 50),
OP_LUNGS = list(/obj/item/organ/internal/vital/lungs/prosthetic, 40),
OP_KIDNEYS = list(/obj/item/organ/internal/kidney/prosthetic, 20),
OP_EYES = list(/obj/item/organ/internal/eyes/prosthetic, 30),
OP_LIVER = list(/obj/item/organ/internal/liver/prosthetic, 50),
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/devices/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
if(!H.should_have_process(OP_HEART))
return FALSE

var/obj/item/organ/internal/heart/heart = H.random_organ_by_process(OP_HEART)
var/obj/item/organ/internal/vital/heart/heart = H.random_organ_by_process(OP_HEART)
if(!heart)
return TRUE

Expand Down Expand Up @@ -639,7 +639,7 @@

if(!H.should_have_process(BP_BRAIN)) return //no brain

var/obj/item/organ/internal/brain/brain = H.random_organ_by_process(BP_BRAIN)
var/obj/item/organ/internal/vital/brain/brain = H.random_organ_by_process(BP_BRAIN)
if(!brain) return //no brain

var/brain_damage = CLAMP((deadtime - DEFIB_TIME_LOSS)/(DEFIB_TIME_LIMIT - DEFIB_TIME_LOSS)*brain.max_damage, H.getBrainLoss(), brain.max_damage)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/accessories/accessory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
var/sound_strength = "cannot hear"
var/heartbeat = 0
if(M.species && M.species.has_process[OP_HEART])
var/obj/item/organ/internal/heart/heart = M.random_organ_by_process(OP_HEART)
var/obj/item/organ/internal/vital/heart/heart = M.random_organ_by_process(OP_HEART)
if(heart && !BP_IS_ROBOTIC(heart))
heartbeat = 1
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
Expand All @@ -177,7 +177,7 @@
sound_strength = "hear"
sound = "no heartbeat"
if(heartbeat)
var/obj/item/organ/internal/heart/heart = M.random_organ_by_process(OP_HEART)
var/obj/item/organ/internal/vital/heart/heart = M.random_organ_by_process(OP_HEART)
if(!heart)
return
if(heart.is_bruised() || M.getOxyLoss() > 50)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cooking_with_jane/recipes/recipe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@
list(CWJ_ADD_REAGENT, "flour", 15),
list(CWJ_ADD_REAGENT, "milk", 5),
list(CWJ_ADD_REAGENT, "egg", 9),
list(CWJ_ADD_ITEM, /obj/item/organ/internal/brain),
list(CWJ_ADD_ITEM, /obj/item/organ/internal/vital/brain),
list(CWJ_USE_OVEN, J_MED, 30 SECONDS)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/datum/recipe/brainburger
items = list(
/obj/item/reagent_containers/food/snacks/bun,
/obj/item/organ/internal/brain
/obj/item/organ/internal/vital/brain
)
result = /obj/item/reagent_containers/food/snacks/brainburger

Expand Down
4 changes: 2 additions & 2 deletions code/modules/food/recipes_microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ I said no!
/datum/recipe/brainburger
items = list(
/obj/item/reagent_containers/food/snacks/bun,
/obj/item/organ/internal/brain
/obj/item/organ/internal/vital/brain
)
result = /obj/item/reagent_containers/food/snacks/brainburger

Expand Down Expand Up @@ -1261,7 +1261,7 @@ I said no!

/datum/recipe/cake/brain
items = list(
/obj/item/organ/internal/brain,
/obj/item/organ/internal/vital/brain,
/obj/item/reagent_containers/food/snacks/sliceable/butterstick,
)
result = /obj/item/reagent_containers/food/snacks/sliceable/braincake
Expand Down
4 changes: 2 additions & 2 deletions code/modules/genetics/machinery/genetics_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ A holder for items we make with Genetics. Helps add a visceral element to object
/obj/item/organ/internal/blood_vessel/extensive,
/obj/item/organ/internal/blood_vessel/extensive,
/obj/item/organ/internal/liver/big,
/obj/item/organ/internal/lungs/long,
/obj/item/organ/internal/heart/huge)
/obj/item/organ/internal/vital/lungs/long,
/obj/item/organ/internal/vital/heart/huge)
/*
=================Genetics Circuits=================
Circuit boards for different Genetics Machines.
Expand Down
8 changes: 4 additions & 4 deletions code/modules/genetics/mutations/item_makers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,28 @@
name = "Humanoid Heart"
key = "MUTATION_HEART"
desc = "When cloned in an organ sac, produces a beating human heart."
loot = list(/obj/item/organ/internal/heart)
loot = list(/obj/item/organ/internal/vital/heart)

/datum/genetics/mutation/sac_contents/b_heart
name = "Mega Babooon Heart"
key = "MUTATION_B_HEART"
desc = "When cloned in an organ sac, produces the heart of a mega-baboon. Beats with the sound of progress."
loot = list(/obj/item/organ/internal/heart/huge/baboon)
loot = list(/obj/item/organ/internal/vital/heart/huge/baboon)

//Lungs
/datum/genetics/mutation/sac_contents/lungs
name = "Humanoid Lung"
key = "MUTATION_LUNG"
desc = "When cloned in an organ sac, produces a set of lungs."
sac_desc_modifier = "It breathes from an inhuman orifice."
loot = list(/obj/item/organ/internal/lungs)
loot = list(/obj/item/organ/internal/vital/lungs)

/datum/genetics/mutation/sac_contents/g_lungs
name = "Large Lungs"
key = "MUTATION_G_LUNG"
desc = "When cloned in an organ sac, produces abnormally sized lungs."
sac_desc_modifier = "It takes deep breaths from an inhuman orifice."
loot = list(/obj/item/organ/internal/lungs/long)
loot = list(/obj/item/organ/internal/vital/lungs/long)

//Liver
/datum/genetics/mutation/sac_contents/liver
Expand Down
4 changes: 2 additions & 2 deletions code/modules/integrated_electronics/subtpes/input.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@
if(!istype(H)) //Invalid input
return
if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
var/obj/item/organ/internal/brain/brain = H.random_organ_by_process(BP_BRAIN)
var/obj/item/organ/internal/vital/brain/brain = H.random_organ_by_process(BP_BRAIN)
set_pin_data(IC_OUTPUT, 1, (brain && H.stat != DEAD))
set_pin_data(IC_OUTPUT, 2, text2num(H.get_pulse(GETPULSE_TOOL)))
set_pin_data(IC_OUTPUT, 3, (H.stat == 0))
Expand Down Expand Up @@ -1351,7 +1351,7 @@
if(!istype(H)) //Invalid input
return
if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range..
var/obj/item/organ/internal/brain/brain = H.random_organ_by_process(BP_BRAIN)
var/obj/item/organ/internal/vital/brain/brain = H.random_organ_by_process(BP_BRAIN)
set_pin_data(IC_OUTPUT, 1, (brain && H.stat != DEAD))
set_pin_data(IC_OUTPUT, 2, (H.stat == 0))
set_pin_data(IC_OUTPUT, 3, H.getBruteLoss())
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/carbon/brain/MMI.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/item/organ/internal/brain/brainobj = null //The current brain organ.
var/obj/item/organ/internal/vital/brain/brainobj = null //The current brain organ.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.

/obj/item/device/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/organ/internal/brain) && !brainmob) //Time to stick a brain in it --NEO
if(istype(O,/obj/item/organ/internal/vital/brain) && !brainmob) //Time to stick a brain in it --NEO

var/obj/item/organ/internal/brain/B = O
var/obj/item/organ/internal/vital/brain/B = O
if(B.health <= 0)
to_chat(user, "\red That brain is well and truly dead.")
return
Expand Down Expand Up @@ -88,7 +88,7 @@
to_chat(user, "\red You upend the MMI, but the brain is clamped into place.")
else
to_chat(user, "\blue You upend the MMI, spilling the brain onto the floor.")
var/obj/item/organ/internal/brain/brain
var/obj/item/organ/internal/vital/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = user.loc
brain = brainobj
Expand Down
Loading

0 comments on commit 11e804f

Please sign in to comment.