diff --git a/code/__DEFINES/botany.dm b/code/__DEFINES/botany.dm index 9607819c880..6ceafd88ef0 100644 --- a/code/__DEFINES/botany.dm +++ b/code/__DEFINES/botany.dm @@ -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. diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index b7e5b38482d..45ca6b94fc4 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -94,6 +94,9 @@ DEFINE_BITFIELD(foodtypes, list( "Rocks", \ ) +/// 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 diff --git a/code/modules/hydroponics/grown/hedges.dm b/code/modules/hydroponics/grown/hedges.dm index d02949bfd98..b86baac13e5 100644 --- a/code/modules/hydroponics/grown/hedges.dm +++ b/code/modules/hydroponics/grown/hedges.dm @@ -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 diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 22434788e99..d728c7479a9 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -186,6 +186,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) diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index 64097a26c76..89b8eef8dcf 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -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 diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 7086298c19f..54939f85961 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -635,3 +635,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 diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 11894b7b0d6..692bbe7c7a7 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -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, diff --git a/code/modules/surgery/organs/internal/appendix/_appendix.dm b/code/modules/surgery/organs/internal/appendix/_appendix.dm index 020d5186af9..78df2f9e40f 100644 --- a/code/modules/surgery/organs/internal/appendix/_appendix.dm +++ b/code/modules/surgery/organs/internal/appendix/_appendix.dm @@ -92,5 +92,19 @@ return conditional_tooltip("Inflamed", "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 diff --git a/code/modules/surgery/organs/internal/ears/_ears.dm b/code/modules/surgery/organs/internal/ears/_ears.dm index 3652116c7d4..9b5b398d996 100644 --- a/code/modules/surgery/organs/internal/ears/_ears.dm +++ b/code/modules/surgery/organs/internal/ears/_ears.dm @@ -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 diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm index 52e6c24cec6..513e8ceab5c 100644 --- a/code/modules/surgery/organs/internal/eyes/_eyes.dm +++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm @@ -1033,3 +1033,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 diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm index c1ebed9afbf..65ef6de00fb 100644 --- a/code/modules/surgery/organs/internal/heart/_heart.dm +++ b/code/modules/surgery/organs/internal/heart/_heart.dm @@ -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 diff --git a/code/modules/surgery/organs/internal/liver/_liver.dm b/code/modules/surgery/organs/internal/liver/_liver.dm index e3d6d517044..5d9dbd8ddf5 100755 --- a/code/modules/surgery/organs/internal/liver/_liver.dm +++ b/code/modules/surgery/organs/internal/liver/_liver.dm @@ -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 #undef LIVER_FAILURE_STAGE_SECONDS diff --git a/code/modules/surgery/organs/internal/lungs/_lungs.dm b/code/modules/surgery/organs/internal/lungs/_lungs.dm index 022170b819e..6008cda20c7 100644 --- a/code/modules/surgery/organs/internal/lungs/_lungs.dm +++ b/code/modules/surgery/organs/internal/lungs/_lungs.dm @@ -874,7 +874,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. @@ -1036,6 +1036,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 diff --git a/code/modules/surgery/organs/internal/stomach/_stomach.dm b/code/modules/surgery/organs/internal/stomach/_stomach.dm index 40d3265684d..3243ce5ff84 100644 --- a/code/modules/surgery/organs/internal/stomach/_stomach.dm +++ b/code/modules/surgery/organs/internal/stomach/_stomach.dm @@ -325,4 +325,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 diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm index fb45436feeb..0754b6c4729 100644 --- a/code/modules/surgery/organs/internal/tongue/_tongue.dm +++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm @@ -644,6 +644,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" diff --git a/icons/obj/service/hydroponics/growing.dmi b/icons/obj/service/hydroponics/growing.dmi index aee567daa54..9b130858b60 100644 Binary files a/icons/obj/service/hydroponics/growing.dmi and b/icons/obj/service/hydroponics/growing.dmi differ diff --git a/icons/obj/service/hydroponics/seeds.dmi b/icons/obj/service/hydroponics/seeds.dmi index c18c361b0ec..5a579f0438c 100644 Binary files a/icons/obj/service/hydroponics/seeds.dmi and b/icons/obj/service/hydroponics/seeds.dmi differ