Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO committed Aug 10, 2024
2 parents 2e30a9b + b3db67b commit e08a897
Show file tree
Hide file tree
Showing 33 changed files with 281 additions and 52 deletions.
25 changes: 25 additions & 0 deletions code/__SANDCODE/DEFINES/lewd.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ GLOBAL_LIST_INIT(lewd_prefs_choices, list(
"No"
))

// Moaning Sounds
GLOBAL_LIST_INIT(lewd_moans_male, list(
'modular_sand/sound/interactions/moan_m1.ogg',
'modular_sand/sound/interactions/moan_m2.ogg',
'modular_sand/sound/interactions/moan_m3.ogg'
))

GLOBAL_LIST_INIT(lewd_moans_female, list(
'modular_sand/sound/interactions/moan_f1.ogg',
'modular_sand/sound/interactions/moan_f2.ogg',
'modular_sand/sound/interactions/moan_f3.ogg',
'modular_sand/sound/interactions/moan_f4.ogg',
'modular_sand/sound/interactions/moan_f5.ogg',
'modular_sand/sound/interactions/moan_f6.ogg',
'modular_sand/sound/interactions/moan_f7.ogg'
))
// Kissing sounds
GLOBAL_LIST_INIT(lewd_kiss_sounds, list(
'modular_sand/sound/interactions/kiss1.ogg',
'modular_sand/sound/interactions/kiss2.ogg',
'modular_sand/sound/interactions/kiss3.ogg',
'modular_sand/sound/interactions/kiss4.ogg',
'modular_sand/sound/interactions/kiss5.ogg'
))

#define CUM_TARGET_MOUTH "mouth"
#define CUM_TARGET_THROAT "throat"
#define CUM_TARGET_VAGINA "vagina"
Expand Down
2 changes: 2 additions & 0 deletions code/__SANDCODE/DEFINES/misc.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/// Adds an utf-8 header...? only ever used on circuitry so when wiremod arrives...
#define UTF8HEADER "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta http-equiv='X-UA-Compatible' content='IE=edge' />"
/// A shorthand for ternary operators to simulate a null-coalescing operator. Returns the first argument if its defined, otherwise, second.
#define NULL_COALESCE(var, default) (isnull(var) ? (default) : (var))
4 changes: 4 additions & 0 deletions code/__SANDCODE/HELPERS/math.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/proc/percentage_between(x,a,b,centesimal = TRUE)
if (a > b)
return percentage_between(x, b, a, centesimal)
return clamp((x-a)/(b-a),0,1) * (centesimal ? 100 : 1)
9 changes: 9 additions & 0 deletions html/changelogs/archive/2024-08.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
2024-08-04:
SandPoot:
- code_imp: Coders can now use a list of sounds for basic interactions.
2024-08-09:
xTheLifex:
- rscadd: Kiss interaction now has sounds.
- rscadd: Added arousal multiplier preference option
- rscadd: Added moaning chance preference option
- tweak: Moaning chance should no longer be under two probability checks.
- soundadd: Added new kissing sounds
- soundadd: Added new moaning sounds
- soundadd: Added new male climax sounds
79 changes: 47 additions & 32 deletions modular_sand/code/datums/components/interaction_menu_granter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -415,43 +415,49 @@

var/datum/preferences/prefs = self?.client.prefs
if(prefs)
//Lust stuff, appears at the very top
.["use_arousal_multiplier"] = prefs.use_arousal_multiplier
.["arousal_multiplier"] = prefs.arousal_multiplier
.["use_moaning_multiplier"] = prefs.use_moaning_multiplier
.["moaning_multiplier"] = prefs.moaning_multiplier

//Let's get their favorites!
.["favorite_interactions"] = SANITIZE_LIST(prefs.favorite_interactions)
.["favorite_interactions"] = SANITIZE_LIST(prefs.favorite_interactions)

//Getting char prefs
.["erp_pref"] = pref_to_num(prefs.erppref)
.["noncon_pref"] = pref_to_num(prefs.nonconpref)
.["vore_pref"] = pref_to_num(prefs.vorepref)
.["extreme_pref"] = pref_to_num(prefs.extremepref)
.["extreme_harm"] = pref_to_num(prefs.extremeharm)
.["unholy_pref"] = pref_to_num(prefs.unholypref)
.["erp_pref"] = pref_to_num(prefs.erppref)
.["noncon_pref"] = pref_to_num(prefs.nonconpref)
.["vore_pref"] = pref_to_num(prefs.vorepref)
.["extreme_pref"] = pref_to_num(prefs.extremepref)
.["extreme_harm"] = pref_to_num(prefs.extremeharm)
.["unholy_pref"] = pref_to_num(prefs.unholypref)

//Getting preferences
.["verb_consent"] = !!CHECK_BITFIELD(prefs.toggles, VERB_CONSENT)
.["lewd_verb_sounds"] = !!CHECK_BITFIELD(prefs.toggles, LEWD_VERB_SOUNDS)
.["arousable"] = prefs.arousable
.["genital_examine"] = !!CHECK_BITFIELD(prefs.cit_toggles, GENITAL_EXAMINE)
.["vore_examine"] = !!CHECK_BITFIELD(prefs.cit_toggles, VORE_EXAMINE)
.["medihound_sleeper"] = !!CHECK_BITFIELD(prefs.cit_toggles, MEDIHOUND_SLEEPER)
.["eating_noises"] = !!CHECK_BITFIELD(prefs.cit_toggles, EATING_NOISES)
.["digestion_noises"] = !!CHECK_BITFIELD(prefs.cit_toggles, DIGESTION_NOISES)
.["trash_forcefeed"] = !!CHECK_BITFIELD(prefs.cit_toggles, TRASH_FORCEFEED)
.["forced_fem"] = !!CHECK_BITFIELD(prefs.cit_toggles, FORCED_FEM)
.["forced_masc"] = !!CHECK_BITFIELD(prefs.cit_toggles, FORCED_MASC)
.["hypno"] = !!CHECK_BITFIELD(prefs.cit_toggles, HYPNO)
.["bimbofication"] = !!CHECK_BITFIELD(prefs.cit_toggles, BIMBOFICATION)
.["breast_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, BREAST_ENLARGEMENT)
.["penis_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, PENIS_ENLARGEMENT)
.["butt_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, BUTT_ENLARGEMENT)
.["belly_inflation"] = !!CHECK_BITFIELD(prefs.cit_toggles, BELLY_INFLATION)
.["never_hypno"] = !CHECK_BITFIELD(prefs.cit_toggles, NEVER_HYPNO)
.["no_aphro"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_APHRO)
.["no_ass_slap"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_ASS_SLAP)
.["no_auto_wag"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_AUTO_WAG)
.["chastity_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, CHASTITY)
.["stimulation_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, STIMULATION)
.["edging_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, EDGING)
.["cum_onto_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, CUM_ONTO)
.["verb_consent"] = !!CHECK_BITFIELD(prefs.toggles, VERB_CONSENT)
.["lewd_verb_sounds"] = !!CHECK_BITFIELD(prefs.toggles, LEWD_VERB_SOUNDS)
.["arousable"] = prefs.arousable
.["genital_examine"] = !!CHECK_BITFIELD(prefs.cit_toggles, GENITAL_EXAMINE)
.["vore_examine"] = !!CHECK_BITFIELD(prefs.cit_toggles, VORE_EXAMINE)
.["medihound_sleeper"] = !!CHECK_BITFIELD(prefs.cit_toggles, MEDIHOUND_SLEEPER)
.["eating_noises"] = !!CHECK_BITFIELD(prefs.cit_toggles, EATING_NOISES)
.["digestion_noises"] = !!CHECK_BITFIELD(prefs.cit_toggles, DIGESTION_NOISES)
.["trash_forcefeed"] = !!CHECK_BITFIELD(prefs.cit_toggles, TRASH_FORCEFEED)
.["forced_fem"] = !!CHECK_BITFIELD(prefs.cit_toggles, FORCED_FEM)
.["forced_masc"] = !!CHECK_BITFIELD(prefs.cit_toggles, FORCED_MASC)
.["hypno"] = !!CHECK_BITFIELD(prefs.cit_toggles, HYPNO)
.["bimbofication"] = !!CHECK_BITFIELD(prefs.cit_toggles, BIMBOFICATION)
.["breast_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, BREAST_ENLARGEMENT)
.["penis_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, PENIS_ENLARGEMENT)
.["butt_enlargement"] = !!CHECK_BITFIELD(prefs.cit_toggles, BUTT_ENLARGEMENT)
.["belly_inflation"] = !!CHECK_BITFIELD(prefs.cit_toggles, BELLY_INFLATION)
.["never_hypno"] = !CHECK_BITFIELD(prefs.cit_toggles, NEVER_HYPNO)
.["no_aphro"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_APHRO)
.["no_ass_slap"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_ASS_SLAP)
.["no_auto_wag"] = !CHECK_BITFIELD(prefs.cit_toggles, NO_AUTO_WAG)
.["chastity_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, CHASTITY)
.["stimulation_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, STIMULATION)
.["edging_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, EDGING)
.["cum_onto_pref"] = !!CHECK_BITFIELD(prefs.cit_toggles, CUM_ONTO)

/datum/component/interaction_menu_granter/ui_static_data(mob/user)
. = ..()
Expand Down Expand Up @@ -609,6 +615,15 @@
if("pref")
var/datum/preferences/prefs = parent_mob.client.prefs
switch(params["pref"])
if("use_arousal_multiplier")
prefs.use_arousal_multiplier = !prefs.use_arousal_multiplier
if("arousal_multiplier")
prefs.arousal_multiplier = params["amount"]
if("use_moaning_multiplier")
prefs.use_moaning_multiplier = !prefs.use_moaning_multiplier
if("moaning_multiplier")
prefs.moaning_multiplier = params["amount"]

if("verb_consent")
TOGGLE_BITFIELD(prefs.toggles, VERB_CONSENT)
if("lewd_verb_sounds")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
user.visible_message(span_lewd("\The <b>[user]</b> gives an intense, lingering kiss to \the <b>[partner]</b>."))
else
user.visible_message(span_lewd("\The <b>[user]</b> kisses \the <b>[partner]</b> deeply."))
playlewdinteractionsound(user.loc, pick(GLOB.lewd_kiss_sounds), 90, 0, 0)
80 changes: 64 additions & 16 deletions modular_sand/code/datums/interactions/lewd_definitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,33 @@
return TRUE

/mob/living/proc/moan()
if(!(prob(get_lust() / get_lust_tolerance() * 65)))
if(is_muzzled() || (mind?.miming))
var/message_to_display = pick("mime%S% a pleasured moan","moan%S% in silence")
visible_message(span_lewd("<b>\The [src]</b> [replacetext(message_to_display, "%S%", "s")]."),
span_lewd("You [replacetext(message_to_display, "%S%", "")]."))
return
var/moan = rand(1, 7)
if(moan == lastmoan)
moan--
if(!is_muzzled())
visible_message(message = span_lewd("<B>\The [src]</B> [pick("moans", "moans in pleasure")]."), ignored_mobs = get_unconsenting())
if(is_muzzled())//immursion
audible_message(span_lewd("<B>[src]</B> [pick("mimes a pleasured moan","moans in silence")]."))
lastmoan = moan
var/message_to_display = pick("moan%S%", "moan%S% in pleasure")
visible_message(span_lewd("<b>\The [src]</b> [replacetext(message_to_display, "%S%", "s")]."),
span_lewd("You [replacetext(message_to_display, "%S%", "")]."),
span_lewd("You hear some moaning."),
ignored_mobs = get_unconsenting(), omni = TRUE)

// Get reference of the list we're using based on gender.
var/list/moans
if (gender == FEMALE)
moans = GLOB.lewd_moans_female
else
moans = GLOB.lewd_moans_male

// Pick a sound from the list.
var/sound = pick(moans)

// If the sound is repeated, get a new from a list without it.
if (lastmoan == sound)
sound = pick(LAZYCOPY(moans) - lastmoan)

playlewdinteractionsound(loc, sound, 80, 0, 0)
lastmoan = sound

/mob/living/proc/cum(mob/living/partner, target_orifice, cum_inside = FALSE, anonymous = FALSE) //SPLURT EDIT - extra argument `cum_inside` and 'anonymous'
if(HAS_TRAIT(src, TRAIT_NEVERBONER))
Expand Down Expand Up @@ -771,17 +788,48 @@
if(stat != CONSCIOUS)
return FALSE

var/datum/preferences/prefs = client?.prefs
var/use_arousal_multiplier = NULL_COALESCE(prefs?.use_arousal_multiplier, FALSE)
var/arousal_multiplier = NULL_COALESCE(prefs?.arousal_multiplier, 100)
var/use_moaning_multiplier = NULL_COALESCE(prefs?.use_moaning_multiplier, FALSE)
var/moaning_multiplier = NULL_COALESCE(prefs?.moaning_multiplier, 25)

if(amount)
add_lust(amount)
if (use_arousal_multiplier)
add_lust(amount * (arousal_multiplier/100))
else
add_lust(amount)

if (use_moaning_multiplier)
if(prob(moaning_multiplier))
moan()

// Below is an overengineered bezier curve based chance of moaning.
/// The current lust (arousal) amount.
var/lust = get_lust()
/// The lust tolerance as defined in preferences.
var/lust_tolerance = get_lust_tolerance()
if(lust >= lust_tolerance)
if(prob(10))
/// The arousal limit upon which you climax.
var/climax = lust_tolerance * 3
/// Threshold where you start moaning.
var/threshold = climax/2
///Calculation of 't' in bezier quadratic curve. It's a 0 to 1 version of threshold to climax.
var/t = percentage_between(lust, threshold, climax, FALSE)
// The Y axis value of the point in the bezier curve.
var/bezier = 2 * (1 - t) * t * 13.8 + ((t*t) * 100)
/// Probability chance resulting from bezier curve.
var/chance = clamp(round(bezier),0,100)

if (lust >= threshold)
if(prob(30))
to_chat(src, "<b>You struggle to not orgasm!</b>")
moan()
return FALSE
if(lust >= (lust_tolerance * 3))
if(cum(partner, orifice, cum_inside, anonymous)) //SPLURT EDIT - extra argument `cum_inside` and `anonymous`

if (!use_moaning_multiplier)
if(prob(chance))
moan()

if (lust > climax)
if (cum(partner, orifice, cum_inside, anonymous)) //SPLURT EDIT - extra argument `cum_inside` and `anonymous`
return TRUE
return FALSE

Expand Down
10 changes: 10 additions & 0 deletions modular_sand/code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/datum/preferences
/// My favorites! they show up in their own tab inside the ui.
var/list/favorite_interactions

/// Enable the 'arousal_multiplier' to be applied to lust amount
var/use_arousal_multiplier = FALSE
/// A separate arousal multiplier that the user has control of (although we could just tap into lust or replace it.)
var/arousal_multiplier = 100
/// Enable the 'moaning_multiplier' to be used as a % chance of moaning instead of default calculation.
var/use_moaning_multiplier = FALSE
/// Chance of moaning during an interaction
var/moaning_multiplier = 65

//SANDSTORM EDIT - extra language
/datum/preferences/proc/SetLanguage(mob/user)
var/list/dat = list()
Expand Down
19 changes: 17 additions & 2 deletions modular_sand/code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,23 @@
. = ..()
if(!istype(., /savefile))
return FALSE
WRITE_FILE(.["favorite_interactions"], favorite_interactions)
WRITE_FILE(.["favorite_interactions"], favorite_interactions)

WRITE_FILE(.["use_arousal_multiplier"], use_arousal_multiplier)
WRITE_FILE(.["arousal_multiplier"], arousal_multiplier)
WRITE_FILE(.["use_moaning_multiplier"], use_moaning_multiplier)
WRITE_FILE(.["moaning_multiplier"], moaning_multiplier)

/datum/preferences/load_preferences(bypass_cooldown)
. = ..()
if(!istype(., /savefile))
return FALSE
.["favorite_interactions"] >> favorite_interactions
.["favorite_interactions"] >> favorite_interactions

.["use_arousal_multiplier"] >> use_arousal_multiplier
.["arousal_multiplier"] >> arousal_multiplier
.["use_moaning_multiplier"] >> use_moaning_multiplier
.["moaning_multiplier"] >> moaning_multiplier

favorite_interactions = SANITIZE_LIST(favorite_interactions)

Expand All @@ -47,3 +57,8 @@
if(!initial(interaction_path.description))
LAZYREMOVE(favorite_interactions, interaction)
continue

use_arousal_multiplier = sanitize_integer(use_arousal_multiplier, 0, 1, initial(use_arousal_multiplier))
arousal_multiplier = sanitize_integer(arousal_multiplier, 0, 300, initial(arousal_multiplier))
use_moaning_multiplier = sanitize_integer(use_moaning_multiplier, 0, 1, initial(use_moaning_multiplier))
moaning_multiplier = sanitize_integer(moaning_multiplier, 0, 100, initial(moaning_multiplier))
13 changes: 13 additions & 0 deletions modular_sand/code/modules/mob/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@
return
user.nextsoundemote = world.time + 7
playsound(user, 'modular_citadel/sound/voice/peep.ogg', 50, 1, -1)

/datum/emote/living/carbon/moan
emote_type = EMOTE_OMNI
stat_allowed = CONSCIOUS

/datum/emote/living/carbon/moan/run_emote(mob/living/user, params, type_override, intentional)
. = TRUE
if(!can_run_emote(user, TRUE, intentional))
return FALSE
if(!COOLDOWN_FINISHED(user, nextsoundemote))
return FALSE
COOLDOWN_START(user, nextsoundemote, 7)
user.moan()
Binary file modified modular_sand/sound/interactions/final_m1.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/final_m2.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/final_m3.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/final_m4.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/final_m5.ogg
Binary file not shown.
Binary file added modular_sand/sound/interactions/kiss1.ogg
Binary file not shown.
Binary file added modular_sand/sound/interactions/kiss2.ogg
Binary file not shown.
Binary file added modular_sand/sound/interactions/kiss3.ogg
Binary file not shown.
Binary file added modular_sand/sound/interactions/kiss4.ogg
Binary file not shown.
Binary file added modular_sand/sound/interactions/kiss5.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f1.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f2.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f3.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f4.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f5.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f6.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_f7.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_m1.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_m2.ogg
Binary file not shown.
Binary file modified modular_sand/sound/interactions/moan_m3.ogg
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
#include "code\__SANDCODE\DEFINES\dcs\signals\lewd.dm"
#include "code\__SANDCODE\DEFINES\dcs\signals\signals_mob_main.dm"
#include "code\__SANDCODE\DEFINES\dcs\signals\sizecode.dm"
#include "code\__SANDCODE\HELPERS\math.dm"
#include "code\__SANDCODE\HELPERS\silicon.dm"
#include "code\__SANDCODE\HELPERS\sizecode.dm"
#include "code\__SPLURTCODE\DEFINES\access.dm"
Expand Down
Loading

0 comments on commit e08a897

Please sign in to comment.