[no gbp] Allows anyone to use the larger part sizes (#29595)

Balls 2.0
This commit is contained in:
Waterpig
2024-08-30 14:57:17 +07:00
committed by GitHub
parent 8aa09073e8
commit 7c226fb45d
3 changed files with 4 additions and 40 deletions
-6
View File
@@ -70,19 +70,13 @@
//In inches
#define PENIS_MIN_GIRTH PENIS_MIN_LENGTH
#define PENIS_MAX_GIRTH 20
/// for non oversized mobs with a 'normal' body size
#define PENIS_MAX_GIRTH_NORMAL_SIZED 15
#define PENIS_DEFAULT_GIRTH 5 // a lil big but not by much
#define PENIS_MIN_LENGTH 1
#define PENIS_MAX_LENGTH 36
/// for non oversized mobs with a 'normal' body size
#define PENIS_MAX_LENGTH_NORMAL_SIZED 20
#define PENIS_DEFAULT_LENGTH 6 //still a lil long but not insane
#define TESTICLES_MIN_SIZE 0
#define TESTICLES_MAX_SIZE 6
/// for non oversized mobs with a 'normal' body size
#define TESTICLES_MAX_NORMAL_SIZED 3
#define SHEATH_NONE "None"
#define SHEATH_NORMAL "Sheath"
@@ -199,24 +199,9 @@
var/part_enabled = is_factual_sprite_accessory(relevant_mutant_bodypart, preferences.read_preference(/datum/preference/choiced/genital/penis))
return erp_allowed && part_enabled && (passed_initial_check || allowed)
/// The difference between the absolute max length and the length for normal sized mobs
#define PENIS_LENGTH_ABOVE_NORMAL PENIS_MAX_LENGTH - PENIS_MAX_LENGTH_NORMAL_SIZED
/datum/preference/numeric/penis_length/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
// Adjust allowed size based on character size
var/body_size = preferences?.read_preference(/datum/preference/numeric/body_size) || BODY_SIZE_NORMAL
var/has_oversized_quirk = preferences?.all_quirks.Find(/datum/quirk/oversized::name)
// Clamp this for normal sized characters. Max allowed size is proportional to the mob's body_size, rounded up.
if(!has_oversized_quirk)
var/adjusted_size = PENIS_MAX_LENGTH_NORMAL_SIZED
if(body_size > 1)
adjusted_size = ceil(round(PENIS_MAX_LENGTH_NORMAL_SIZED, step) + ((((body_size - round(1, step)) * round(2, step))) * round(PENIS_LENGTH_ABOVE_NORMAL, step))) // floating point inaccuracy fun
if(value > adjusted_size)
value = adjusted_size
target.dna.features["penis_size"] = value
#undef PENIS_LENGTH_ABOVE_NORMAL
/datum/preference/numeric/penis_length/create_default_value() // if you change from this to PENIS_MAX_LENGTH the game should laugh at you
return round(max(PENIS_MIN_LENGTH, PENIS_DEFAULT_LENGTH))
@@ -235,24 +220,9 @@
var/part_enabled = is_factual_sprite_accessory(relevant_mutant_bodypart, preferences.read_preference(/datum/preference/choiced/genital/penis))
return erp_allowed && part_enabled && (passed_initial_check || allowed)
/// The difference between the absolute max girth and the girth for normal sized mobs
#define PENIS_GIRTH_ABOVE_NORMAL PENIS_MAX_GIRTH - PENIS_MAX_GIRTH_NORMAL_SIZED
/datum/preference/numeric/penis_girth/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
// Adjust allowed size based on character size
var/body_size = preferences?.read_preference(/datum/preference/numeric/body_size) || BODY_SIZE_NORMAL
var/has_oversized_quirk = preferences?.all_quirks.Find(/datum/quirk/oversized::name)
// Clamp this for normal sized characters. Max allowed size is proportional to the mob's body_size, rounded up.
if(!has_oversized_quirk)
var/adjusted_size = PENIS_MAX_GIRTH_NORMAL_SIZED
if(body_size > 1)
adjusted_size = ceil(round(PENIS_MAX_GIRTH_NORMAL_SIZED, step) + ((((body_size - round(1, step)) * round(2, step))) * round(PENIS_GIRTH_ABOVE_NORMAL, step))) // floating point inaccuracy fun
if(value > adjusted_size)
value = adjusted_size
target.dna.features["penis_girth"] = value
#undef PENIS_GIRTH_ABOVE_NORMAL
/datum/preference/numeric/penis_girth/create_default_value()
return round(max(PENIS_MIN_GIRTH, PENIS_DEFAULT_GIRTH))
@@ -352,8 +322,8 @@
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "balls_size"
relevant_mutant_bodypart = ORGAN_SLOT_TESTICLES
minimum = 0
maximum = 6
minimum = TESTICLES_MIN_SIZE
maximum = TESTICLES_MAX_SIZE
/datum/preference/numeric/balls_size/is_accessible(datum/preferences/preferences)
var/passed_initial_check = ..(preferences)
@@ -259,7 +259,7 @@
layers = EXTERNAL_ADJACENT | EXTERNAL_BEHIND
/obj/item/organ/external/genital/testicles/update_genital_icon_state()
var/measured_size = clamp(genital_size, 1, 6)
var/measured_size = clamp(genital_size, 1, TESTICLES_MAX_SIZE)
var/passed_string = "testicles_[genital_type]_[measured_size]"
if(uses_skintones)
passed_string += "_s"
@@ -283,7 +283,7 @@
/obj/item/organ/external/genital/testicles/get_sprite_size_string()
var/measured_size = FLOOR(genital_size,1)
measured_size = clamp(measured_size, 0, 6)
measured_size = clamp(measured_size, 0, TESTICLES_MAX_SIZE)
var/passed_string = "[genital_type]_[measured_size]"
if(uses_skintones)
passed_string += "_s"