From a9caceb001d9225911f39047260ae44e8bf22c17 Mon Sep 17 00:00:00 2001 From: timothyteakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 14 Aug 2020 02:27:54 +0100 Subject: [PATCH] insect fluff! --- code/_globalvars/lists/flavor_misc.dm | 2 +- code/modules/client/preferences_savefile.dm | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index b7d3d71574..7c2ebc5f0c 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -235,6 +235,6 @@ GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/o //unlocked parts are those that anyone can choose on customisation regardless //parts not in unlocked, but in all, are thus locked GLOBAL_LIST_INIT(all_mutant_parts, list("tail_lizard" = "Tail", "mam_tail" = "Tail", "tail_human" = "Tail", "snout" = "Snout", "frills" = "Frills", "spines" = "Spines", "body_markings" = "Body Markings", "mam_body_markings" = "Species Markings" , "mam_ears" = "Ears", "ears" = "Ears", "mam_snouts" = "Snout", "legs" = "Legs", "deco_wings" = "Decorative Wings", "insect_wings" = "Insect Wings", "insect_fluff" = "Insect Fluff", "taur" = "Tauric Body", "insect_markings" = "Insect Markings", "wings" = "Wings", "xenohead" = "Caste Head", "xenotail" = "Tail", "xenodorsal" = "Dorsal Spines", "ipc_screen" = "Screen", "ipc_antenna" = "Antenna", "meat_type" = "Meat Type", "horns" = "Horns")) -GLOBAL_LIST_INIT(unlocked_mutant_parts, list("horns")) +GLOBAL_LIST_INIT(unlocked_mutant_parts, list("horns", "insect_fluff")) //parts in either of the above two lists that require a second option that allows them to be coloured GLOBAL_LIST_INIT(colored_mutant_parts, list("insect_wings" = "wings_color", "deco_wings" = "wings_color", "horns" = "horns_color")) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index dc66008027..a5d7b3f8ca 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -5,7 +5,7 @@ // You do not need to raise this if you are adding new values that have sane defaults. // Only raise this value when changing the meaning/format/name/layout of an existing value // where you would want the updater procs below to run -#define SAVEFILE_VERSION_MAX 34 +#define SAVEFILE_VERSION_MAX 35 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -200,11 +200,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["silicon_flavor_text"] = html_encode(features["silicon_flavor_text"]) features["ooc_notes"] = html_encode(features["ooc_notes"]) - if(current_version < 34) - if(features["horns"] && S["species"]) //check for saved horn data + if(current_version < 35) + if(S["species"]) var/datum/species/loaded_species = GLOB.species_list[S["species"]] - if(loaded_species && !initial(loaded_species.mutant_bodyparts)["horns"]) //if saved horn data plus previously no initial horns were allowed on their race, wipe the horns - features["horns"] = null + if(loaded_species) + for(var/unlocked_part in GLOB.unlocked_mutant_parts) + if(features[unlocked_part]) //check for saved data on an unlocked part + if(!initial(loaded_species.mutant_bodyparts)[unlocked_part]) //if saved horn data plus previously no initial horns were allowed on their race, wipe the horns + features[unlocked_part] = null /datum/preferences/proc/load_path(ckey,filename="preferences.sav")