The Organ Tree | New Exotic Seed (#89310)

## About The Pull Request
99% of all code was stolen completely from @MrMelbert, like I spent more
time waiting for the plant to grow for the video than actually
contributing to this

Adds a new tree mutation to the shrub (from exo crate)
It has a High Complexity Gene, which halves the harvest and blocks
pollination benefits. It produces podperson organs and limbs. Limbs are
twice as likely to drop as organs (because there's a lot more organs).
It can also drop plant meat.


https://github.com/user-attachments/assets/88bb89dd-4cd7-4bc9-ac2f-f4c67a5ea9ff

(Yes the sprite is mine please don't bully Melbert for it)

Podpeople now also have their own set of organs, which are mostly just
standard organs but colored green.

## Why It's Good For The Game
Gives us another source of organs and limbs besides the limb grower,
exosuit fab and medical protolathe. Those only produce organic and
robotic organs and limbs, but now we can also produce plant organ and
limbs! (Without committing horrible crimes). This also synergizes well
with #89306 , which makes it so plant bodyparts have actual unique
benefits (more than just a fashion statement).

## Changelog
🆑 MrMelbert, Time-Green
add: Adds an organ tree as a mutation of shrubs (from the exotic seeds
crate)! Spare organs have never been so green!
/🆑

---------

Co-authored-by: MrMelbert <kmelbert4@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
Time-Green
2025-02-19 05:46:06 +01:00
committed by Roxy
parent 8122f6427c
commit 52d2250fa2
17 changed files with 154 additions and 1 deletions

View File

@@ -51,6 +51,8 @@
/// -- Flags for traits. --
/// Caps the plant's yield at 5 instead of 10.
#define TRAIT_HALVES_YIELD (1<<0)
/// Doesn't get bonuses from tray yieldmod
#define TRAIT_NO_POLLINATION (1<<1)
/// -- Trait IDs. Plants that match IDs cannot be added to the same plant. --
/// Plants that glow.

View File

@@ -98,6 +98,9 @@ DEFINE_BITFIELD(foodtypes, list(
"Bloody", /* SKYRAT EDIT - Hemophage Food */ \
)
/// Food types assigned to all podperson organs
#define PODPERSON_ORGAN_FOODTYPES (VEGETABLES | RAW | GORE)
#define DRINK_REVOLTING 1
#define DRINK_NICE 2
#define DRINK_GOOD 3

View File

@@ -13,6 +13,7 @@
instability = 10
growthstages = 3
reagents_add = list()
mutatelist = list(/obj/item/seeds/organ_tree)
/obj/item/grown/shrub
seed = /obj/item/seeds/shrub
@@ -58,3 +59,62 @@
*/
/obj/structure/hedge/opaque
opacity = TRUE
/obj/item/seeds/organ_tree
name = "organ tree seed pack"
desc = "These seeds grow into an organ tree."
icon_state = "seed-organ"
species = "organ"
plantname = "Organ Tree"
product = null // handled snowflake
lifespan = 10 // organs rot fast
maturation = 5
production = 15 // organ growing takes a while
endurance = 50
yield = 1
instability = 2
growthstages = 3
genes = list(/datum/plant_gene/trait/complex_harvest)
/obj/item/seeds/organ_tree/harvest(mob/user)
var/yield_amount = getYield()
var/obj/machinery/hydroponics/parent = loc
if(yield_amount <= 0)
parent.update_tray(user, yield_amount)
return list()
var/list/possible_organs = list(
/obj/item/bodypart/arm/left/pod = 2,
/obj/item/bodypart/arm/right/pod = 2,
/obj/item/bodypart/leg/left/pod = 2,
/obj/item/bodypart/leg/right/pod = 2,
/obj/item/food/meat/slab/human/mutant/plant = 3,
/obj/item/organ/appendix/pod = 1,
/obj/item/organ/brain/pod = 1,
/obj/item/organ/ears/pod = 1,
/obj/item/organ/eyes/pod = 1,
/obj/item/organ/heart/pod = 1,
/obj/item/organ/liver/pod = 1,
/obj/item/organ/lungs/pod = 1,
/obj/item/organ/stomach/pod = 1,
/obj/item/organ/tongue/pod = 1,
)
var/list/created = list()
var/atom/drop_at = user.Adjacent(loc) ? user.drop_location() : drop_location()
for(var/i in 1 to yield)
var/organ = pick_weight(possible_organs)
if(prob(66)) // 66% chance to reduce the chance to 0 so we get less duplicates
possible_organs[organ] = 0
var/obj/item/spawned = new organ(drop_at)
if(isbodypart(spawned))
var/obj/item/bodypart/bodypart_spawned = spawned
bodypart_spawned.species_color = COLOR_GREEN
bodypart_spawned.update_icon_dropped()
qdel(spawned.GetComponent(/datum/component/decomposition))
qdel(spawned.GetComponent(/datum/component/germ_sensitive))
created += spawned
parent.update_tray(user, yield_amount)
return created

View File

@@ -198,6 +198,10 @@
/obj/item/seeds/proc/getYield()
var/return_yield = yield
for(var/datum/plant_gene/trait/trait in genes)
if(trait.trait_flags & TRAIT_NO_POLLINATION)
return return_yield
var/obj/machinery/hydroponics/parent = loc
if(istype(loc, /obj/machinery/hydroponics))
if(parent.yieldmod == 0)

View File

@@ -680,6 +680,14 @@
stank.temperature = T20C // without this the room would eventually freeze and miasma mining would be easier
tray_turf.assume_air(stank)
/// Hard caps the yield at 5 (effectively)
/datum/plant_gene/trait/complex_harvest
name = "Complex Harvest"
description = "Halves the maximum yield of the plant, and prevents it from benefiting from pollination's yield bonus."
icon = FA_ICON_SLASH
trait_flags = TRAIT_HALVES_YIELD|TRAIT_NO_POLLINATION
mutability_flags = NONE
/// Starthistle's essential invasive spreading
/datum/plant_gene/trait/invasive/galaxythistle
mutability_flags = PLANT_GENE_GRAFTABLE

View File

@@ -639,3 +639,9 @@
old_brain.Remove(new_owner, special = TRUE, movement_flags = NO_ID_TRANSFER)
qdel(old_brain)
return Insert(new_owner, special = TRUE, movement_flags = NO_ID_TRANSFER | DELETE_IF_REPLACED)
/obj/item/organ/brain/pod
name = "pod nucleus"
desc = "The brain of a pod person, it's a bit more plant-like than a human brain."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME

View File

@@ -19,7 +19,17 @@
exotic_blood = /datum/reagent/water
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_language_holder = /datum/language_holder/plant
mutantappendix = /obj/item/organ/appendix/pod
mutantbrain = /obj/item/organ/brain/pod
mutantears = /obj/item/organ/ears/pod
mutanteyes = /obj/item/organ/eyes/pod
mutantheart = /obj/item/organ/heart/pod
mutantliver = /obj/item/organ/liver/pod
mutantlungs = /obj/item/organ/lungs/pod
mutantstomach = /obj/item/organ/stomach/pod
mutanttongue = /obj/item/organ/tongue/pod
bodypart_overrides = list(
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/pod,
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/pod,

View File

@@ -92,5 +92,19 @@
return conditional_tooltip("<font color='#ff9933'>Inflamed</font>", "Remove surgically.", add_tooltips)
return ..()
/obj/item/organ/appendix/pod
name = "pod thingy"
desc = "Strangest salad you've ever seen."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME
/obj/item/organ/appendix/pod/Initialize(mapload)
. = ..()
// this could be anything... anything. still useless though
name = pick("pod endoplasmic reticulum", "pod golgi apparatus", "pod plastid", "pod vesicle")
/obj/item/organ/appendix/pod/become_inflamed()
return
#undef APPENDICITIS_PROB
#undef INFLAMATION_ADVANCEMENT_PROB

View File

@@ -260,3 +260,9 @@
if(. & EMP_PROTECT_SELF)
return
apply_organ_damage(20 / severity)
/obj/item/organ/ears/pod
name = "pod ears"
desc = "Strangest salad you've ever seen."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME

View File

@@ -1057,3 +1057,8 @@
/obj/item/organ/eyes/night_vision/maintenance_adapted/on_mob_remove(mob/living/carbon/unadapted, special = FALSE, movement_flags)
REMOVE_TRAIT(unadapted, TRAIT_UNNATURAL_RED_GLOWY_EYES, ORGAN_TRAIT)
return ..()
/obj/item/organ/eyes/pod
name = "pod eyes"
desc = "Strangest salad you've ever seen."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES

View File

@@ -302,3 +302,9 @@
owner.heal_overall_damage(brute = 15, burn = 15, required_bodytype = BODYTYPE_ORGANIC)
if(owner.reagents.get_reagent_amount(/datum/reagent/medicine/ephedrine) < 20)
owner.reagents.add_reagent(/datum/reagent/medicine/ephedrine, 10)
/obj/item/organ/heart/pod
name = "pod mitochondria"
desc = "This plant-like organ is the powerhouse of the podperson." // deliberate wording here
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME

View File

@@ -273,6 +273,21 @@
. = ..()
AddElement(/datum/element/dangerous_organ_removal, /*surgical = */ TRUE)
/obj/item/organ/liver/pod
name = "pod peroxisome"
desc = "A small plant-like organ found in podpeople responsible for filtering toxins while aiding in photosynthesis."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME
/obj/item/organ/liver/pod/handle_chemical(mob/living/carbon/organ_owner, datum/reagent/chem, seconds_per_tick, times_fired)
. = ..()
if(. & COMSIG_MOB_STOP_REAGENT_CHECK)
return
if(!(organ_owner.mob_biotypes & MOB_PLANT))
return
if(chem.type == /datum/reagent/toxin/plantbgone)
organ_owner.adjustToxLoss(3 * REM * seconds_per_tick)
#undef LIVER_DEFAULT_TOX_TOLERANCE
//#undef LIVER_DEFAULT_TOX_RESISTANCE // SKYRAT EDIT REMOVAL - Needed in modular
#undef LIVER_FAILURE_STAGE_SECONDS

View File

@@ -876,7 +876,7 @@
healing_factor = SMOKER_LUNG_HEALING
/obj/item/organ/lungs/slime
name = "vacuole"
name = "slime vacuole"
desc = "A large organelle designed to store oxygen and other important gasses."
safe_plasma_max = 0 //We breathe this to gain POWER.
@@ -1043,6 +1043,12 @@
breath_out.gases[/datum/gas/hydrogen][MOLES] += gas_breathed * 2
/obj/item/organ/lungs/pod
name = "pod vacuole"
desc = "A large organelle designed to store oxygen and other important gasses."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME
#undef BREATH_RELATIONSHIP_INITIAL_GAS
#undef BREATH_RELATIONSHIP_CONVERT
#undef BREATH_RELATIONSHIP_MULTIPLIER

View File

@@ -326,4 +326,10 @@
. = ..()
AddElement(/datum/element/dangerous_organ_removal, /*surgical = */ TRUE)
/obj/item/organ/stomach/pod
name = "pod chloroplast"
desc = "A green plant-like organ that functions similarly to a human stomach."
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME
#undef STOMACH_METABOLISM_CONSTANT

View File

@@ -666,6 +666,8 @@ GLOBAL_LIST_INIT(english_to_zombie, list())
say_mod = "whistles"
liked_foodtypes = VEGETABLES | FRUIT | GRAIN
disliked_foodtypes = GORE | MEAT | DAIRY | SEAFOOD | BUGS
foodtype_flags = PODPERSON_ORGAN_FOODTYPES
color = COLOR_LIME
/obj/item/organ/tongue/golem
name = "golem tongue"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB