Adds Arousal as a Damage Type (#204)
* auto vote runtime error fix * part 1 * conflict resolution stop fighting, damnit * includes * species flags * toggleable * reagent recipes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
//THIS FILE CONTAINS CONSTANTS, PROCS, DEFINES, AND OTHER THINGS//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/mob/proc/setClickCooldown(var/timeout)
|
||||
next_move = max(world.time + timeout, next_move)
|
||||
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
//Mob vars
|
||||
/mob/living
|
||||
var/arousalloss = 0 //How aroused the mob is.
|
||||
var/min_arousal = 0 //The lowest this mobs arousal will get. default = 0
|
||||
var/max_arousal = 100 //The highest this mobs arousal will get. default = 100
|
||||
var/arousal_rate = 1 //The base rate that arousal will increase in this mob.
|
||||
var/arousal_loss_rate = 1 //How easily arousal can be relieved for this mob.
|
||||
var/canbearoused = FALSE //Mob-level disabler for arousal. Starts off and can be enabled as features are added for different mob types.
|
||||
var/mb_cd_length = 100 //10 second cooldown for masturbating because fuck spam
|
||||
var/mb_cd_timer = 0 //The timer itself
|
||||
|
||||
/mob/living/carbon/human
|
||||
canbearoused = TRUE
|
||||
|
||||
//Species vars
|
||||
/datum/species
|
||||
var/arousal_gain_rate = 1 //Rate at which this species becomes aroused
|
||||
var/arousal_lose_rate = 1 //Multiplier for how easily arousal can be relieved
|
||||
|
||||
//Mob procs
|
||||
/mob/living/Life()
|
||||
if(stat != DEAD)
|
||||
handle_arousal()
|
||||
..()
|
||||
|
||||
/mob/living/proc/handle_arousal()
|
||||
return
|
||||
|
||||
/mob/living/carbon/handle_arousal()
|
||||
..()
|
||||
var/datum/species/S
|
||||
if(has_dna())
|
||||
S = dna.species
|
||||
if(S && SSmob.times_fired%36==2 && getArousalLoss() < 100)//Totally stolen from breathing code. Do this every 36 ticks.
|
||||
adjustArousalLoss(arousal_rate * S.arousal_gain_rate)
|
||||
|
||||
/mob/living/proc/getArousalLoss()
|
||||
return arousalloss
|
||||
|
||||
/mob/living/proc/adjustArousalLoss(amount, updating_arousal=1)
|
||||
if(status_flags & GODMODE || !canbearoused)
|
||||
return 0
|
||||
arousalloss = Clamp(arousalloss + amount, min_arousal, max_arousal)
|
||||
if(updating_arousal)
|
||||
updatearousal()
|
||||
|
||||
/mob/living/proc/setArousalLoss(amount, updating_arousal=1)
|
||||
if(status_flags & GODMODE || !canbearoused)
|
||||
return 0
|
||||
arousalloss = Clamp(amount, min_arousal, max_arousal)
|
||||
if(updating_arousal)
|
||||
updatearousal()
|
||||
|
||||
/mob/living/proc/getPercentAroused()
|
||||
return ((100 / max_arousal) * arousalloss)
|
||||
|
||||
/mob/living/proc/isPercentAroused(percentage)//returns true if the mob's arousal (measured in a percent of 100) is greater than the arg percentage.
|
||||
if(!isnum(percentage))
|
||||
return FALSE
|
||||
if(getPercentAroused() >= percentage)
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/mob_masturbate()//This is just so I can test this shit without being forced to add actual content to get rid of arousal. Will be a very basic proc for a while.
|
||||
set name = "Masturbate"
|
||||
set category = "IC"
|
||||
if(canbearoused && !restrained() && !stat)
|
||||
if(mb_cd_timer <= world.time)
|
||||
//start the cooldown even if it fails
|
||||
mb_cd_timer = world.time + mb_cd_length
|
||||
if(getArousalLoss() >= ((max_arousal / 100) * 33))//33% arousal or greater required
|
||||
src.visible_message("<span class='danger'>[src] starts masturbating!</span>", \
|
||||
"<span class='userdanger'>You start masturbating.</span>")
|
||||
if(do_after(src, 100, target = src))
|
||||
src.visible_message("<span class='danger'>[src] relieves themself!</span>", \
|
||||
"<span class='userdanger'>You have relieved yourself.</span>")
|
||||
setArousalLoss(min_arousal)
|
||||
/*
|
||||
switch(gender)
|
||||
if(MALE)
|
||||
PoolOrNew(/obj/effect/decal/cleanable/semen, loc)
|
||||
if(FEMALE)
|
||||
PoolOrNew(/obj/effect/decal/cleanable/femcum, loc)
|
||||
*/
|
||||
else
|
||||
src << "<span class='notice'>You aren't aroused enough for that.</span>"
|
||||
|
||||
//H U D//
|
||||
/mob/living/proc/updatearousal()
|
||||
update_arousal_hud()
|
||||
|
||||
/mob/living/proc/update_arousal_hud()
|
||||
return 0
|
||||
|
||||
/datum/species/proc/update_arousal_hud(mob/living/carbon/human/H)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/update_arousal_hud()
|
||||
if(!client || !hud_used)
|
||||
return 0
|
||||
if(dna.species.update_arousal_hud())
|
||||
return 0
|
||||
if(!canbearoused)
|
||||
hud_used.arousal.icon_state = "arousal0"
|
||||
return 0
|
||||
else
|
||||
if(hud_used.arousal)
|
||||
if(stat == DEAD)
|
||||
hud_used.arousal.icon_state = "arousal0"
|
||||
return 1
|
||||
if(getArousalLoss() == max_arousal)
|
||||
hud_used.arousal.icon_state = "arousal100"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 90)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal90"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 80)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal80"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 70)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal70"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 60)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal60"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 50)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal50"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 40)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal40"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 30)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal30"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 20)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal10"
|
||||
return 1
|
||||
if(getArousalLoss() >= (max_arousal / 100) * 10)//M O D U L A R , W O W
|
||||
hud_used.arousal.icon_state = "arousal10"
|
||||
return 1
|
||||
else
|
||||
hud_used.arousal.icon_state = "arousal0"
|
||||
|
||||
/obj/screen/arousal
|
||||
name = "arousal"
|
||||
icon_state = "arousal0"
|
||||
screen_loc = ui_arousal
|
||||
|
||||
/obj/screen/arousal/Click()
|
||||
if(!isliving(usr))
|
||||
return 0
|
||||
var/mob/living/M = usr
|
||||
if(M.canbearoused)
|
||||
M.mob_masturbate()
|
||||
return 1
|
||||
else
|
||||
M << "<span class='warning'>Arousal is disabled. Feature is unavailable.</span>"
|
||||
@@ -0,0 +1,211 @@
|
||||
//body bluids
|
||||
/datum/reagent/consumable/semen
|
||||
name = "Semen"
|
||||
id = "semen"
|
||||
description = "Sperm from some animal. Useless for anything but insemination, really."
|
||||
data = list("donor"=null,"viruses"=null,"donor_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null)
|
||||
reagent_state = LIQUID
|
||||
color = "#FFFFFF" // rgb: 255, 255, 255
|
||||
nutriment_factor = 0.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/consumable/semen/reaction_turf(turf/T, reac_volume)
|
||||
if(!istype(T))
|
||||
return
|
||||
if(reac_volume < 3)
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/semen/S = locate() in T
|
||||
if(!S)
|
||||
S = new(T)
|
||||
S.reagents.add_reagent("semen", reac_volume)
|
||||
if(data["blood_DNA"])
|
||||
S.blood_DNA[data["blood_DNA"]] = data["blood_type"]
|
||||
|
||||
/obj/effect/decal/cleanable/semen
|
||||
name = "semen"
|
||||
desc = null
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
icon = 'code/citadel/icons/effects.dmi'
|
||||
icon_state = "semen1"
|
||||
random_icon_states = list("semen1", "semen2", "semen3", "semen4")
|
||||
// blood_state = BLOOD_STATE_SEMEN
|
||||
// bloodiness = MAX_SHOE_BLOODINESS
|
||||
|
||||
/obj/effect/decal/cleanable/semen/New()
|
||||
dir = pick(1,2,4,8)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/semen/replace_decal(obj/effect/decal/cleanable/semen/S)
|
||||
// if(S.reagent_DNA["semen"])
|
||||
// reagent_DNA["semen"] |= S.reagent_DNA["semen"]
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/femcum
|
||||
name = "Female Ejaculate"
|
||||
id = "femcum"
|
||||
description = "Vaginal lubricant found in most mammals and other animals of similar nature. Where you found this is your own business."
|
||||
data = list("donor"=null,"viruses"=null,"donor_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null)
|
||||
reagent_state = LIQUID
|
||||
color = "#AAAAAA77"
|
||||
nutriment_factor = 0.5 * REAGENTS_METABOLISM
|
||||
|
||||
/obj/effect/decal/cleanable/femcum
|
||||
name = "female ejaculate"
|
||||
desc = null
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
icon = 'code/citadel/icons/effects.dmi'
|
||||
icon_state = "fem1"
|
||||
random_icon_states = list("fem1", "fem2", "fem3", "fem4")
|
||||
blood_DNA = list()
|
||||
blood_state = null
|
||||
bloodiness = null
|
||||
|
||||
/obj/effect/decal/cleanable/femcum/New()
|
||||
dir = pick(1,2,4,8)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/femcum/replace_decal(obj/effect/decal/cleanable/femcum/F)
|
||||
if (F.blood_DNA)
|
||||
blood_DNA |= F.blood_DNA.Copy()
|
||||
..()
|
||||
|
||||
//aphrodisiac & anaphrodisiac
|
||||
|
||||
/datum/reagent/aphrodisiac
|
||||
name = "Crocin"
|
||||
id = "aphro"
|
||||
description = "Naturally found in the crocus and gardenia flowers, this drug acts as a natural and safe aphrodisiac."
|
||||
color = "#FFADFF"//PINK, rgb(255, 173, 255)
|
||||
|
||||
/datum/reagent/aphrodisiac/on_mob_life(mob/living/M)
|
||||
if(prob(33))
|
||||
M.adjustArousalLoss(2)
|
||||
if(prob(5))
|
||||
M.emote(pick("moan","blush"))
|
||||
if(prob(5))
|
||||
var/aroused_message = pick("You feel frisky.", "You're having trouble suppressing your urges.", "You feel in the mood.")
|
||||
M << "<span class='love'>[aroused_message]</span>"
|
||||
..()
|
||||
|
||||
/datum/reagent/aphrodisiacplus
|
||||
name = "Hexacrocin"
|
||||
id = "aphro+"
|
||||
description = "Chemically condensed form of basic crocin. This aphrodisiac is extremely powerful and addictive in most animals.\
|
||||
Addiction withdrawals can cause brain damage and shortness of breath. Overdosage can lead to brain damage and a\
|
||||
permanent increase in libido (commonly referred to as 'bimbofication')."
|
||||
color = "#FF2BFF"//dark pink
|
||||
addiction_threshold = 20
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/aphrodisiacplus/on_mob_life(mob/living/M)
|
||||
if(prob(33))
|
||||
M.adjustArousalLoss(6)//not quite six times as powerful, but still considerably more powerful.
|
||||
if(prob(5))
|
||||
if(M.getArousalLoss() > 75)
|
||||
M.say(pick("Hnnnnngghh...", "Ohh...", "Mmnnn..."))
|
||||
else
|
||||
M.emote(pick("moan","blush"))
|
||||
if(prob(5))
|
||||
if(M.getArousalLoss() > 90)
|
||||
var/aroused_message = pick("You need to fuck someone!", "You're bursting with sexual tension!", "You can't get sex off your mind!")
|
||||
M << "<span class='love'>[aroused_message]</span>"
|
||||
else
|
||||
var/aroused_message = pick("You feel a bit hot.", "You feel strong sexual urges.", "You feel in the mood.", "You're ready to go down on someone.")
|
||||
M << "<span class='love'>[aroused_message]</span>"
|
||||
// if(iscarbon(M) && has_dna(M))
|
||||
// M.force_ejaculation()
|
||||
..()
|
||||
/datum/reagent/aphrodisiacplus/addiction_act_stage2(mob/living/M)
|
||||
if(prob(30))
|
||||
M.adjustBrainLoss(2)
|
||||
..()
|
||||
/datum/reagent/aphrodisiacplus/addiction_act_stage3(mob/living/M)
|
||||
if(prob(30))
|
||||
M.adjustBrainLoss(3)
|
||||
|
||||
..()
|
||||
/datum/reagent/aphrodisiacplus/addiction_act_stage4(mob/living/M)
|
||||
if(prob(30))
|
||||
M.adjustBrainLoss(4)
|
||||
..()
|
||||
|
||||
/datum/reagent/aphrodisiacplus/overdose_process(mob/living/M)
|
||||
if(prob(66))
|
||||
if(M.min_arousal < 50)
|
||||
M.min_arousal += 1
|
||||
if(M.max_arousal < 200)
|
||||
M.max_arousal += 1
|
||||
M.adjustArousalLoss(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/anaphrodisiac
|
||||
name = "Camphor"
|
||||
id = "anaphro"
|
||||
description = "Naturally found in some species of evergreen trees, camphor is a waxy substance. When injested by most animals, it acts as an anaphrodisiac\
|
||||
, reducing libido and calming them. Non-habit forming and not addictive."
|
||||
color = "#D9D9D9"//rgb(217, 217, 217)
|
||||
reagent_state = SOLID
|
||||
|
||||
/datum/reagent/anaphrodisiac/on_mob_life(mob/living/M)
|
||||
if(prob(33))
|
||||
M.adjustArousalLoss(-2)
|
||||
..()
|
||||
|
||||
/datum/reagent/anaphrodisiacplus
|
||||
name = "Hexacamphor"
|
||||
id = "anaphro+"
|
||||
description = "Chemically condensed camphor. Causes an extreme reduction in libido and a permanent one if overdosed. Non-addictive."
|
||||
color = "#D9D9D9"//rgb(217, 217, 217)
|
||||
reagent_state = SOLID
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/anaphrodisiacplus/on_mob_life(mob/living/M)
|
||||
if(prob(33))
|
||||
M.adjustArousalLoss(-4)
|
||||
..()
|
||||
|
||||
/datum/reagent/anaphrodisiacplus/overdose_process(mob/living/M)
|
||||
if(prob(33))
|
||||
if(M.min_arousal > 0)
|
||||
M.min_arousal -= 1
|
||||
if(M.max_arousal > 75)
|
||||
M.min_arousal -= 1
|
||||
M.adjustArousalLoss(-2)
|
||||
..()
|
||||
|
||||
//recipes
|
||||
/datum/chemical_reaction/aphro
|
||||
name = "crocin"
|
||||
id = "aphro"
|
||||
results = list("aphro" = 6)
|
||||
required_reagents = list("carbon" = 2, "hydrogen" = 2, "oxygen" = 2, "water" = 1)
|
||||
required_temp = 400
|
||||
mix_message = "The mixture boils off a pink vapor..."//The water boils off, leaving the crocin
|
||||
|
||||
/datum/chemical_reaction/aphroplus
|
||||
name = "hexacrocin"
|
||||
id = "aphro+"
|
||||
results = list("aphro+" = 1)
|
||||
required_reagents = list("aphro" = 6, "phenol" = 1)
|
||||
required_temp = 400
|
||||
mix_message = "The mixture rapidly condenses and darkens in color..."
|
||||
|
||||
/datum/chemical_reaction/anaphro
|
||||
name = "camphor"
|
||||
id = "anaphro"
|
||||
results = list("anaphro" = 6)
|
||||
required_reagents = list("carbon" = 2, "hydrogen" = 2, "oxygen" = 2, "sulfur" = 1)
|
||||
required_temp = 400
|
||||
mix_message = "The mixture boils off a yellow, smelly vapor..."//Sulfur burns off, leaving the camphor
|
||||
|
||||
/datum/chemical_reaction/anaphroplus
|
||||
name = "pentacamphor"
|
||||
id = "anaphro+"
|
||||
results = list("anaphro+" = 1)
|
||||
required_reagents = list("anaphro" = 5, "acetone" = 1)
|
||||
required_temp = 300
|
||||
mix_message = "The mixture thickens and heats up slighty..."
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
@@ -0,0 +1,41 @@
|
||||
/obj/structure/reagent_dispensers/keg
|
||||
name = "keg"
|
||||
desc = "A keg."
|
||||
icon = 'code/citadel/icons/objects.dmi'
|
||||
icon_state = "keg"
|
||||
reagent_id = "water"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/mead
|
||||
name = "keg of mead"
|
||||
desc = "A keg of mead."
|
||||
icon_state = "orangekeg"
|
||||
reagent_id = "mead"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/aphro
|
||||
name = "keg of aphrodisiac"
|
||||
desc = "A keg of aphrodisiac."
|
||||
icon_state = "pinkkeg"
|
||||
reagent_id = "aphro"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/aphro/strong
|
||||
name = "keg of strong aphrodisiac"
|
||||
desc = "A keg of strong and addictive aphrodisiac."
|
||||
reagent_id = "aphro+"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/milk
|
||||
name = "keg of milk"
|
||||
desc = "It's not quite what you were hoping for."
|
||||
icon_state = "whitekeg"
|
||||
reagent_id = "milk"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/semen
|
||||
name = "keg of semen"
|
||||
desc = "Dear lord, where did this even come from?"
|
||||
icon_state = "whitekeg"
|
||||
reagent_id = "semen"
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/gargle
|
||||
name = "keg of pan galactic gargleblaster"
|
||||
desc = "A keg of... wow that's a long name."
|
||||
icon_state = "bluekeg"
|
||||
reagent_id = "gargleblaster"
|
||||
Reference in New Issue
Block a user