Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
carpotoxin committed Sep 3, 2024
1 parent 2807513 commit 3d44955
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/~doppler_defines/mobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Defines for Species IDs. Used to refer to the name of a species, for things like bodypart names or species preferences.
#define SPECIES_KEMONOMIMI "kemonomimi"
7 changes: 7 additions & 0 deletions code/__DEFINES/~doppler_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// TRAIT_ANIMALISTIC choices
#define TRAIT_FELINE "feline"
#define TRAIT_CANINE "canine"
#define TRAIT_REPTILE "reptile"
#define TRAIT_AVIAN "avian"
#define TRAIT_MURIDAE "muridae"
#define TRAIT_PISCINE "piscine"
2 changes: 2 additions & 0 deletions code/__DEFINES/~doppler_defines/traits/sources.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Trait which lets species pick from a list of animal traits, used by kemonomimi and anthromorphs
#define TRAIT_ANIMALISTIC "animalistic"
85 changes: 85 additions & 0 deletions modular_doppler/modular_species_types/kemonomimi.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
//// Kemonomimi - Overwrites and continuiations of
// code/modules/mob/living/carbon/human/species_types/felinid.dm
/datum/species/human/kemonomimi
name = "Kemonomimi"
id = SPECIES_KEMONOMIMI
examine_limb_id = SPECIES_HUMAN
inherent_traits = list(
TRAIT_ANIMALISTIC,
TRAIT_USES_SKINTONES,
)
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT

/datum/species/human/kemonomimi/get_physical_attributes()
return "N/a."

/datum/species/human/kemonomimi/get_species_description()
return "N/a."

/datum/species/human/kemonomimi/get_species_lore()
return list(
"N/a.",
)

/datum/species/human/kemonomimi/on_species_gain(mob/living/carbon/human/target, datum/species/old_species, pref_load)
/// Trait which is given to the target, canine by default
var/animal_trait = TRAIT_CANINE
// Lets find the chosen trait, exciting!
for(var/trait as anything in target._status_traits)
if(TRAIT_ANIMALISTIC in target._status_traits[trait])
animal_trait = trait
break

apply_animal_trait(target, animal_trait)
return ..()

/datum/species/human/kemonomimi/on_species_loss(mob/living/carbon/human/target, datum/species/new_species, pref_load)
. = .. ()
REMOVE_TRAITS_IN(target, TRAIT_ANIMALISTIC)

/proc/apply_animal_trait(mob/living/carbon/human/target, animal_trait)
if(!ishuman(target) || !animal_trait)
return
/// Var for the target's species
// var/datum/species/species = target.dna.species
// Steal their tongue so we can replace it
/* qdel(target.get_organ_slot(ORGAN_SLOT_TONGUE))
switch(animal_trait) // Lots of empty space for additional content
if(TRAIT_FELINE)
var/obj/item/organ/internal/tongue/cat/cat_tongue = new
cat_tongue.Insert(target, special = TRUE)
if(TRAIT_CANINE)
var/obj/item/organ/internal/tongue/dog/dog_tongue = new
dog_tongue.Insert(target, special = TRUE)
if(TRAIT_REPTILE)
var/obj/item/organ/internal/tongue/lizard/lizard_tongue = new
lizard_tongue.Insert(target, special = TRUE)
if(TRAIT_AVIAN)
var/obj/item/organ/internal/tongue/bird/bird_tongue = new
bird_tongue.Insert(target, special = TRUE)
if(TRAIT_MURIDAE)
var/obj/item/organ/internal/tongue/mouse/mouse_tongue = new
mouse_tongue.Insert(target, special = TRUE)
if(TRAIT_PISCINE)
var/obj/item/organ/internal/tongue/fish/fish_tongue = new
fish_tongue.Insert(target, special = TRUE)
var/obj/new_tongue = target.get_organ_slot(ORGAN_SLOT_TONGUE)
species.mutanttongue = new_tongue.type
target.update_body()
*/

/datum/species/human/kemonomimi/prepare_human_for_preview(mob/living/carbon/human/human_for_preview)
// remember to make a puppygirl
human_for_preview.set_haircolor("#3a2d22", update = FALSE)
human_for_preview.set_hairstyle("Short twintails", update = TRUE)
human_for_preview.update_body()

/datum/species/human/kemonomimi/check_roundstart_eligible()
return TRUE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//// Pref logic for kemonimimi species traits
// defines in `code/__DEFINES/~doppler_defines/traits/declarations.dm`
/datum/preference/choiced/animalistic
savefile_key = "feature_animalistic"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
main_feature_name = "Animalistic trait"
priority = PREFERENCE_PRIORITY_DEFAULT //important flag
relevant_inherent_trait = TRAIT_ANIMALISTIC
should_generate_icons = TRUE

/datum/preference/choiced/animalistic/init_possible_values()
return list(
TRAIT_FELINE,
TRAIT_CANINE,
TRAIT_REPTILE,
TRAIT_AVIAN,
TRAIT_MURIDAE,
TRAIT_PISCINE,
)

/datum/preference/choiced/animalistic/icon_for(value)
switch(value)
if(TRAIT_FELINE)
return icon('icons/mob/simple/pets.dmi', "cat2", EAST)
if(TRAIT_CANINE)
return icon('icons/mob/simple/pets.dmi', "corgi", EAST)
if(TRAIT_REPTILE)
return icon('icons/mob/simple/animal.dmi', "snake", EAST)
if(TRAIT_AVIAN)
return icon('icons/mob/simple/animal.dmi', "chicken_white", EAST)
if(TRAIT_MURIDAE)
return icon('icons/mob/simple/animal.dmi', "mouse_white", EAST)
if(TRAIT_PISCINE)
return icon('icons/obj/toys/plushes.dmi', "blahaj")


/datum/preference/choiced/animalistic/apply_to_human(mob/living/carbon/human/target, value)
ADD_TRAIT(target, value, TRAIT_ANIMALISTIC)

/datum/preference/choiced/animalistic/create_default_value()
return TRAIT_CANINE
5 changes: 5 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@
#include "code\__DEFINES\traits\declarations.dm"
#include "code\__DEFINES\traits\macros.dm"
#include "code\__DEFINES\traits\sources.dm"
#include "code\__DEFINES\~doppler_defines\mobs.dm"
#include "code\__DEFINES\~doppler_defines\traits\declarations.dm"
#include "code\__DEFINES\~doppler_defines\traits\sources.dm"
#include "code\__HELPERS\_auxtools_api.dm"
#include "code\__HELPERS\_dreamluau.dm"
#include "code\__HELPERS\_lists.dm"
Expand Down Expand Up @@ -6369,6 +6372,8 @@
#include "modular_doppler\modular_cosmetics\code\neck\collar.dm"
#include "modular_doppler\modular_cosmetics\code\suits\jacket.dm"
#include "modular_doppler\modular_cosmetics\GAGS\greyscale_configs_neck.dm"
#include "modular_doppler\modular_species_types\kemonomimi.dm"
#include "modular_doppler\modular_species_types\preferences\species_traits.dm"
#include "modular_doppler\sprite_accessories\code\hair.dm"
#include "modular_doppler\tableflip\tableflip.dm"
#include "modular_doppler\wargaming\code\game_kit.dm"
Expand Down

0 comments on commit 3d44955

Please sign in to comment.