Skip to content

Commit

Permalink
emotes and quirks
Browse files Browse the repository at this point in the history
ok maybe it happened... but 40 votes? in only 2 days??
  • Loading branch information
MosleyTheMalO committed Jun 4, 2022
1 parent 8365128 commit 8b7fa82
Show file tree
Hide file tree
Showing 16 changed files with 229 additions and 44 deletions.
10 changes: 10 additions & 0 deletions code/__SPLURTCODE/DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Read code\__DEFINES\cooldowns.dm
*/

//INDEXES
#define COOLDOWN_DOMINANT_SNAP "dominant_snap"
#define COOLDOWN_DOMINANT_EXAMINE "dominant_examine"
#define COOLDOWN_EMOTE_FART "emote_fart"
6 changes: 6 additions & 0 deletions code/__SPLURTCODE/DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#define COMSIG_MOB_EMOTE "mob_emote" // from /mob/emote(): (proc args list)
// used to access COMSIG_MOB_SAY argslist
#define EMOTE_ACT 1
#define EMOTE_MTYPE 2
#define EMOTE_MESSAGE 3
#define EMOTE_INTENTIONAL 4
3 changes: 3 additions & 0 deletions code/__SPLURTCODE/DEFINES/quirks.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//Dominant/Well-trained quirks
#define DOMINANT_DETECT_RANGE 5
#define DOMINANT_SNAP_COOLDOWN 10 SECONDS
1 change: 1 addition & 0 deletions code/__SPLURTCODE/DEFINES/spans.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define span_userlove(str) ("<span class='userlove'>" + str + "</span>")
#define span_love(str) ("<span class='love'>" + str + "</span>")
#define span_lewd(str) ("<span class='lewd'>" + str + "</span>")
11 changes: 10 additions & 1 deletion code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,14 @@
if(ishuman(src))
S = dna.species

//SPLURT EDIT - Headpat traits
if(M.has_quirk(/datum/quirk/dominant_aura) && H.has_quirk(/datum/quirk/well_trained))
if(H.has_quirk(/datum/quirk/headpat_hater))
H.remove_quirk(/datum/quirk/headpat_hater)
if(!H.has_quirk(/datum/quirk/headpat_slut))
H.add_quirk(/datum/quirk/headpat_slut)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "dom_trained", /datum/mood_event/dominant/good_boy)

if(HAS_TRAIT(H, TRAIT_DISTANT)) //No mood buff since you're not really liking it.
M.visible_message("<span class='notice'>[M] gives [H] a pat on the head to make [p_them()] feel better! They seem annoyed...</span>", \
"<span class='warning'>You give [H] a pat on the head to make [p_them()] feel better! They seem annoyed as they're now glaring towards you...</span>")
Expand All @@ -315,12 +323,13 @@
"<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better! They seem to like it way too much..</span>", target = src,
target_message = "<span class='boldnotice'>[M] gives you a pat on the head to make you feel better!</span>")
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "lewd_headpat", /datum/mood_event/lewd_headpat)
H.add_lust(5) //Headpats are hot af
H.handle_post_sex(5, null, null) //Headpats are hot af
else
M.visible_message("<span class='notice'>[M] gives [src] a pat on the head to make [p_them()] feel better!</span>", \
"<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>", target = src,
target_message = "<span class='notice'>[M] gives you a pat on the head to make you feel better!</span>")
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat)
//SPLURT EDIT END

if(!(client?.prefs.cit_toggles & NO_AUTO_WAG) && friendly_check)
if(S?.can_wag_tail(src) && !dna.species.is_wagging_tail())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
"slams in and out of \the <b>[partner]</b>'s mouth, [u_His] balls slapping off [t_His] face.")]"
if(rand(3))
partner.emote("chokes on \the [user]")
if(prob(1) && istype(partner))
partner.adjustOxyLoss(5)
/*if(prob(1) && istype(partner)) //Handled on modular_splurt
partner.adjustOxyLoss(5)*/
if(partner.a_intent == INTENT_HARM)
// adjustBruteLoss(5)
retaliation_message = pick(
Expand Down
2 changes: 1 addition & 1 deletion modular_splurt/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# About modularizing defines

Since #define clauses can't be properly modularized and need to be loaded first than the rest of the code for it to catch them, the modular_splurt/code/_DEFINES/ folder has been deleted and all of its contents have been moved to code/__DEFINES/splurtcode/
Since #define clauses can't be properly modularized and need to be loaded first than the rest of the code for it to catch them, the modular_splurt/code/_DEFINES/ folder has been deleted and all of its contents have been moved to code\\__SPLURTCODE\\DEFINES

Please use this folder the same way you'd use the _DEFINES folder once found inside this directory
2 changes: 2 additions & 0 deletions modular_splurt/code/datums/elements/smalltalk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
UnregisterSignal(source, COMSIG_MOB_SAY)

/datum/element/smalltalk/proc/handle_speech(datum/source, list/speech_args)
SIGNAL_HANDLER

speech_args[SPEECH_SPANS] |= SPAN_SMALL
5 changes: 5 additions & 0 deletions modular_splurt/code/datums/interactions/lewd/lewd_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@

/datum/interaction/lewd/throatfuck/display_interaction(mob/living/carbon/human/user, mob/living/carbon/human/target)
. = ..()
if(istype(target, /mob/living) && user.is_fucking(target, CUM_TARGET_THROAT))
var/stat_before = target.stat
target.adjustOxyLoss(3)
if(target.stat == UNCONSCIOUS && stat_before != UNCONSCIOUS)
target.visible_message(message = "<font color=red><b>\The [target]</b> passes out on <b>\The [src]</b>'s cock.</span>", ignored_mobs = user.get_unconsenting())
if(!isclownjob(user))
return

Expand Down
9 changes: 9 additions & 0 deletions modular_splurt/code/datums/mood_events/dominant_events.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/datum/mood_event/dominant/need
description = span_warning("I need to be someone's good boy...\n")
mood_change = -2
timeout = 3 MINUTES

/datum/mood_event/dominant/good_boy
description = span_nicegreen("I feel like a good boy!\n")
mood_change = 2
timeout = 3 MINUTES
61 changes: 61 additions & 0 deletions modular_splurt/code/datums/traits/good.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,64 @@
quirk_holder.weather_immunities -= "ash"
*/

/datum/quirk/dominant_aura
name = "Dominant Aura"
desc = "Your personality is assertive enough to appear as powerful to other people, so much in fact that the weaker kind can't help but throw themselves at your feet on command."
value = 2
gain_text = "<span class='notice'>You feel like making someone your pet</span>"
lose_text = "<span class='notice'>You feel less assertive than befpre</span>"

/datum/quirk/dominant_aura/add()
. = ..()
RegisterSignal(quirk_holder, COMSIG_PARENT_EXAMINE, .proc/on_examine_holder)
RegisterSignal(quirk_holder, COMSIG_MOB_EMOTE, .proc/handle_snap)

/datum/quirk/dominant_aura/remove()
. = ..()
UnregisterSignal(quirk_holder, COMSIG_PARENT_EXAMINE)
UnregisterSignal(quirk_holder, COMSIG_MOB_EMOTE)

/datum/quirk/dominant_aura/proc/on_examine_holder(atom/source, mob/user, list/examine_list)
SIGNAL_HANDLER

if(!ishuman(user))
return
var/mob/living/carbon/human/sub = user
if(!sub.has_quirk(/datum/quirk/well_trained) || (sub == quirk_holder))
return

examine_list += span_lewd("\nYou can't look at [quirk_holder.p_them()] for more than three seconds before flustering away.")
if(!TIMER_COOLDOWN_CHECK(user, COOLDOWN_DOMINANT_EXAMINE))
to_chat(quirk_holder, span_notice("\The [user] tries to look at you but immediately looks away with a red face..."))
TIMER_COOLDOWN_START(user, COOLDOWN_DOMINANT_EXAMINE, 5 SECONDS)
sub.dir = turn(get_dir(sub, quirk_holder), pick(-90, 90))

/datum/quirk/dominant_aura/proc/handle_snap(datum/source, list/emote_args)
SIGNAL_HANDLER

. = FALSE
var/datum/emote/E
E = E.emote_list[lowertext(emote_args[EMOTE_ACT])]
if(TIMER_COOLDOWN_CHECK(quirk_holder, COOLDOWN_DOMINANT_SNAP) || !findtext(E?.key, "snap"))
return
for(var/mob/living/carbon/human/sub in hearers(DOMINANT_DETECT_RANGE, quirk_holder))
if(!sub.has_quirk(/datum/quirk/well_trained) || (sub == quirk_holder))
continue
switch(E?.key)
if("snap")
sub.dir = get_dir(sub, quirk_holder)
sub.visible_message(span_notice("\The <b>[sub]</b> turns shyly towards \the <b>[quirk_holder]</b>."), "You stare into \the [quirk_holder] submissively.")
if("snap2")
sub.dir = get_dir(sub, quirk_holder)
sub.KnockToFloor()
sub.visible_message(span_lewd("\The <b>[sub]</b> submissively throws [sub.p_them()]self on the floor."),
span_lewd("You throw yourself on the floor like a dog on <b>[quirk_holder]</b>'s command."))
if("snap3")
sub.KnockToFloor()
step(sub, get_dir(sub, quirk_holder))
sub.visible_message(span_lewd("\The <b>[sub]</b> crawls closer to \the <b>[quirk_holder]</b> in all fours, following [quirk_holder.p_their()] command"),
span_lewd("You get on your fours and crawl towards \the <b>[quirk_holder]</b> like a good, submissive boy."))
. = TRUE

if(.)
TIMER_COOLDOWN_START(quirk_holder, COOLDOWN_DOMINANT_SNAP, DOMINANT_SNAP_COOLDOWN)
93 changes: 93 additions & 0 deletions modular_splurt/code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,96 @@
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
if(mood)
mood.mood_modifier -= 0.5

/datum/quirk/masked_mook
name = "Bane Syndrome"
desc = "For some reason you don't feel well without wearing some kind of gas mask."
gain_text = "<span class='danger'>You start feeling unwell without any gas mask on.</span>"
lose_text = "<span class='notice'>You no longer have a need to wear some gas mask.</span>"
value = -2
mood_quirk = TRUE
medical_record_text = "Patient feels more secure when wearing a gas mask."

/datum/quirk/masked_mook/on_process()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/mask/gas/gasmask = H.get_item_by_slot(ITEM_SLOT_MASK)
if(istype(gasmask))
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "masked_mook_incomplete")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "masked_mook", /datum/mood_event/masked_mook)
else
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "masked_mook")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "masked_mook_incomplete", /datum/mood_event/masked_mook_incomplete)

/datum/quirk/masked_mook/on_spawn()
. = ..()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/mask/gas/gasmask = new(get_turf(quirk_holder))
H.equip_to_slot(gasmask, ITEM_SLOT_MASK)
H.regenerate_icons()

/datum/quirk/well_trained
name = "Well-trained"
desc = "You absolutely love being dominated. The thought of someone with a stronger character than yours is enough to make you act up."
value = -2
gain_text = "<span class='notice'>You feel like being someone's good boy</span>"
lose_text = "<span class='notice'>You no longer feel like being a good boy...</span>"
processing_quirk = TRUE
var/shy_stutter = FALSE
var/mood_category = "dom_trained"
var/distance_delay = 0

/datum/quirk/well_trained/on_process()
. = ..()
if(!quirk_holder)
return

//Check for possible doms with the dominant_aura quirk, and for the closest one if there is
. = FALSE
var/list/mob/living/carbon/human/doms = range(DOMINANT_DETECT_RANGE, quirk_holder)
var/closest_distance
for(var/mob/living/carbon/human/dom in doms)
if(dom != quirk_holder && dom.has_quirk(/datum/quirk/dominant_aura))
if(!closest_distance || get_dist(quirk_holder, dom) <= closest_distance)
. = dom
closest_distance = get_dist(quirk_holder, dom)

//Remove effects and return if no dom is found
if(!.)
quirk_holder.stuttering = (shy_stutter ? max(0, quirk_holder.stuttering-3) : quirk_holder.stuttering)
shy_stutter = FALSE
return

//Handle stuttering
if(!shy_stutter || !quirk_holder.stuttering)
quirk_holder.stuttering += 3
shy_stutter = TRUE

//Handle the mood
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
if(istype(mood.mood_events[mood_category], /datum/mood_event/dominant/good_boy))
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, mood_category, /datum/mood_event/dominant/good_boy)
else
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, mood_category, /datum/mood_event/dominant/need)

//Handle chat effects
if(world.time < distance_delay)
return .
var/distance_mod = (-9/50)*closest_distance + 1
var/distance_seconds = (1/5)*(closest_distance**2) + (9/5)*closest_distance + 1
if(prob(50 * distance_mod))
var/list/notices = list(
"You feel someone's presence making you more submissive.",
"The thought of being commanded floods you with lust.",
"You really want to be called a good boy.",
"Someone's presence is making you all flustered.",
"You start getting excited and sweating."
)
to_chat(quirk_holder, span_lewd(pick(notices)))
if(prob(30) * distance_mod)
quirk_holder.emote(pick("blush", "pant"))
if(prob(25) * distance_mod)
quirk_holder.do_jitter_animation(50*distance_mod)
quirk_holder.visible_message(span_notice("\The [quirk_holder] shakes lewdly in [quirk_holder.p_their()] place..."))

if(distance_seconds > 1)
distance_delay = world.time + (distance_seconds SECONDS)
26 changes: 0 additions & 26 deletions modular_splurt/code/datums/traits/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,29 +284,3 @@
. = ..()
var/obj/item/implant/genital_fluid/put_in = new
put_in.implant(quirk_holder, null, TRUE, TRUE)

/datum/quirk/masked_mook
name = "Bane Syndrome"
desc = "For some reason you don't feel well without wearing some kind of gas mask."
gain_text = "<span class='danger'>You start feeling unwell without any gas mask on.</span>"
lose_text = "<span class='notice'>You no longer have a need to wear some gas mask.</span>"
value = 0
mood_quirk = TRUE
medical_record_text = "Patient feels more secure when wearing a gas mask."

/datum/quirk/masked_mook/on_process()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/mask/gas/gasmask = H.get_item_by_slot(ITEM_SLOT_MASK)
if(istype(gasmask))
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "masked_mook_incomplete")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "masked_mook", /datum/mood_event/masked_mook)
else
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "masked_mook")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "masked_mook_incomplete", /datum/mood_event/masked_mook_incomplete)

/datum/quirk/masked_mook/on_spawn()
. = ..()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/mask/gas/gasmask = new(get_turf(quirk_holder))
H.equip_to_slot(gasmask, ITEM_SLOT_MASK)
H.regenerate_icons()
3 changes: 3 additions & 0 deletions modular_splurt/code/modules/mob/emote.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/mob/emote(act, m_type, message, intentional)
. = ..()
SEND_SIGNAL(src, COMSIG_MOB_EMOTE, args)
32 changes: 18 additions & 14 deletions modular_splurt/code/modules/mob/splurt_emotes.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//Main code edits
/datum/emote/living/audio_emote/laugh/run_emote(mob/user, params)
. = ..()
if(. && iscarbon(user))
Expand Down Expand Up @@ -27,11 +28,8 @@
message = "farts out shitcode."
emote_type = EMOTE_AUDIBLE

/mob/living
var/fart_cooldown = 0

/datum/emote/living/fart/run_emote(mob/living/user, params, type_override, intentional)
if(user.fart_cooldown)
if(TIMER_COOLDOWN_CHECK(user, COOLDOWN_EMOTE_FART))
to_chat(user, "<span class='warning'>You try your hardest, but no shart comes out.</span>")
return
var/list/fart_emotes = list( //cope goonies
Expand Down Expand Up @@ -82,17 +80,8 @@
. = ..()
if(.)
playsound(user, pick(GLOB.brap_noises), 50, 1, -1)
var/delay = 3 SECONDS
user.fart_cooldown = TRUE
addtimer(CALLBACK(GLOBAL_PROC, .proc/_fart_renew_msg, user), delay)

/proc/_fart_renew_msg(mob/living/user)
if(QDELETED(user))
return
//to_chat(user, "<span class='notice'>Your ass feels full, again.</span>") //full o shit you mean
user.fart_cooldown = 0
TIMER_COOLDOWN_START(user, COOLDOWN_EMOTE_FART, 3 SECONDS)

// Hyperstation Emotes
/datum/emote/living/cackle
key = "cackle"
key_third_person = "cackles"
Expand Down Expand Up @@ -541,3 +530,18 @@
return
user.nextsoundemote = world.time + 10
playsound(user, pick('modular_splurt/sound/voice/aauugghh1.ogg', 'modular_splurt/sound/voice/aauugghh2.ogg'), 40, 1, -1)

/datum/emote/living/pant
key = "pant"
key_third_person = "pants"
message = "pants!"

/datum/emote/living/pant/run_emote(mob/user, params, type_override, intentional)
var/list/pants = list(
"pants!",
"pants like a dog.",
"lets out soft pants.",
"pulls his tongue out, panting."
)
message = pick(pants)
. = ..()
5 changes: 5 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@
#include "code\__SPLURTCODE\DEFINES\atmospherics.dm"
#include "code\__SPLURTCODE\DEFINES\cit_defines.dm"
#include "code\__SPLURTCODE\DEFINES\click.dm"
#include "code\__SPLURTCODE\DEFINES\cooldowns.dm"
#include "code\__SPLURTCODE\DEFINES\genital_defines.dm"
#include "code\__SPLURTCODE\DEFINES\hud.dm"
#include "code\__SPLURTCODE\DEFINES\is_helpers.dm"
#include "code\__SPLURTCODE\DEFINES\lewd.dm"
#include "code\__SPLURTCODE\DEFINES\mobs.dm"
#include "code\__SPLURTCODE\DEFINES\quirks.dm"
#include "code\__SPLURTCODE\DEFINES\radiation.dm"
#include "code\__SPLURTCODE\DEFINES\say.dm"
#include "code\__SPLURTCODE\DEFINES\signals.dm"
Expand All @@ -257,6 +259,7 @@
#include "code\__SPLURTCODE\DEFINES\subsystems.dm"
#include "code\__SPLURTCODE\DEFINES\traits.dm"
#include "code\__SPLURTCODE\DEFINES\arousal\genitals.dm"
#include "code\__SPLURTCODE\DEFINES\dcs\signals.dm"
#include "code\__SPLURTCODE\DEFINES\zeros\species.dm"
#include "code\__SPLURTCODE\DEFINES\zeros\traits.dm"
#include "code\_globalvars\admin.dm"
Expand Down Expand Up @@ -4239,6 +4242,7 @@
#include "modular_splurt\code\datums\interactions\lewd\lewd_datums.dm"
#include "modular_splurt\code\datums\interactions\lewd\lewd_interactions.dm"
#include "modular_splurt\code\datums\looping_sounds\machinery_sounds.dm"
#include "modular_splurt\code\datums\mood_events\dominant_events.dm"
#include "modular_splurt\code\datums\mood_events\drug_events.dm"
#include "modular_splurt\code\datums\mood_events\generic_negative_events.dm"
#include "modular_splurt\code\datums\mood_events\generic_positive_events.dm"
Expand Down Expand Up @@ -4491,6 +4495,7 @@
#include "modular_splurt\code\modules\mining\shelters.dm"
#include "modular_splurt\code\modules\mining\equipment\kinetic_crusher.dm"
#include "modular_splurt\code\modules\mining\equipment\survival_pod.dm"
#include "modular_splurt\code\modules\mob\emote.dm"
#include "modular_splurt\code\modules\mob\mob.dm"
#include "modular_splurt\code\modules\mob\mob_defines.dm"
#include "modular_splurt\code\modules\mob\splurt_emotes.dm"
Expand Down

0 comments on commit 8b7fa82

Please sign in to comment.