Skip to content

Commit

Permalink
Merge pull request #784 from Azarak/jank
Browse files Browse the repository at this point in the history
[Bounty] Fixes portal accessory behaviour
  • Loading branch information
MosleyTheMalO authored Jun 4, 2024
2 parents 1b15b0f + 68ff25e commit 46d4630
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 132 deletions.
2 changes: 1 addition & 1 deletion code/__SPLURTCODE/DEFINES/signals.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define COMSIG_HEALTH_SCAN "health_scan"
#define COMSIG_ORGAN_INSERTED "organ_inserted"
#define COMSIG_ORGAN_REMOVED "organ_removed"
#define COMSIG_MOB_CLIMAX "mob_coomed"
#define COMSIG_MOB_CLIMAX "mob_coomed" /// datum/source, datum/reagents/senders_cum, atom/target, obj/item/organ/genital/sender, obj/item/organ/genital/receiver, spill, anonymous
#define COMSIG_OBJ_WRITTEN_ON "written_on"

#define COMSIG_MOB_GENITAL_TRY_INSERTING "mob_genital_try_inserting" //Handles external restrictions to the inserting
Expand Down
55 changes: 36 additions & 19 deletions code/modules/arousal/arousal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@
if(!. && !silent)
to_chat(H, "<span class='warning'>Your [name] is unable to produce it's own fluids, it's missing the organs for it.</span>")

/mob/living/carbon/human/proc/do_climax(datum/reagents/R, atom/target, obj/item/organ/genital/G, spill = TRUE)
if(!G)
/mob/living/carbon/human/proc/do_climax(datum/reagents/R, atom/target, obj/item/organ/genital/sender, spill, cover = FALSE, obj/item/organ/genital/receiver, anonymous = FALSE)
if(!sender)
return
if(!target || !R)
return
var/turfing = isturf(target)
var/condomning
if(istype(G, /obj/item/organ/genital/penis))
var/obj/item/organ/genital/penis/P = G
if(istype(sender, /obj/item/organ/genital/penis))
var/obj/item/organ/genital/penis/P = sender
condomning = locate(/obj/item/genital_equipment/condom) in P.contents
G.generate_fluid(R)
log_message("Climaxed using [G] with [target]", LOG_EMOTE)
sender.generate_fluid(R)
log_message("Climaxed using [sender] with [target]", LOG_EMOTE)
if(condomning)
to_chat(src, "<span class='userlove'>You feel the condom bubble outwards and fill up with your spunk</span>")
R.trans_to(condomning, R.total_volume)
Expand Down Expand Up @@ -113,7 +113,7 @@

if(!turfing)
// sandstorm edit - advanced cum drip
var/amount_to_transfer = R.total_volume * (spill ? G.fluid_transfer_factor : 1)
var/amount_to_transfer = R.total_volume * (spill ? sender.fluid_transfer_factor : 1)
var/mob/living/carbon/human/cummed_on = target
if(istype(cummed_on))
var/datum/reagents/copy = new()
Expand All @@ -124,7 +124,7 @@
cummed_on.apply_status_effect(STATUS_EFFECT_DRIPPING_CUM, copy, get_blood_dna_list())
R.trans_to(target, amount_to_transfer, log = TRUE)
//
G.last_orgasmed = world.time
sender.last_orgasmed = world.time
R.clear_reagents()
//sandstorm edit - gain momentum from dirty deeds.
if(!Process_Spacemove(turn(dir, 180)))
Expand All @@ -143,23 +143,40 @@
to_chat(src, span_userlove("You climax[isturf(loc) ? " onto [loc]" : ""] with your [G.name]."))
do_climax(fluid_source, loc, G)

/mob/living/carbon/human/proc/mob_climax_partner(obj/item/organ/genital/G, mob/living/L, spillage = TRUE, mb_time = 30, obj/item/organ/genital/Lgen = null) //Used for climaxing with any living thing
/mob/living/carbon/human/proc/mob_climax_partner(obj/item/organ/genital/G, mob/living/L, spillage = TRUE, mb_time = 30, obj/item/organ/genital/Lgen = null, forced = FALSE, anonymous = FALSE) //Used for climaxing with any living thing
var/datum/reagents/fluid_source = G.climaxable(src)
if(!fluid_source)
return
var/user_name
var/user_p_their
var/target_name
var/target_p_their
var/target_p_them
if(anonymous)
user_name = "Someone"
target_name = "someone"
user_p_their = "their"
target_p_their = "their"
target_p_them = "them"
else
user_name = "[src]"
target_name = "[L]"
user_p_their = p_their()
target_p_their = L.p_their()
target_p_them = L.p_them()
if(mb_time) //Skip warning if this is an instant climax.
to_chat(src, span_userlove("You're about to climax [(Lgen) ? "in [L]'s [Lgen.name]" : "with [L]"]!"))
to_chat(L, span_userlove("[src] is about to climax [(Lgen) ? "in your [Lgen.name]" : "with you"]!"))
to_chat(src, span_userlove("You're about to climax [(Lgen) ? "in [target_name]'s [Lgen.name]" : "with [L]"]!"))
to_chat(L, span_userlove("[user_name] is about to climax [(Lgen) ? "in your [Lgen.name]" : "with you"]!"))
if(!do_after(src, mb_time, target = src) || !in_range(src, L) || !G.climaxable(src, TRUE))
return
if(spillage)
to_chat(src, span_userlove("You orgasm with [L], spilling out of [(Lgen) ? "[L.p_their()] [Lgen.name]" : "[L.p_them()]"], using your [G.name]."))
to_chat(L, span_userlove("[src] climaxes [(Lgen) ? "in your [Lgen.name]" : "with you"], overflowing and spilling, using [p_their()] [G.name]!"))
to_chat(src, span_userlove("You orgasm with [target_name], spilling out of [(Lgen) ? "[target_p_their] [Lgen.name]" : "[target_p_them]"], using your [G.name]."))
to_chat(L, span_userlove("[user_name] climaxes [(Lgen) ? "in your [Lgen.name]" : "with you"], overflowing and spilling, using [user_p_their] [G.name]!"))
else //knots and other non-spilling orgasms
to_chat(src, span_userlove("You climax [(Lgen) ? "in [L]'s [Lgen.name]" : "with [L]"], your [G.name] spilling nothing."))
to_chat(L, span_userlove("[src] climaxes [(Lgen) ? "in your [Lgen.name]" : "with you"], [p_their()] [G.name] spilling nothing!"))
to_chat(src, span_userlove("You climax [(Lgen) ? "in [target_name]'s [Lgen.name]" : "with [target_name]"], your [G.name] spilling nothing."))
to_chat(L, span_userlove("[user_name] climaxes [(Lgen) ? "in your [Lgen.name]" : "with you"], [user_p_their] [G.name] spilling nothing!"))
//SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "orgasm", /datum/mood_event/orgasm) //Sandstorm edit
do_climax(fluid_source, spillage ? loc : L, G, spillage,, Lgen)
do_climax(fluid_source, spillage ? loc : L, G, spillage, FALSE, Lgen, anonymous)
//L.receive_climax(src, Lgen, G, spillage)

/mob/living/carbon/human/proc/mob_fill_container(obj/item/organ/genital/G, obj/item/reagent_containers/container, mb_time = 30) //For beaker-filling, beware the bartender
Expand Down Expand Up @@ -260,7 +277,7 @@

//Here's the main proc itself
//skyrat edit - forced partner and spillage
/mob/living/carbon/human/proc/mob_climax(forced_climax=FALSE,cause = "", var/mob/living/forced_partner = null, var/forced_spillage = TRUE, var/obj/item/organ/genital/forced_receiving_genital = null) //Forced is instead of the other proc, makes you cum if you have the tools for it, ignoring restraints
/mob/living/carbon/human/proc/mob_climax(forced_climax=FALSE,cause = "", var/mob/living/forced_partner = null, var/forced_spillage = TRUE, var/obj/item/organ/genital/forced_receiving_genital = null, anonymous = FALSE) //Forced is instead of the other proc, makes you cum if you have the tools for it, ignoring restraints
set waitfor = FALSE
if(mb_cd_timer > world.time)
if(!forced_climax) //Don't spam the message to the victim if forced to come too fast
Expand All @@ -287,7 +304,7 @@
var/check_target
var/list/worn_stuff = get_equipped_items()

if(G.is_exposed(worn_stuff))
if(forced_receiving_genital || G.is_exposed(worn_stuff))
if(pulling) //Are we pulling someone? Priority target, we can't be making option menus for this, has to be quick
if(isliving(pulling)) //Don't fuck objects
check_target = pulling
Expand All @@ -311,7 +328,7 @@
//
if(partner) //Did they pass the clothing checks?
//skyrat edit
mob_climax_partner(G, partner, spillage = forced_spillage, mb_time = 0, Lgen = forced_receiving_genital, forced = forced_climax) //Instant climax due to forced
mob_climax_partner(G, partner, forced_spillage, 0, forced_receiving_genital, forced_climax, anonymous) //Instant climax due to forced
//
continue //You've climaxed once with this organ, continue on
//not exposed OR if no partner was found while exposed, climax alone
Expand Down
Loading

0 comments on commit 46d4630

Please sign in to comment.