From b9084af56f5a6f27bbbdefdb3b9d1b2570d1c82d Mon Sep 17 00:00:00 2001 From: AsmodeusRex Date: Tue, 13 Dec 2022 14:15:57 -0800 Subject: [PATCH] Change racegroup to defer to default egg settings --- generator/src/racegroups.rs | 228 ++++++++++++++++++------------------ 1 file changed, 113 insertions(+), 115 deletions(-) diff --git a/generator/src/racegroups.rs b/generator/src/racegroups.rs index 5b1a79b..c4c00cc 100644 --- a/generator/src/racegroups.rs +++ b/generator/src/racegroups.rs @@ -2,8 +2,8 @@ use std::collections::HashMap; #[derive(Clone, Debug)] pub struct RaceGroup { - pub races: Vec<&'static str>, pub name: String, + pub races: Vec<&'static str>, pub anus: String, pub f_breasts: String, pub m_breasts: String, @@ -11,17 +11,19 @@ pub struct RaceGroup { pub m_genitals: String, pub tag: String, pub sex_drive: String, - pub egg_implant: Option, + pub egg_implant: bool, } impl RaceGroup { - fn standard(races: Vec<&'static str>, - species: &'static str, - tag: &'static str, - sex_drive: &'static str, - breasts: &'static str, - anus: &'static str, - genitals: (&'static str, &'static str)) -> Self { + fn standard( + species: &'static str, + races: Vec<&'static str>, + tag: &'static str, + sex_drive: &'static str, + breasts: &'static str, + anus: &'static str, + genitals: (&'static str, &'static str) + ) -> Self { Self { races, name: format!("{}Person", species), @@ -32,17 +34,18 @@ impl RaceGroup { m_genitals: format!("{}Penis", genitals.1), tag: tag.to_string(), sex_drive: sex_drive.to_string(), - egg_implant: None, + egg_implant: false, } } - fn standard_animal(races: Vec<&'static str>, - species: &'static str, - tag: &'static str, - sex_drive: &'static str, - egg_implant: Option, - breasts: &'static str, - anus: &'static str, - genitals: (&'static str, &'static str)) -> Self { + fn standard_animal( + species: &'static str, + races: Vec<&'static str>, + tag: &'static str, + sex_drive: &'static str, + breasts: &'static str, + anus: &'static str, + genitals: (&'static str, &'static str) + ) -> Self { Self { races, name: format!("{}Animal", species), @@ -53,7 +56,7 @@ impl RaceGroup { m_genitals: format!("{}Penis", genitals.1), tag: tag.to_string(), sex_drive: sex_drive.to_string(), - egg_implant, + egg_implant: false, } } } @@ -74,13 +77,8 @@ pub fn construct_racegroup(group: &RaceGroup) -> String { races.push_str(&format!("\n\t\t\t
  • {race}
  • ")); } let fields = match group.egg_implant { - Some(imp) => { - match imp { - true => "true\n\t\ttrue\n\t\t".to_string(), - false => "true\n\t\t".to_string(), - } - }, - None => String::new() + true => "true\n\t\ttrue\n\t\t".to_string(), + false => String::new() }; let replace = HashMap::from([ ("{name}", group.name.clone()), @@ -117,6 +115,7 @@ const RACEGROUP_STRING: &'static str = " pub fn racegroup_data_humans() -> Vec { vec![ RaceGroup::standard( + "Human", vec![ "AA_Mime", "Alien_Goblin", @@ -146,13 +145,13 @@ pub fn racegroup_data_humans() -> Vec { "Ooka_Miko", "TrollRace", ], - "Human", "Skin", "1", "Breasts", "", ("", ""), ), RaceGroup::standard( + "Arthropod", vec![ "Alien_Beetle", "Alien_Mantis", @@ -163,35 +162,35 @@ pub fn racegroup_data_humans() -> Vec { "Races_BlackWidow", "Yokai_JorouGumo", ], - "Arthropod", "Chitin", "0.8", "Breasts", "Insect", ("Ovipore", "Aedeagus"), ), RaceGroup::standard( + "Avian", vec![ "ATK_Avianmorph", "Harpy", ], - "Avian", "Feathers", "0.9", "FeaturelessChest", "Cloacal", ("Cloacal", "Cloacal"), ), RaceGroup::standard( + "Bear", vec![ "WoW_Pandaren", "BearMan", ], - "Bear", "Fur", "0.9", "Breasts", "", ("", "Bear"), ), RaceGroup::standard( + "Canine", vec![ "ATK_Caninemorph", "WoW_Worgen", @@ -200,7 +199,6 @@ pub fn racegroup_data_humans() -> Vec { "siro", "WolfMan", ], - "Canine", "Fur", "1", "Breasts", "", @@ -208,6 +206,7 @@ pub fn racegroup_data_humans() -> Vec { ), // For foxes, hyenas, werewolves, etc (hyenas are felines oops) RaceGroup::standard( + "CanineHighSex", vec![ "ATK_Gnollmorph", "ATK_Vulpinemorph", @@ -219,25 +218,25 @@ pub fn racegroup_data_humans() -> Vec { "Yokai_NineTailWhite", "FoxMan", ], - "CanineHighSex", "Fur", "1.3", "Breasts", "", ("Dog", "Dog"), ), RaceGroup::standard( + "Crocodilian", vec![ "Alien_Argonian", "SSD_DeathclawRace", "Races_Lizardman", ], - "Crocodilian", "Scales", "0.9", "ScaleBreasts", "Cloacal", ("Cloacal", "Crocodilian"), ), RaceGroup::standard( + "Deer", vec![ "ATK_Cervinemorph", "CamelMan", @@ -246,24 +245,24 @@ pub fn racegroup_data_humans() -> Vec { "GazelleMan", "Lliscean", ], - "Deer", "Fur", "1", "Breasts", "", ("Narrow", "Needle"), ), RaceGroup::standard( + "Dino", vec![ "Raptor", "Tyrannosaur", ], - "Dino", "Scales", "0.9", "ScaleBreasts", "Cloacal", ("Cloacal", "Dino"), ), RaceGroup::standard( + "Dragon", vec![ "ATK_Dragomorph", "WMH_Basilisk", @@ -284,35 +283,35 @@ pub fn racegroup_data_humans() -> Vec { "ALapelli", "yuki", ], - "Dragon", "Scales", "1.2", "ScaleBreasts", "Cloacal", ("Cloacal", "Dragon") ), RaceGroup::standard( + "Elephant", vec![ "ElephantMan", ], - "Elephant", "Fur", "1", "Breasts", "", ("Elephant", "Elephant"), ), RaceGroup::standard( + "FoxGirl", vec![ "Alien_Hisa", "kon", "Vulpes", ], - "FoxGirl", "Fur", "1.3", "Petite_FoxGirl_Breasts", "Petite_FoxGirl_", ("Petite_FoxGirl_", ""), ), RaceGroup::standard( + "Elf", vec![ "Alien_Eldar", "AS_WHE_Race", @@ -334,13 +333,13 @@ pub fn racegroup_data_humans() -> Vec { "Sandy_Angel", "ElfRace", ], - "Elf", "Skin", "1.1", "Breasts", "Elf", ("Elf", "Elf"), ), RaceGroup::standard( + "Feline", vec![ "Alien_Nyaron", "ATK_Felinemorph", @@ -355,60 +354,60 @@ pub fn racegroup_data_humans() -> Vec { "Maidnukos", "miko", ], - "Feline", "Fur", "1", "Breasts", "Feline", ("Cat", "Cat"), ), RaceGroup::standard( + "Fish", vec![ "Alien_NiHal", "Alien_Quarren", "Alien_MonCalamari", "IkquanRace", ], - "Fish", "Scales", "0.8", "FeaturelessChest", "Cloacal", ("Cloacal", "Marine"), ), RaceGroup::standard( + "Ghost", vec![ "DRSKT_Race", "HPLovecraft_MistCreature", "MM_WillOWisp", "WoW_Skeleton", ], - "Ghost", "Demon", "0.5", "GhostBreasts", "Ghost", ("Ghost", "Ghost"), ), RaceGroup::standard( + "Ghoul", vec![ "Ghoul", "GlowingGhoul", ], - "Ghoul", "Demon", "0.5", "GhoulBreasts", "Ghoul", ("Ghoul", "Ghoul"), ), RaceGroup::standard( + "Horny", vec![ "Alien_Kijin", ], - "Horny", "Skin", "1.4", "Horny_Breasts", "", ("Horny_", "Horny_"), ), RaceGroup::standard( + "Orc", vec![ "Alien_Orc", "O21_Alien_Orc", @@ -425,13 +424,13 @@ pub fn racegroup_data_humans() -> Vec { "OG_Alien_Grot", "WoW_Orc", ], - "Orc", "Skin", "1.3", "OrcBreasts", "Orc", ("Orc", "Orc"), ), RaceGroup::standard( + "Horse", vec![ "Alien_Bullgor", "Alien_Equium", @@ -444,34 +443,34 @@ pub fn racegroup_data_humans() -> Vec { "Alien_ZPEquium", "WoW_Draenei", ], - "Horse", "Fur", "1.2", "Breasts", "Horse", ("Horse", "Horse"), ), RaceGroup::standard( + "Pig", vec![ "PigMan", ], - "Pig", "Fur", "1", "Breasts", "", ("Pig", "Pig"), ), RaceGroup::standard( + "Raccoon", vec![ "RaccoonMan", "StarWarsRaces_Ewok", ], - "Raccoon", "Fur", "1.1", "Breasts", "", ("", "Raccoon"), ), RaceGroup::standard( + "Reptile", vec![ "O21_Alien_Kobold", "O21_FR_Kobold", @@ -481,13 +480,13 @@ pub fn racegroup_data_humans() -> Vec { "Yokai_Samia", "Naga", ], - "Reptile", "Scales", "0.9", "ScaleBreasts", "Cloacal", ("Cloacal", "Hemi"), ), RaceGroup::standard( + "Rodent", vec![ "ATK_Lagomorph", "Alien_Skaven", @@ -502,29 +501,28 @@ pub fn racegroup_data_humans() -> Vec { "Rotti", "Rabbie", ], - "Rodent", "Fur", "1.3", "Petite_Breasts", "Petite_", ("Rodent", "Rodent"), ), RaceGroup::standard( + "Thrumbo", vec![ "Thrumkin", ], - "Thrumbo", "Fur", "1.2", "Breasts", "Cloacal", ("Cloacal", "Dragon") ), RaceGroup::standard( + "Tree", vec![ "Alien_Dryad", "Alien_DryadWild", "Alien_Tree", ], - "Tree", "Plant", "1", "TreeBreasts", "Tree", @@ -549,7 +547,7 @@ pub fn racegroup_data_humans() -> Vec { m_genitals: "BovinePenis".to_string(), tag: "Fur".to_string(), sex_drive: "1".to_string(), - egg_implant: None, + egg_implant: false, }, RaceGroup { races: vec![ @@ -567,7 +565,7 @@ pub fn racegroup_data_humans() -> Vec { m_genitals: "SlimeTentacles".to_string(), tag: "Slime".to_string(), sex_drive: "1".to_string(), - egg_implant: None, + egg_implant: false, }, ] } @@ -575,6 +573,7 @@ pub fn racegroup_data_humans() -> Vec { pub fn racegroup_data_animals() -> Vec { vec![ RaceGroup::standard_animal( + "GenericMammal", vec![ "Megasloth", "ACPRedPanda", @@ -583,13 +582,13 @@ pub fn racegroup_data_animals() -> Vec { "Yokai_IssunAnimal", "Andrewsarchus", ], - "GenericMammal", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Mammal", ("Mammal", "Mammal"), ), RaceGroup::standard_animal( + "Ape", vec![ "Monkey", "AEXP_Gorilla", @@ -600,14 +599,14 @@ pub fn racegroup_data_animals() -> Vec { "Dinopithecus", "Gigantopithecus", ], - "Ape", - "Fur", "1.1", None, + "Fur", "1.1", "MammalBreasts", "Mammal", ("Mammal", "Monkey"), ), // Arthropods that have aedeagi and ovipores, and reproduce via spermatophores and egg-laying RaceGroup::standard_animal( + "Arthropod", vec![ "AA_AngelMoth", "AA_Atispec", @@ -639,13 +638,13 @@ pub fn racegroup_data_animals() -> Vec { "Arthropleura", "Pulmonoscorpius", ], - "Arthropod", - "Chitin", "0.7", Some(false), + "Chitin", "0.7", "", "Insect", ("Ovipore", "Aedeagus"), ), RaceGroup::standard_animal( + "Avian", vec![ "Cassowary", "Chicken", @@ -694,13 +693,13 @@ pub fn racegroup_data_animals() -> Vec { "Palaeeudyptes", "Titanis", ], - "Avian", - "Feathers", "0.8", Some(false), + "Feathers", "0.8", "", "Cloacal", ("Cloacal", "Cloacal"), ), RaceGroup::standard_animal( + "Canine", vec![ "Fox_Arctic", "Fox_Fennec", @@ -753,24 +752,24 @@ pub fn racegroup_data_animals() -> Vec { "Omnicron", "Fuzztino", ], - "Canine", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Dog", ("Dog", "Dog"), ), RaceGroup::standard_animal( + "CanineSkin", vec![ "AA_RipperHound", ], - "CanineSkin", - "Skin", "0.9", None, + "Skin", "0.9", "MammalBreasts", "Dog", ("Dog", "Dog"), ), // Most even-toed ungulates go here, obviously excluding cetaceans RaceGroup::standard_animal( + "Cervine", vec![ "Alpaca", "Deer", @@ -782,13 +781,13 @@ pub fn racegroup_data_animals() -> Vec { "AEXP_Moose", "RG-WF_WastelandDeer", ], - "Cervine", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Mammal", ("Narrow", "Needle"), ), RaceGroup::standard_animal( + "Crocodilian", vec![ "AA_RoughPlatedMonitor", "AEXP_Crocodile", @@ -796,13 +795,13 @@ pub fn racegroup_data_animals() -> Vec { "Quinkana", "Purussaurus", ], - "Crocodilian", - "Scales", "0.8", Some(false), + "Scales", "0.8", "", "Cloacal", ("Cloacal", "Crocodilian"), ), RaceGroup::standard_animal( + "DinoFeathered", vec![ "AA_PedigreedRaptor", "Dakotaraptor", @@ -813,13 +812,13 @@ pub fn racegroup_data_animals() -> Vec { "Velociraptor", "Yutyrannus", ], - "DinoFeathered", - "Feathers", "1", Some(false), + "Feathers", "1", "", "Cloacal", ("Cloacal", "Dino"), ), RaceGroup::standard_animal( + "DinoScaled", vec![ "Allosaurus", "Ankylosaurus", @@ -848,13 +847,13 @@ pub fn racegroup_data_animals() -> Vec { "TyrannosaurusRex", "Utahraptor", ], - "DinoScaled", - "Scales", "1", Some(false), + "Scales", "1", "", "Cloacal", ("Cloacal", "Dino"), ), RaceGroup::standard_animal( + "Dragon", vec![ "AA_Behemoth", "AA_DecayDrake", @@ -878,13 +877,13 @@ pub fn racegroup_data_animals() -> Vec { "Mystogen", "Voltaic", ], - "Dragon", - "Scales", "1.2", Some(false), + "Scales", "1.2", "", "Cloacal", ("Cloacal", "Dragon"), ), RaceGroup::standard_animal( + "Elephant", vec![ "Elephant", "AA_Gallatross", @@ -900,13 +899,13 @@ pub fn racegroup_data_animals() -> Vec { "WoollyMammoth", "Zygolophodon", ], - "Elephant", - "Fur", "0.9", None, + "Fur", "0.9", "MammalBreasts", "Mammal", ("Elephant", "Elephant"), ), RaceGroup::standard_animal( + "Feline", vec![ "Cat", "Cougar", @@ -959,24 +958,24 @@ pub fn racegroup_data_animals() -> Vec { "Smilodon", "Snow_leopard", ], - "Feline", - "Fur", "1", None, + "Fur", "1", "CatBreasts", "Feline", ("Cat", "Cat"), ), RaceGroup::standard_animal( + "FelineHorny", vec![ "AEXP_Hyena", ], - "FelineHorny", - "Fur", "1.3", None, + "Fur", "1.3", "CatBreasts", "Feline", ("Cat", "Cat"), ), // Rhinos belong here, not with elephants, as they are odd-toed ungulates RaceGroup::standard_animal( + "Horse", vec![ "Donkey", "Horse", @@ -1010,14 +1009,14 @@ pub fn racegroup_data_animals() -> Vec { "Paraceratherium", "Uintatherium", ], - "Horse", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Horse", ("Horse", "Horse"), ), // I know hippos are more closely related to other artiodactyls than to pinnipeds, but their genitalia are strikingly similar due to convergent evolution RaceGroup::standard_animal( + "MarineMammal", vec![ "ACPSpottedSeal", "ACPWalrus", @@ -1026,51 +1025,51 @@ pub fn racegroup_data_animals() -> Vec { "AEXP_Walrus", "Gomphotaria", ], - "MarineMammal", - "Fur", "0.9", None, + "Fur", "0.9", "MammalBreasts", "Mammal", ("Mammal", "Marine"), ), RaceGroup::standard_animal( + "Marsupial", vec![ "AEXP_Kangaroo", "Procoptodon", ], - "Marsupial", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Cloacal", ("Cloacal", "Cloacal"), ), // Marsupials with a bifurcated penis: All except kangaroos and marsupial moles RaceGroup::standard_animal( + "MarsupialBi", vec![ "AEXP_Koala", "AEXP_TasmanianDevil", "Diprotodon", ], - "MarsupialBi", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Cloacal", ("Cloacal", "Hemi"), ), // TODO: Should be single gender RaceGroup::standard_animal( + "Orc", vec![ "OG_Squig", "OG_Squig_Eatin", "OG_Squig_Oily", "OG_Snotling", ], - "Orc", - "Skin", "1", None, + "Skin", "1", "MammalBreasts", "Orc", ("Orc", "Orc"), ), RaceGroup::standard_animal( + "Pig", vec![ "Pig", "WildBoar", @@ -1083,25 +1082,25 @@ pub fn racegroup_data_animals() -> Vec { "MM_ErymanthianBoar", "Daeodon", ], - "Pig", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Mammal", ("Pig", "Pig"), ), RaceGroup::standard_animal( + "Platypus", vec![ "ACPDuckBilledPlatypus", "AEXP_Platypus", ], - "Platypus", - "Fur", "0.9", Some(false), + "Fur", "0.9", "MammalBreasts", "Cloacal", ("Cloacal", "Cloacal"), ), // Mustelids RaceGroup::standard_animal( + "Raccoon", vec![ "Raccoon", "ACPMegaFerret", @@ -1116,13 +1115,13 @@ pub fn racegroup_data_animals() -> Vec { "AEXP_Badger", "Enhydriodon", ], - "Raccoon", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Mammal", ("Mammal", "Raccoon"), ), RaceGroup::standard_animal( + "Reptile", vec![ "Cobra", "Iguana", @@ -1157,14 +1156,14 @@ pub fn racegroup_data_animals() -> Vec { "Rakk", "Titanoboa", ], - "Reptile", - "Scales", "0.8", Some(false), + "Scales", "0.8", "", "Cloacal", ("Cloacal", "Hemi"), ), // Rodents and Lagomorphs RaceGroup::standard_animal( + "Rodent", vec![ "Alphabeaver", "Boomrat", @@ -1215,26 +1214,26 @@ pub fn racegroup_data_animals() -> Vec { "Josephoartigasia", "Pika", ], - "Rodent", - "Fur", "1.1", None, + "Fur", "1.1", "MammalBreasts", "Mammal", ("Mammal", "Rodent"), ), RaceGroup::standard_animal( + "Tentacle", vec![ "AA_Helixien", "AA_Plasmorph", "AA_SandSquid", "AA_TarGuzzler", ], - "Tentacle", - "Slime", "0.8", Some(false), + "Slime", "0.8", "", "Cloacal", ("Cloacal", "Tentacle"), ), RaceGroup::standard_animal( + "Thrumbo", vec![ "Thrumbo", "GR_Thrumbear", @@ -1252,26 +1251,26 @@ pub fn racegroup_data_animals() -> Vec { "Archothrumbo", "RoyalThrumbo", ], - "Thrumbo", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Cloacal", ("Cloacal", "Dragon"), ), RaceGroup::standard_animal( + "Turtle", vec![ "Tortoise", "AEXP_DesertTortoise", "Archotortoise", "Megalochelys", ], - "Turtle", - "Scales", "0.8", Some(false), + "Scales", "0.8", "", "Cloacal", ("Cloacal", "Turtle"), ), RaceGroup::standard_animal( + "Ursine", vec![ "Bear", "Bear_Grizzly", @@ -1294,19 +1293,18 @@ pub fn racegroup_data_animals() -> Vec { "AnimaBear", "ShortfacedBear", ], - "Ursine", - "Fur", "1", None, + "Fur", "1", "MammalBreasts", "Mammal", ("Mammal", "Bear"), ), // AA RaceGroup::standard_animal( + "AA_SandProwler", vec![ "AA_SandProwler", ], - "AA_SandProwler", - "Scales", "1", None, + "Scales", "1", "CatBreasts", "Feline", ("Cat", "Cat"), @@ -1406,7 +1404,7 @@ pub fn racegroup_data_animals() -> Vec { m_genitals: "BovinePenis".to_string(), tag: "Fur".to_string(), sex_drive: "1".to_string(), - egg_implant: None, + egg_implant: false, }, // Arthropods that reproduce through oviposition RaceGroup { @@ -1439,7 +1437,7 @@ pub fn racegroup_data_animals() -> Vec { m_genitals: "OvipositorM".to_string(), tag: "Chitin".to_string(), sex_drive: "1".to_string(), - egg_implant: Some(true), + egg_implant: true, }, RaceGroup { races: vec![ @@ -1454,7 +1452,7 @@ pub fn racegroup_data_animals() -> Vec { m_genitals: "OvipositorM".to_string(), tag: "Chitin".to_string(), sex_drive: "1.5".to_string(), - egg_implant: Some(true), + egg_implant: true, }, ] } \ No newline at end of file