diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 5c3448c6f1a..8e40e9e6b16 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -232,6 +232,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_FORCED_STANDING "forced_standing" // The mob cannot be floored, or lie down #define TRAIT_IPC_JOINTS_MAG "ipc_joints_mag" // IPC has weaker limbs but can re-attach them with ease #define TRAIT_IPC_JOINTS_SEALED "ipc_joints_sealed" // The IPC's limbs will not pop off bar sharp damage (aka like a human), but will take slightly more stamina damage +#define TRAIT_IPC_CAN_EAT "ipc_can_eat" // IPC can eat food #define TRAIT_HAS_GPS "has_gps" // used for /Stat #define TRAIT_CAN_VIEW_HEALTH "can_view_health" // Also used for /Stat #define TRAIT_MAGPULSE "magpulse" // Used for anything that is magboot related diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 87d1233e261..47d641ce4fb 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -81,6 +81,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SHOW_WIRE_INFO" = TRAIT_SHOW_WIRE_INFO, "TRAIT_IPC_JOINTS_MAG" = TRAIT_IPC_JOINTS_MAG, "TRAIT_IPC_JOINTS_SEALED" = TRAIT_IPC_JOINTS_SEALED, + "TRAIT_IPC_CAN_EAT" = TRAIT_IPC_CAN_EAT, "TRAIT_CAN_BE_EATEN_BY_LIZARDS" = TRAIT_EDIBLE_BUG, "TRAIT_FLATTENED" = TRAIT_FLATTENED, "TRAIT_SM_HALLUCINATION_IMMUNE" = SM_HALLUCINATION_IMMUNE, diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 6e61cca3a3a..3733c0c6b98 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -1780,25 +1780,27 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return TRUE /mob/living/carbon/human/can_eat(flags = 255) - return dna.species && (dna.species.dietflags & flags) + return dna.species && ((dna.species.dietflags & flags) || HAS_TRAIT(src, TRAIT_IPC_CAN_EAT)) /mob/living/carbon/human/selfFeed(obj/item/food/toEat, fullness) if(!check_has_mouth()) - to_chat(src, "Where do you intend to put \the [toEat]? You don't have a mouth!") - return FALSE + if(!ismachineperson(src) || (ismachineperson(src) && !HAS_TRAIT(src, TRAIT_IPC_CAN_EAT))) + to_chat(src, "Where do you intend to put [toEat]? You don't have a mouth!") + return FALSE return ..() /mob/living/carbon/human/forceFed(obj/item/food/toEat, mob/user, fullness) if(!check_has_mouth()) - if(!((istype(toEat, /obj/item/reagent_containers/drinks) && (ismachineperson(src))))) - to_chat(user, "Where do you intend to put \the [toEat]? \The [src] doesn't have a mouth!") - return FALSE + if(!ismachineperson(src) || !HAS_TRAIT(src, TRAIT_IPC_CAN_EAT)) + if(!((istype(toEat, /obj/item/reagent_containers/drinks) && (ismachineperson(src))))) + to_chat(user, "Where do you intend to put [toEat]? \The [src] doesn't have a mouth!") + return FALSE return ..() /mob/living/carbon/human/selfDrink(obj/item/reagent_containers/drinks/toDrink) if(!check_has_mouth()) if(!ismachineperson(src)) - to_chat(src, "Where do you intend to put \the [src]? You don't have a mouth!") + to_chat(src, "Where do you intend to put \the [src]? You don't have a mouth!") return FALSE else to_chat(src, "You pour a bit of liquid from [toDrink] into your connection port.") diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index 98091698609..095a6e54da3 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -2,7 +2,9 @@ return TASTE_SENSITIVITY_NORMAL /mob/living/carbon/human/get_taste_sensitivity() - if(dna.species) + if(HAS_TRAIT(src, TRAIT_IPC_CAN_EAT)) + return TASTE_SENSITIVITY_NORMAL + else if(dna.species) return dna.species.taste_sensitivity else return TASTE_SENSITIVITY_NORMAL diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index f65deb2dc72..e61c88ebb47 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -1478,6 +1478,17 @@ build_path = /obj/item/organ/internal/cyberimp/chest/ipc_joints/flayer_pacification category = list("IPC Upgrades") +/datum/design/culinary_processing_implant + name = "Culinary Processing Implant" + desc = "This implant emulates the functions of a gastrointestinal system, allowing IPCs to eat and experience taste." + id = "ci-culinary_implant" + req_tech = list("materials" = 3, "powerstorage" = 4, "biotech" = 3) + build_type = MECHFAB + construction_time = 60 + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_GOLD = 500) + build_path = /obj/item/organ/internal/cyberimp/chest/ipc_food + category = list("IPC Upgrades") + // Misc /datum/design/mecha_tracking name = "Exosuit Tracking Beacon" diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 730f50d7606..231c6b0fcd6 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -1022,6 +1022,22 @@ REMOVE_TRAIT(M, TRAIT_MINDFLAYER_NULLIFIED, UNIQUE_TRAIT_SOURCE(src)) return ..() +/obj/item/organ/internal/cyberimp/chest/ipc_food + name = "Culinary Processing Implant" + desc = "This implant emulates the functions of a gastrointestinal system, allowing IPCs to eat and experience taste." + implant_color = "#d8780a" + origin_tech = "materials=2;powerstorage=2;biotech=2" + slot = "gastrointestinal" + requires_machine_person = TRUE + +/obj/item/organ/internal/cyberimp/chest/ipc_food/insert(mob/living/carbon/M, special = FALSE) + ..() + ADD_TRAIT(M, TRAIT_IPC_CAN_EAT, "ipc_food[UID()]") + +/obj/item/organ/internal/cyberimp/chest/ipc_food/remove(mob/living/carbon/M, special = FALSE) + REMOVE_TRAIT(M, TRAIT_IPC_CAN_EAT, "ipc_food[UID()]") + return ..() + //BOX O' IMPLANTS /obj/item/storage/box/cyber_implants