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 1/3] 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" From dd7046cbd1b4d747c0b7bcfbd5f0b16e0ad34f54 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 19 Mar 2020 16:53:58 +0100 Subject: [PATCH 2/3] no comment --- code/__DEFINES/citadel_defines.dm | 2 ++ code/__HELPERS/mobs.dm | 2 +- code/modules/client/preferences.dm | 6 +++--- code/modules/client/preferences_savefile.dm | 2 +- modular_citadel/code/modules/arousal/genitals.dm | 2 +- modular_citadel/code/modules/arousal/organs/breasts.dm | 4 ++-- modular_citadel/code/modules/arousal/organs/penis.dm | 1 + modular_citadel/code/modules/arousal/organs/testicles.dm | 2 +- modular_citadel/code/modules/arousal/organs/vagina.dm | 1 + 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 62dde9d299..185d5d8860 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -40,6 +40,8 @@ #define DEF_BREASTS_SHAPE "Pair" +#define DEF_VAGINA_SHAPE "Human" + #define COCK_SIZE_MIN 1 #define COCK_SIZE_DEF 6 #define COCK_SIZE_MAX 20 diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 66e855486b..d1ebcb1cd7 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -192,7 +192,7 @@ "balls_amount" = 2, "balls_sack_size" = BALLS_SACK_SIZE_DEF, "balls_size" = BALLS_SIZE_DEF, - "balls_shape" = "Single", + "balls_shape" = DEF_BALLS_SHAPE, "balls_cum_rate" = CUM_RATE, "balls_cum_mult" = CUM_RATE_MULT, "balls_efficiency" = CUM_EFFICIENCY, diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a7c7912ccf..331f4aa41f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -121,7 +121,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "taur" = "None", "genitals_use_skintone" = FALSE, "has_cock" = FALSE, - "cock_shape" = "Human", + "cock_shape" = DEF_COCK_SHAPE, "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "fff", @@ -150,10 +150,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) "has_breasts" = FALSE, "breasts_color" = "fff", "breasts_size" = BREASTS_SIZE_DEF, - "breasts_shape" = "Pair", + "breasts_shape" = DEF_BREASTS_SHAPE, "breasts_producing" = FALSE, "has_vag" = FALSE, - "vag_shape" = "Human", + "vag_shape" = DEF_VAGINA_SHAPE, "vag_color" = "fff", "vag_clits" = 1, "vag_clit_diam" = 0.25, diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 289fe7da6c..4ca0ce8dba 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -514,7 +514,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car 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) - + features["vag_shape"] = sanitize_inlist(features["vag_shape"], GLOB.vagina_shapes_list, DEF_VAGINA_SHAPE) joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole)) //Validate job prefs diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 7cf8fb8ff9..fbfb6f7fd5 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -1,7 +1,7 @@ /obj/item/organ/genital color = "#fcccb3" w_class = WEIGHT_CLASS_NORMAL - var/shape = "human" + var/shape var/sensitivity = 1 // wow if this were ever used that'd be cool but it's not but i'm keeping it for my unshit code var/genital_flags //see citadel_defines.dm var/masturbation_verb = "masturbate" diff --git a/modular_citadel/code/modules/arousal/organs/breasts.dm b/modular_citadel/code/modules/arousal/organs/breasts.dm index f3ce834838..bfa506da6d 100644 --- a/modular_citadel/code/modules/arousal/organs/breasts.dm +++ b/modular_citadel/code/modules/arousal/organs/breasts.dm @@ -8,10 +8,10 @@ icon = 'modular_citadel/icons/obj/genitals/breasts.dmi' zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_BREASTS - size = "c" //refer to the breast_values static list below for the cups associated number values + size = BREASTS_SIZE_DEF // "c". Refer to the breast_values static list below for the cups associated number values fluid_id = /datum/reagent/consumable/milk fluid_rate = MILK_RATE - shape = "pair" + shape = DEF_BREASTS_SHAPE genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_FUID_PRODUCTION|GENITAL_CAN_AROUSE masturbation_verb = "massage" arousal_verb = "Your breasts start feeling sensitive" diff --git a/modular_citadel/code/modules/arousal/organs/penis.dm b/modular_citadel/code/modules/arousal/organs/penis.dm index c9eb0769cf..294ac6c877 100644 --- a/modular_citadel/code/modules/arousal/organs/penis.dm +++ b/modular_citadel/code/modules/arousal/organs/penis.dm @@ -11,6 +11,7 @@ genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE linked_organ_slot = ORGAN_SLOT_TESTICLES fluid_transfer_factor = 0.5 + shape = DEF_COCK_SHAPE size = 2 //arbitrary value derived from length and diameter for sprites. layer_index = PENIS_LAYER_INDEX var/length = 6 //inches diff --git a/modular_citadel/code/modules/arousal/organs/testicles.dm b/modular_citadel/code/modules/arousal/organs/testicles.dm index eb6c1536cb..ff2422f082 100644 --- a/modular_citadel/code/modules/arousal/organs/testicles.dm +++ b/modular_citadel/code/modules/arousal/organs/testicles.dm @@ -11,7 +11,7 @@ linked_organ_slot = ORGAN_SLOT_PENIS genital_flags = CAN_MASTURBATE_WITH|MASTURBATE_LINKED_ORGAN|GENITAL_FUID_PRODUCTION var/size_name = "average" - shape = "Single" + shape = DEF_BALLS_SHAPE var/sack_size = BALLS_SACK_SIZE_DEF fluid_id = /datum/reagent/consumable/semen masturbation_verb = "massage" diff --git a/modular_citadel/code/modules/arousal/organs/vagina.dm b/modular_citadel/code/modules/arousal/organs/vagina.dm index 311afe75b0..91c3b8b8e9 100644 --- a/modular_citadel/code/modules/arousal/organs/vagina.dm +++ b/modular_citadel/code/modules/arousal/organs/vagina.dm @@ -6,6 +6,7 @@ zone = BODY_ZONE_PRECISE_GROIN slot = "vagina" size = 1 //There is only 1 size right now + shape = DEF_VAGINA_SHAPE genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE masturbation_verb = "finger" arousal_verb = "You feel wetness on your crotch" From e6f40cce1421987413979fdb2fb55753f41cc7c5 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 19 Mar 2020 17:50:08 +0100 Subject: [PATCH 3/3] hex --- code/modules/client/preferences_savefile.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 877e2c40bc..350fe71317 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -545,12 +545,18 @@ 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) features["vag_shape"] = sanitize_inlist(features["vag_shape"], GLOB.vagina_shapes_list, DEF_VAGINA_SHAPE) + features["breasts_color"] = sanitize_hexcolor(features["breasts_color"], 3, FALSE, "FFF") + features["cock_color"] = sanitize_hexcolor(features["cock_color"], 3, FALSE, "FFF") + features["balls_color"] = sanitize_hexcolor(features["balls_color"], 3, FALSE, "FFF") + features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, FALSE, "FFF") + features["flavor_text"] = copytext(features["flavor_text"], 1, MAX_FLAVOR_LEN) joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))