Skip to content

Commit

Permalink
Changes default_mutant_bodyparts list to be index based (#25174)
Browse files Browse the repository at this point in the history
* Changes default_mutant_bodyparts list be index based

* Update genitals.dm

* Update synthetic.dm

* Update podweak.dm

* Sorry teshari

* Makes the indexes named

* Change name
  • Loading branch information
vinylspiders authored and FFMirrorBot committed Nov 22, 2023
1 parent 7e810b8 commit b1e315f
Show file tree
Hide file tree
Showing 25 changed files with 301 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/~skyrat_defines/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
#define MUTANT_INDEX_COLOR_LIST "color"
#define MUTANT_INDEX_EMISSIVE_LIST "emissive"

// Defines for default mutant bodyparts indexes
#define MUTANTPART_NAME 1
#define MUTANTPART_CAN_RANDOMIZE 2

// Defines for markings indexes
#define MARKING_INDEX_COLOR 1
#define MARKING_INDEX_EMISSIVE 2
Expand Down
11 changes: 11 additions & 0 deletions modular_skyrat/master_files/code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,28 @@
mutant_bodyparts -= key
continue
if(!GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]]) // The individual accessory no longer exists
<<<<<<< HEAD

Check failure on line 125 in modular_skyrat/master_files/code/modules/client/preferences.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got '<<', expected one of: newline, '/', identifier
mutant_bodyparts[key][MUTANT_INDEX_NAME] = pref_species.default_mutant_bodyparts[key]
=======
mutant_bodyparts[key][MUTANT_INDEX_NAME] = GLOB.default_mutant_bodyparts[pref_species.name[key][MUTANTPART_NAME]]
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
validate_color_keys_for_part(key) // Validate the color count of each accessory that wasnt removed

// Add any missing accessories
for(var/key in target_bodyparts)
if(!mutant_bodyparts[key])
var/datum/sprite_accessory/SA
<<<<<<< HEAD
if(target_bodyparts[key] == ACC_RANDOM)
SA = random_accessory_of_key_for_species(key, pref_species)
else
SA = GLOB.sprite_accessories[key][target_bodyparts[key]]
=======
if(target_bodyparts[key][MUTANTPART_CAN_RANDOMIZE])
SA = random_accessory_of_key_for_species(key, pref_species)
else
SA = GLOB.sprite_accessories[key][target_bodyparts[key][MUTANTPART_NAME]]
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
var/final_list = list()
final_list[MUTANT_INDEX_NAME] = SA.name
final_list[MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species)
Expand Down
7 changes: 7 additions & 0 deletions modular_skyrat/modules/better_vox/code/vox_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
LOADOUT_ITEM_EARS = VOX_PRIMALIS_EARS_ICON,
)

<<<<<<< HEAD
=======
/datum/species/vox_primalis/get_default_mutant_bodyparts()
return list(
"tail" = list("Vox Primalis Tail", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/datum/species/vox_primalis/pre_equip_species_outfit(datum/job/job, mob/living/carbon/human/equipping, visuals_only)
. = ..()
Expand Down
15 changes: 15 additions & 0 deletions modular_skyrat/modules/customization/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@
if(P.generic && !GLOB.generic_accessories[P.key])
GLOB.generic_accessories[P.key] = P.generic

<<<<<<< HEAD
=======
/proc/make_default_mutant_bodypart_references()
// Build the global list for default species' mutant_bodyparts
for(var/path in subtypesof(/datum/species))
var/datum/species/species_type = path
var/datum/species/species_instance = new species_type
if(!isnull(species_instance.name))
GLOB.default_mutant_bodyparts[species_instance.name] = species_instance.get_default_mutant_bodyparts()
if(species_instance.can_have_genitals)
for(var/genital in GLOB.possible_genitals)
GLOB.default_mutant_bodyparts[species_instance.name] += list((genital) = list("None", FALSE))
qdel(species_instance)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/proc/make_body_marking_references()
// Here we build the global list for all body markings
for(var/path in subtypesof(/datum/body_marking))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,30 @@ GLOBAL_LIST_EMPTY(customizable_races)

/datum/species/human/felinid
mutant_bodyparts = list()
<<<<<<< HEAD
default_mutant_bodyparts = list("tail" = "Cat", "ears" = "Cat")

/datum/species/human
mutant_bodyparts = list()
default_mutant_bodyparts = list("ears" = "None", "tail" = "None", "wings" = "None")
=======

/datum/species/human/felinid/get_default_mutant_bodyparts()
return list(
"tail" = list("Cat", FALSE),
"ears" = list("Cat", FALSE),
)

/datum/species/human
mutant_bodyparts = list()

/datum/species/human/get_default_mutant_bodyparts()
return list(
"ears" = list("None", FALSE),
"tail" = list("None", FALSE),
"wings" = list("None", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/datum/species/mush
mutant_bodyparts = list()
Expand Down Expand Up @@ -85,10 +104,17 @@ GLOBAL_LIST_EMPTY(customizable_races)
bodyparts_to_add.Remove(genital)
for(var/key in bodyparts_to_add)
var/datum/sprite_accessory/SP
<<<<<<< HEAD
if(bodyparts_to_add[key] == ACC_RANDOM)
SP = random_accessory_of_key_for_species(key, src)
else
SP = GLOB.sprite_accessories[key][bodyparts_to_add[key]]
=======
if(default_bodypart_data[key][MUTANTPART_CAN_RANDOMIZE])
SP = random_accessory_of_key_for_species(key, src)
else
SP = GLOB.sprite_accessories[key][bodyparts_to_add[key][MUTANTPART_NAME]]
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
if(!SP)
CRASH("Cant find accessory of [key] key, [bodyparts_to_add[key]] name, for species [id]")
var/list/color_list = SP.get_default_color(features, src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
/// This variable stores the timer datum which appears if the mob becomes wet
var/dry_up_timer = TIMER_ID_NULL

<<<<<<< HEAD
=======
/datum/species/akula/get_default_mutant_bodyparts()
return list(
"tail" = list("Akula", TRUE),
"legs" = list("Normal Legs", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/datum/species/akula/get_species_description()
return placeholder_description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/mutant/aquatic,
)

<<<<<<< HEAD
=======
/datum/species/aquatic/get_default_mutant_bodyparts()
return list(
"tail" = list("Shark", TRUE),
"snout" = list("Shark", TRUE),
"horns" = list("None", FALSE),
"ears" = list("Hammerhead", TRUE),
"legs" = list("Normal Legs", FALSE),
"wings" = list("None", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/obj/item/organ/internal/tongue/aquatic
liked_foodtypes = SEAFOOD | MEAT | FRUIT | GORE
disliked_foodtypes = CLOTH | GROSS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
//i dont have to worry about sprites due to limbs_icon, thank god
//also the head needs to be normal for hair to work

<<<<<<< HEAD
=======
/datum/species/ghoul/get_default_mutant_bodyparts()
return list(
"tail" = list("None", FALSE),
"ears" = list("None", FALSE),
"legs" = list("Normal Legs", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/proc/proof_ghoul_features(list/inFeatures)
// Missing Defaults in DNA? Randomize!
if(inFeatures["ghoulcolor"] == null || inFeatures["ghoulcolor"] == "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
skinned_type = /obj/item/stack/sheet/animalhide/human
veteran_only = TRUE

<<<<<<< HEAD
=======
/datum/species/hemophage/get_default_mutant_bodyparts()
return list(
"legs" = list("Normal Legs", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/datum/species/hemophage/check_roundstart_eligible()
if(check_holidays(HALLOWEEN))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@
payday_modifier = 1.0
examine_limb_id = SPECIES_HUMAN

<<<<<<< HEAD
=======
/datum/species/humanoid/get_default_mutant_bodyparts()
return list(
"tail" = list("None", FALSE),
"snout" = list("None", FALSE),
"ears" = list("None", FALSE),
"legs" = list("Normal Legs", FALSE),
"wings" = list("None", FALSE),
"taur" = list("None", FALSE),
"horns" = list("None", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/datum/species/humanoid/get_species_description()
return "This is a template species for your own creations!"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@
)
eyes_icon = 'modular_skyrat/modules/organs/icons/insect_eyes.dmi'

<<<<<<< HEAD
=======
/datum/species/insect/get_default_mutant_bodyparts()
return list(
"tail" = list("None", FALSE),
"snout" = list("None", FALSE),
"horns" = list("None", FALSE),
"ears" = list("None", FALSE),
"legs" = list("Normal Legs", FALSE),
"taur" = list("None", FALSE),
"fluff" = list("None", FALSE),
"wings" = list("Bee", FALSE),
"moth_antennae" = list("None", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/datum/species/insect/get_species_description()
return placeholder_description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,25 @@
)
payday_modifier = 1.0

<<<<<<< HEAD
/datum/species/lizard/randomize_features(mob/living/carbon/human/human_mob)
=======
/datum/species/lizard/get_default_mutant_bodyparts()
return list(
"tail" = list("Smooth", TRUE),
"snout" = list("Sharp + Light", TRUE),
"spines" = list("Long + Membrane", TRUE),
"frills" = list("Short", TRUE),
"horns" = list("Curled", TRUE),
"body_markings" = list("Light Belly", TRUE),
"legs" = list(DIGITIGRADE_LEGS,FALSE),
"taur" = list("None", FALSE),
"wings" = list("None", FALSE),
)

/datum/species/lizard/randomize_features()
var/list/features = ..()
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
var/main_color = "#[random_color()]"
var/second_color
var/third_color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/mutant,
)

<<<<<<< HEAD
=======
/datum/species/mammal/get_default_mutant_bodyparts()
return list(
"tail" = list("Husky", TRUE),
"snout" = list("Husky", TRUE),
"horns" = list("None", FALSE),
"ears" = list("Husky", TRUE),
"legs" = list("Normal Legs", TRUE),
"taur" = list("None", FALSE),
"fluff" = list("None", FALSE),
"wings" = list("None", FALSE),
"head_acc" = list("None", FALSE),
"neck_acc" = list("None", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/obj/item/organ/internal/tongue/mammal
liked_foodtypes = GRAIN | MEAT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<<<<<<< HEAD
/datum/species/monkey
default_mutant_bodyparts = list("tail" = "Monkey")
=======
/datum/species/monkey/get_default_mutant_bodyparts()
return list(
"tail" = list("Monkey", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/datum/species/monkey/prepare_human_for_preview(mob/living/carbon/human/monke)
regenerate_organs(monke, src, visual_only = TRUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,22 @@
TRAIT_MUTANT_COLORS,
)

<<<<<<< HEAD
/datum/species/moth/randomize_features(mob/living/carbon/human/human_mob)
human_mob.dna.features["mcolor"] = "#E5CD99"
=======
/datum/species/moth/get_default_mutant_bodyparts()
return list(
"fluff" = list("Plain", FALSE),
"wings" = list("Moth (Plain)", TRUE),
"moth_antennae" = list("Plain", TRUE),
)

/datum/species/moth/randomize_features()
var/list/features = ..()
features["mcolor"] = "#E5CD99"
return features
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/datum/species/moth/get_random_body_markings(list/passed_features)
var/name = "None"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@
TRAIT_LITERATE,
)
mutant_bodyparts = list()
<<<<<<< HEAD
default_mutant_bodyparts = list(
"pod_hair" = ACC_RANDOM,
"legs" = "Normal Legs"
=======
payday_modifier = 1.0

/datum/species/pod/get_default_mutant_bodyparts()
return list(
"pod_hair" = list("Ivy", TRUE),
"legs" = list("Normal Legs", FALSE),
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
)
payday_modifier = 1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@
hair_alpha = 160 //a notch brighter so it blends better.
facial_hair_alpha = 160

<<<<<<< HEAD
=======
/datum/species/jelly/get_default_mutant_bodyparts()
return list(
"tail" = list("None", FALSE),
"snout" = list("None", FALSE),
"ears" = list("None", FALSE),
"legs" = list("Normal Legs", FALSE),
"taur" = list("None", FALSE),
"wings" = list("None", FALSE),
"horns" = list("None", FALSE),
"spines" = list("None", FALSE),
"frills" = list("None", FALSE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/datum/species/jelly/get_species_description()
return placeholder_description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/mutant/skrell,
)

<<<<<<< HEAD
=======
/datum/species/skrell/get_default_mutant_bodyparts()
return list(
"skrell_hair" = list("Male", TRUE),
)

>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))
/datum/species/skrell/get_species_description()
return placeholder_description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/mutant,
)

<<<<<<< HEAD
=======
/datum/species/tajaran/get_default_mutant_bodyparts()
return list(
"tail" = list("Cat (Big)", TRUE),
"snout" = list("Cat, normal", TRUE),
"ears" = list("Cat, normal", TRUE),
"legs" = list("Normal Legs", FALSE),
)
>>>>>>> ec0245b89 (Changes default_mutant_bodyparts list to be index based (#25174))

/obj/item/organ/internal/tongue/cat/tajaran
liked_foodtypes = GRAIN | MEAT
Expand Down
Loading

0 comments on commit b1e315f

Please sign in to comment.