Skip to content

Commit

Permalink
Moves more species traits to bodyparts +bugfixes (tgstation#85692)
Browse files Browse the repository at this point in the history
## About The Pull Request
I've retaken up the crusade to make species specific features modular,
with the end goal of being able to essentially ship of thesis a person
without causing any strangeness (eg, currently if you take an abductor
and replace every body part and organ with a human one including the
brain they still don't need to breath.) To make that a reality we will
need to develop a few more robust tools but here are some easy fixes for
right now.

Changes are:
lizard:
TRAIT_TACKLING_TAILED_DEFENDER -> moved to Lizard Brain
monkey:
TRAIT_GUN_NATURAL -> moved to Primate Brain
Ethereal:
TRAIT_NO_UNDERWEAR -> moved to chest
TRAIT_FIXED_HAIRCOLOR -> removed (had no implementation)
TRAIT_TENACIOUS (illustrious) -> Not functional, fixed by making it an
element that the brain applies
Moth:
TRAIT_TACKLING_WINGED_ATTACKER -> moved to chest
TRAIT_ANTENNAE -> moved to head
## Why It's Good For The Game
Makes sense. More fun for mad scientist types/limbscambler
## Changelog
:cl: itseasytosee
fix: illustrious ethereals now properly get the tenacious trait
code: more species features have been moved to their individual body
parts.
/:cl:

(cherry picked from commit 3eeda64)
  • Loading branch information
itseasytosee authored and Sadboysuss committed Aug 15, 2024
1 parent 0dd62d5 commit 0d04724
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 24 deletions.
8 changes: 3 additions & 5 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_MUTANT_COLORS "mutcolors"
/// Species with this trait have mutant colors that cannot be chosen by the player, nor altered ingame by external means
#define TRAIT_FIXED_MUTANT_COLORS "fixed_mutcolors"
/// Species with this trait have a haircolor that cannot be chosen by the player, nor altered ingame by external means
#define TRAIT_FIXED_HAIRCOLOR "fixed_haircolor"
/// Humans with this trait won't get bloody hands, nor bloody feet
#define TRAIT_NO_BLOOD_OVERLAY "no_blood_overlay"
/// Humans with this trait cannot have underwear
Expand Down Expand Up @@ -1090,13 +1088,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Currently fishing
#define TRAIT_GONE_FISHING "fishing"

/// Makes a species be better/worse at tackling depending on their wing's status
/// Makes a character be better/worse at tackling depending on their wing's status
#define TRAIT_TACKLING_WINGED_ATTACKER "tacking_winged_attacker"

/// Makes a species be frail and more likely to roll bad results if they hit a wall
/// Makes a character be frail and more likely to roll bad results if they hit a wall
#define TRAIT_TACKLING_FRAIL_ATTACKER "tackling_frail_attacker"

/// Makes a species be better/worse at defending against tackling depending on their tail's status
/// Makes a character be better/worse at defending against tackling depending on their tail's status
#define TRAIT_TACKLING_TAILED_DEFENDER "tackling_tailed_defender"

/// Is runechat for this atom/movable currently disabled, regardless of prefs or anything?
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FENCE_CLIMBER" = TRAIT_FENCE_CLIMBER,
"TRAIT_FINGERPRINT_PASSTHROUGH" = TRAIT_FINGERPRINT_PASSTHROUGH,
"TRAIT_FIST_MINING" = TRAIT_FIST_MINING,
"TRAIT_FIXED_HAIRCOLOR" = TRAIT_FIXED_HAIRCOLOR,
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
"TRAIT_FLESH_DESIRE" = TRAIT_FLESH_DESIRE,
"TRAIT_FLOORED" = TRAIT_FLOORED,
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
"TRAIT_FENCE_CLIMBER" = TRAIT_FENCE_CLIMBER,
"TRAIT_FIST_MINING" = TRAIT_FIST_MINING,
"TRAIT_FIXED_HAIRCOLOR" = TRAIT_FIXED_HAIRCOLOR,
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
"TRAIT_FLESH_DESIRE" = TRAIT_FLESH_DESIRE,
"TRAIT_FLOORED" = TRAIT_FLOORED,
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,21 @@
/obj/item/organ/internal/brain/lustrous/on_mob_remove(mob/living/carbon/organ_owner, special)
. = ..()
organ_owner.cure_trauma_type(/datum/brain_trauma/special/bluespace_prophet, TRAUMA_RESILIENCE_ABSOLUTE)
organ_owner.RemoveElement(/datum/element/tenacious)

/obj/item/organ/internal/brain/lustrous/on_mob_insert(mob/living/carbon/organ_owner, special)
. = ..()
organ_owner.gain_trauma(/datum/brain_trauma/special/bluespace_prophet, TRAUMA_RESILIENCE_ABSOLUTE)
organ_owner.AddElement(/datum/element/tenacious)

/obj/item/organ/internal/brain/felinid //A bit smaller than average
brain_size = 0.8

/obj/item/organ/internal/brain/lizard //A bit smaller than average
name = "lizard brain"
desc = "This juicy piece of meat has a oversized brain stem and cerebellum, with not much of a limbic system to speak of at all. You would expect it's owner to be pretty cold blooded."
organ_traits = list(TRAIT_TACKLING_TAILED_DEFENDER)

/obj/item/organ/internal/brain/abductor
name = "grey brain"
desc = "A piece of juicy meat found in an ayy lmao's head."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
siemens_coeff = 0.5 //They thrive on energy
payday_modifier = 1.0
inherent_traits = list(
TRAIT_NO_UNDERWEAR,
TRAIT_MUTANT_COLORS,
TRAIT_FIXED_MUTANT_COLORS,
TRAIT_FIXED_HAIRCOLOR,
TRAIT_AGENDER,
)
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
Expand Down Expand Up @@ -247,12 +245,9 @@
mutantbrain = /obj/item/organ/internal/brain/lustrous
changesource_flags = MIRROR_BADMIN | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN
inherent_traits = list(
TRAIT_NO_UNDERWEAR,
TRAIT_MUTANT_COLORS,
TRAIT_FIXED_MUTANT_COLORS,
TRAIT_FIXED_HAIRCOLOR,
TRAIT_AGENDER,
TRAIT_TENACIOUS, // this doesn't work. tenacity is an element
TRAIT_NOBREATH,
TRAIT_RESISTHIGHPRESSURE,
TRAIT_RESISTLOWPRESSURE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
name = "Flyperson"
plural_form = "Flypeople"
id = SPECIES_FLYPERSON
inherent_traits = list(
TRAIT_TACKLING_FRAIL_ATTACKER,
TRAIT_ANTENNAE,
)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
meat = /obj/item/food/meat/slab/human/mutant/fly
mutanteyes = /obj/item/organ/internal/eyes/fly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
id = SPECIES_LIZARD
inherent_traits = list(
TRAIT_MUTANT_COLORS,
TRAIT_TACKLING_TAILED_DEFENDER,
)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE
mutant_bodyparts = list("legs" = "Normal Legs")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
meat = /obj/item/food/meat/slab/monkey
knife_butcher_results = list(/obj/item/food/meat/slab/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1)
inherent_traits = list(
TRAIT_GUN_NATURAL,
TRAIT_NO_AUGMENTS,
TRAIT_NO_BLOOD_OVERLAY,
TRAIT_NO_DNA_COPY,
Expand Down Expand Up @@ -128,7 +127,7 @@
/obj/item/organ/internal/brain/primate //Ook Ook
name = "Primate Brain"
desc = "This wad of meat is small, but has enlaged occipital lobes for spotting bananas."
organ_traits = list(TRAIT_CAN_STRIP, TRAIT_PRIMITIVE) // No literacy or advanced tool usage.
organ_traits = list(TRAIT_CAN_STRIP, TRAIT_PRIMITIVE, TRAIT_GUN_NATURAL) // No literacy or advanced tool usage.
actions_types = list(/datum/action/item_action/organ_action/toggle_trip)
/// Will this monkey stumble if they are crossed by a simple mob or a carbon in combat mode? Toggable by monkeys with clients, and is messed automatically set to true by monkey AI.
var/tripping = TRUE
Expand Down
4 changes: 0 additions & 4 deletions code/modules/mob/living/carbon/human/species_types/mothmen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
name = "\improper Mothman"
plural_form = "Mothmen"
id = SPECIES_MOTH
inherent_traits = list(
TRAIT_TACKLING_WINGED_ATTACKER,
TRAIT_ANTENNAE,
)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
body_markings = list(/datum/bodypart_overlay/simple/body_marking/moth = "None")
external_organs = list(/obj/item/organ/external/wings/moth = "Plain", /obj/item/organ/external/antennae = "Plain")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
///Determines the accuracy bonus, armor penetration and knockdown probability.
var/unarmed_effectiveness = 10

/// Traits that are given to the holder of the part. If you want an effect that changes this, don't add directly to this. Use the add_bodypart_trait() proc
/// Traits that are given to the holder of the part. This does not update automatically on life(), only when the organs are initially generated or inserted!
var/list/bodypart_traits = list()
/// The name of the trait source that the organ gives. Should not be altered during the events of gameplay, and will cause problems if it is.
var/bodypart_trait_source = BODYPART_TRAIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
dmg_overlay_type = null
brute_modifier = 1.25 //ethereal are weak to brute damages
wing_types = NONE
bodypart_traits = list(TRAIT_NO_UNDERWEAR)

/obj/item/bodypart/chest/ethereal/update_limb(dropping_limb, is_creating)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,14 @@
should_draw_greyscale = FALSE
head_flags = HEAD_EYESPRITES|HEAD_EYEHOLES|HEAD_DEBRAIN
teeth_count = 0
bodypart_traits = list(TRAIT_ANTENNAE)

/obj/item/bodypart/chest/fly
limb_id = SPECIES_FLYPERSON
is_dimorphic = TRUE
should_draw_greyscale = FALSE
wing_types = list(/obj/item/organ/external/wings/functional/fly)
bodypart_traits = list(TRAIT_TACKLING_FRAIL_ATTACKER)

/obj/item/bodypart/arm/left/fly
limb_id = SPECIES_FLYPERSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
should_draw_greyscale = FALSE
head_flags = HEAD_LIPS|HEAD_EYESPRITES|HEAD_EYEHOLES|HEAD_DEBRAIN //what the fuck, moths have lips?
teeth_count = 0
bodypart_traits = list(TRAIT_ANTENNAE)

/obj/item/bodypart/chest/moth
icon = 'icons/mob/human/species/moth/bodyparts.dmi'
Expand All @@ -16,6 +17,7 @@
is_dimorphic = TRUE
should_draw_greyscale = FALSE
wing_types = list(/obj/item/organ/external/wings/functional/moth/megamoth, /obj/item/organ/external/wings/functional/moth/mothra)
bodypart_traits = list(TRAIT_TACKLING_WINGED_ATTACKER)

/obj/item/bodypart/chest/moth/get_butt_sprite()
return icon('icons/mob/butts.dmi', BUTT_SPRITE_FUZZY)
Expand Down

0 comments on commit 0d04724

Please sign in to comment.