From 35058573564ac51ec2f8cacb1e70b51acb3c09e0 Mon Sep 17 00:00:00 2001 From: Mosley <93835010+MosleyTheMalO@users.noreply.github.com> Date: Thu, 26 Dec 2024 04:34:08 -0500 Subject: [PATCH] implements sexual potency and lust tolerance --- .../code/interaction_datum.dm | 4 +-- .../lewd_items/code/lewd_arousal/pleasure.dm | 2 +- .../client/preferences/erp_preferences.dm | 29 +++++++++++++++---- .../character_preferences/splurt/genitals.tsx | 9 +++--- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/modular_skyrat/modules/interaction_menu/code/interaction_datum.dm b/modular_skyrat/modules/interaction_menu/code/interaction_datum.dm index 7dc1a5f8bc794..57e60809cd7c7 100644 --- a/modular_skyrat/modules/interaction_menu/code/interaction_datum.dm +++ b/modular_skyrat/modules/interaction_menu/code/interaction_datum.dm @@ -125,11 +125,11 @@ GLOBAL_LIST_EMPTY_TYPED(interaction_instances, /datum/interaction) SEND_SOUND(sound_cache, mob) if(lewd) - user.adjust_pleasure(user_pleasure, target, src, CLIMAX_POSITION_USER) //SPLURT EDIT - Interactions + user.adjust_pleasure(user_pleasure * (target.dna.features["sexual_potency"] || 1), target, src, CLIMAX_POSITION_USER) //SPLURT EDIT - Interactions user.adjust_arousal(user_arousal) user.adjust_pain(user_pain, target, src, CLIMAX_POSITION_USER) //SPLURT EDIT - Interactions if(usage == INTERACTION_OTHER) //SPLURT EDIT - Interactions - target.adjust_pleasure(target_pleasure, user, src, CLIMAX_POSITION_TARGET) //SPLURT EDIT - Interactions + target.adjust_pleasure(target_pleasure * (user.dna.features["sexual_potency"] || 1), user, src, CLIMAX_POSITION_TARGET) //SPLURT EDIT - Interactions target.adjust_arousal(target_arousal) target.adjust_pain(target_pain, user, src, CLIMAX_POSITION_TARGET) //SPLURT EDIT - Interactions diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_arousal/pleasure.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_arousal/pleasure.dm index 59c67ce90495a..0387df6e6939d 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_arousal/pleasure.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_arousal/pleasure.dm @@ -4,5 +4,5 @@ pleasure = clamp(pleasure + pleas, AROUSAL_MINIMUM, AROUSAL_LIMIT) - if(pleasure >= AROUSAL_AUTO_CLIMAX_THRESHOLD) // lets cum + if(pleasure >= AROUSAL_AUTO_CLIMAX_THRESHOLD * (dna.features["lust_tolerance"] || 1)) // lets cum climax(manual = FALSE, partner = partner, climax_interaction = interaction, interaction_position = position) diff --git a/modular_zzplurt/code/modules/client/preferences/erp_preferences.dm b/modular_zzplurt/code/modules/client/preferences/erp_preferences.dm index c140304e5c127..cf20deef15c49 100644 --- a/modular_zzplurt/code/modules/client/preferences/erp_preferences.dm +++ b/modular_zzplurt/code/modules/client/preferences/erp_preferences.dm @@ -93,14 +93,15 @@ savefile_key = "erp_lust_tolerance_pref" savefile_identifier = PREFERENCE_CHARACTER - minimum = 75 - maximum = 200 + minimum = 0.5 + maximum = 2.0 + step = 0.01 /datum/preference/numeric/erp_lust_tolerance/apply_to_human(mob/living/carbon/human/target, value) - target.age = value + target.dna.features["lust_tolerance"] = value /datum/preference/numeric/erp_lust_tolerance/create_informed_default_value(datum/preferences/preferences) - return 100 + return 1.0 /datum/preference/numeric/erp_lust_tolerance/is_accessible(datum/preferences/preferences) if (!..(preferences)) @@ -116,8 +117,24 @@ savefile_key = "erp_sexual_potency_pref" savefile_identifier = PREFERENCE_CHARACTER - minimum = 10 - maximum = 25 + minimum = 0.5 + maximum = 2.0 + step = 0.01 + +/datum/preference/numeric/erp_sexual_potency/apply_to_human(mob/living/carbon/human/target, value) + target.dna.features["sexual_potency"] = value + +/datum/preference/numeric/erp_sexual_potency/create_informed_default_value(datum/preferences/preferences) + return 1.0 + +/datum/preference/numeric/erp_sexual_potency/is_accessible(datum/preferences/preferences) + if (!..(preferences)) + return FALSE + + if(CONFIG_GET(flag/disable_erp_preferences)) + return FALSE + + return preferences.read_preference(/datum/preference/toggle/master_erp_preferences) /datum/preference/toggle/erp/butt_enlargement savefile_key = "butt_enlargement_pref" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/splurt/genitals.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/splurt/genitals.tsx index 93b60203ba805..059f3e1b74305 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/splurt/genitals.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/splurt/genitals.tsx @@ -125,14 +125,15 @@ export const erp_status_pref_unholy: FeatureChoiced = { }; export const erp_lust_tolerance_pref: FeatureNumeric = { - name: 'Lust tolerance', + name: 'Lust tolerance multiplier', description: - 'Set how long you can last without climaxing. \n(75 = minimum, 200 = maximum.)', + 'Set your lust tolerance multiplier. \n(0.5 = half tolerance, 2 = double tolerance)', component: FeatureNumberInput, }; export const erp_sexual_potency_pref: FeatureNumeric = { - name: 'Sexual potency', - description: 'Set your sexual potency. \n(10 = minimum, 25 = maximum.)', + name: 'Sexual potency multiplier', + description: + 'Set your sexual potency multiplier. \n(0.5 = half potency, 2 = double potency)', component: FeatureNumberInput, };