Stomach get_availability() now checks for NO_HUNGER instead of broken trait that no mobs have. (#69674)

* Organtraits

* spellcheck

* etheral

* plasma change

* plasma p2

* appendix

* appendix fix

* Improvments
This commit is contained in:
itseasytosee
2022-09-05 22:16:41 -04:00
committed by GitHub
parent f558d0792e
commit c8b89a6e21
10 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -96,7 +96,7 @@
#define BLOOD_CLANS 21
/// Stops species from spawning with tongue. Doesn't actually make the species able to talk with no tongue
#define NO_TONGUE 22
#define NOAPPENDIX 23
//organ slots
#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator"
@@ -277,7 +277,7 @@
missing_organs += "lungs"
if(!(TRAIT_NOMETABOLISM in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_LIVER))
missing_organs += "liver"
if(!(NOSTOMACH in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_STOMACH))
if(!(TRAIT_NOHUNGER in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_STOMACH))
missing_organs += "stomach"
if(!(NO_TONGUE in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_TONGUE))
missing_organs += "tongue"
@@ -201,7 +201,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
var/gib_anim = "gibbed-h"
//Do NOT remove by setting to null. use OR make a RESPECTIVE TRAIT (removing stomach? add the NOSTOMACH trait to your species)
//Do NOT remove by setting to null. use OR make an ASSOCIATED TRAIT.
//why does it work this way? because traits also disable the downsides of not having an organ, removing organs but not having the trait will make your species die
///Replaces default brain with a different organ
@@ -5,14 +5,13 @@
say_mod = "rattles"
sexes = 0
meat = /obj/item/stack/sheet/mineral/plasma
species_traits = list(NOBLOOD,NOTRANSSTING, HAS_BONE)
species_traits = list(NOBLOOD, NOTRANSSTING, HAS_BONE, NOAPPENDIX)
// plasmemes get hard to wound since they only need a severe bone wound to dismember, but unlike skellies, they can't pop their bones back into place
inherent_traits = list(
TRAIT_GENELESS,
TRAIT_HARDLY_WOUNDED,
TRAIT_RADIMMUNE,
TRAIT_RESISTCOLD,
TRAIT_NOHUNGER,
)
inherent_biotypes = MOB_HUMANOID|MOB_MINERAL
@@ -5,7 +5,7 @@
say_mod = "rattles"
sexes = 0
meat = /obj/item/food/meat/slab/human/mutant/skeleton
species_traits = list(NOBLOOD, HAS_BONE, NOTRANSSTING, NOEYESPRITES, NO_DNA_COPY)
species_traits = list(NOBLOOD, HAS_BONE, NOTRANSSTING, NOEYESPRITES, NO_DNA_COPY, NOAPPENDIX)
inherent_traits = list(
TRAIT_CAN_USE_FLIGHT_POTION,
TRAIT_EASYDISMEMBER,
+3 -1
View File
@@ -284,7 +284,9 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
* returns whether the species should innately have this organ.
*
* regenerate organs works with generic organs, so we need to get whether it can accept certain organs just by what this returns.
* This is set to return true or false, depending on if a species has a specific organless trait. stomach for example checks if the species has NOSTOMACH and return based on that.
* This is set to return true or false, depending on if a species has a trait that would nulify the purpose of the organ.
* For example, lungs won't be given if you have NO_BREATH, stomachs check for NO_HUNGER, and livers check for NO_METABOLISM.
* If you want a carbon to have a trait that normally blocks an organ but still want the organ. Attach the trait to the organ using the organ_traits var
* Arguments:
* owner_species - species, needed to return whether the species has an organ specific trait
*/
+1 -1
View File
@@ -70,7 +70,7 @@
/obj/item/organ/internal/appendix/get_availability(datum/species/owner_species)
return !(TRAIT_NOHUNGER in owner_species.inherent_traits)
return !((TRAIT_NOHUNGER in owner_species.inherent_traits) || (NOAPPENDIX in owner_species.species_traits))
/obj/item/organ/internal/appendix/Remove(mob/living/carbon/organ_owner, special = FALSE)
REMOVE_TRAIT(organ_owner, TRAIT_DISEASELIKE_SEVERITY_MEDIUM, type)
+1
View File
@@ -540,6 +540,7 @@
name = "plasma filter"
desc = "A spongy rib-shaped mass for filtering plasma from the air."
icon_state = "lungs-plasma"
organ_traits = list(TRAIT_NOHUNGER) // A fresh breakfast of plasma is a great start to any morning.
safe_oxygen_min = 0 //We don't breathe this
safe_plasma_min = 4 //We breathe THIS!
@@ -206,7 +206,7 @@
human.remove_movespeed_modifier(/datum/movespeed_modifier/hunger)
/obj/item/organ/internal/stomach/get_availability(datum/species/owner_species)
return !(NOSTOMACH in owner_species.inherent_traits)
return !((TRAIT_NOHUNGER in owner_species.inherent_traits) || (NOSTOMACH in owner_species.species_traits))
/obj/item/organ/internal/stomach/proc/handle_disgust(mob/living/carbon/human/disgusted, delta_time, times_fired)
var/old_disgust = disgusted.old_disgust
@@ -266,6 +266,7 @@
/obj/item/organ/internal/stomach/bone
desc = "You have no idea what this strange ball of bones does."
metabolism_efficiency = 0.025 //very bad
organ_traits = list(TRAIT_NOHUNGER)
/// How much [BRUTE] damage milk heals every second
var/milk_brute_healing = 2.5
/// How much [BURN] damage milk heals every second
@@ -288,6 +289,7 @@
/obj/item/organ/internal/stomach/bone/plasmaman
name = "digestive crystal"
icon_state = "stomach-p"
organ_traits = list()
desc = "A strange crystal that is responsible for metabolizing the unseen energy force that feeds plasmamen."
metabolism_efficiency = 0.06
milk_burn_healing = 0
@@ -2,6 +2,7 @@
name = "biological battery"
icon_state = "stomach-p" //Welp. At least it's more unique in functionaliy.
desc = "A crystal-like organ that stores the electric charge of ethereals."
organ_traits = list(TRAIT_NOHUNGER) // We have our own hunger mechanic.
///basically satiety but electrical
var/crystal_charge = ETHEREAL_CHARGE_FULL
///used to keep ethereals from spam draining power sources
@@ -16,12 +17,10 @@
. = ..()
RegisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/charge)
RegisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_electrocute)
ADD_TRAIT(owner, TRAIT_NOHUNGER, REF(src))
/obj/item/organ/internal/stomach/ethereal/Remove(mob/living/carbon/carbon, special = FALSE)
UnregisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT)
UnregisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT)
REMOVE_TRAIT(owner, TRAIT_NOHUNGER, REF(src))
owner.clear_mood_event("charge")
carbon.clear_alert(ALERT_ETHEREAL_CHARGE)