From bd9e195b11d4f01a3129c4f42bbfb791d86fb04a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 19 Mar 2020 16:41:19 +0100 Subject: [PATCH] shapes and sizes sanitized. --- code/__DEFINES/citadel_defines.dm | 9 +++++++++ code/__HELPERS/mobs.dm | 4 ++-- code/modules/client/preferences.dm | 6 +++--- code/modules/client/preferences_savefile.dm | 6 ++++++ tgstation.dme | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index f1f0d45e90..62dde9d299 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -36,13 +36,20 @@ #define CAN_CLIMAX_WITH (1<<7) #define GENITAL_CAN_AROUSE (1<<8) +#define BREASTS_SIZE_DEF "c" //lowercase cause those sprite accessory don't use uppercased letters. + +#define DEF_BREASTS_SHAPE "Pair" + #define COCK_SIZE_MIN 1 +#define COCK_SIZE_DEF 6 #define COCK_SIZE_MAX 20 #define COCK_DIAMETER_RATIO_MAX 0.42 #define COCK_DIAMETER_RATIO_DEF 0.25 #define COCK_DIAMETER_RATIO_MIN 0.15 +#define DEF_COCK_SHAPE "Human" + #define KNOT_GIRTH_RATIO_MAX 3 #define KNOT_GIRTH_RATIO_DEF 2.1 #define KNOT_GIRTH_RATIO_MIN 1.25 @@ -50,6 +57,8 @@ #define BALLS_VOLUME_BASE 25 #define BALLS_VOLUME_MULT 1 +#define DEF_BALLS_SHAPE "Single" + #define BALLS_SIZE_MIN 1 #define BALLS_SIZE_DEF 2 #define BALLS_SIZE_MAX 3 diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 7852ab9d06..66e855486b 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -181,7 +181,7 @@ "genitals_use_skintone" = FALSE, "has_cock" = FALSE, "cock_shape" = pick(GLOB.cock_shapes_list), - "cock_length" = 6, + "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "has_sheath" = FALSE, @@ -209,7 +209,7 @@ "has_breasts" = FALSE, "breasts_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "breasts_size" = pick(GLOB.breasts_size_list), - "breasts_shape" = "Pair", + "breasts_shape" = DEF_BREASTS_SHAPE, "breasts_producing" = FALSE, "has_vag" = FALSE, "vag_shape" = pick(GLOB.vagina_shapes_list), diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a9deba070a..a7c7912ccf 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -122,7 +122,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "genitals_use_skintone" = FALSE, "has_cock" = FALSE, "cock_shape" = "Human", - "cock_length" = 6, + "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "fff", "has_sheath" = FALSE, @@ -132,7 +132,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "balls_color" = "fff", "balls_amount" = 2, "balls_sack_size" = BALLS_SACK_SIZE_DEF, - "balls_shape" = "Single", + "balls_shape" = DEF_BALLS_SHAPE, "balls_size" = BALLS_SIZE_DEF, "balls_cum_rate" = CUM_RATE, "balls_cum_mult" = CUM_RATE_MULT, @@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "eggsack_egg_size" = EGG_GIRTH_DEF, "has_breasts" = FALSE, "breasts_color" = "fff", - "breasts_size" = "C", + "breasts_size" = BREASTS_SIZE_DEF, "breasts_shape" = "Pair", "breasts_producing" = FALSE, "has_vag" = FALSE, diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 86148ee17c..289fe7da6c 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -509,6 +509,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["insect_fluff"] = sanitize_inlist(features["insect_fluff"], GLOB.insect_fluffs_list) features["insect_markings"] = sanitize_inlist(features["insect_markings"], GLOB.insect_markings_list, "None") features["insect_wings"] = sanitize_inlist(features["insect_wings"], GLOB.insect_wings_list) + features["breasts_size"] = sanitize_inlist(features["breasts_size"], GLOB.breasts_size_list, BREASTS_SIZE_DEF) + features["breasts_shape"] = sanitize_inlist(features["breasts_shape"], GLOB.breasts_shapes_list, DEF_BREASTS_SHAPE) + features["cock_shape"] = sanitize_inlist(features["cock_shape"], GLOB.cock_shapes_list, DEF_COCK_SHAPE) + features["cock_length"] = sanitize_integer(features["cock_length"], COCK_SIZE_MIN, COCK_SIZE_MAX, COCK_SIZE_DEF) + features["balls_shape"] = sanitize_inlist(features["balls_shape"], GLOB.balls_shapes_list, DEF_BALLS_SHAPE) + joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole)) //Validate job prefs diff --git a/tgstation.dme b/tgstation.dme index 06c841e021..8b04b3deac 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1498,6 +1498,7 @@ #include "code\modules\antagonists\swarmer\swarmer.dm" #include "code\modules\antagonists\swarmer\swarmer_event.dm" #include "code\modules\antagonists\traitor\datum_traitor.dm" +#include "code\modules\antagonists\traitor\syndicate_contract.dm" #include "code\modules\antagonists\traitor\classes\ai.dm" #include "code\modules\antagonists\traitor\classes\assassin.dm" #include "code\modules\antagonists\traitor\classes\freeform.dm" @@ -1506,7 +1507,6 @@ #include "code\modules\antagonists\traitor\classes\martyr.dm" #include "code\modules\antagonists\traitor\classes\subterfuge.dm" #include "code\modules\antagonists\traitor\classes\traitor_class.dm" -#include "code\modules\antagonists\traitor\syndicate_contract.dm" #include "code\modules\antagonists\traitor\equipment\contractor.dm" #include "code\modules\antagonists\traitor\equipment\Malf_Modules.dm" #include "code\modules\antagonists\traitor\IAA\internal_affairs.dm"