vibrators and code optimization!

This commit is contained in:
QuoteFox
2021-01-28 01:36:37 +00:00
parent 897b5995a6
commit 3772bbbcc5
11 changed files with 216 additions and 30 deletions

View File

@@ -7,30 +7,12 @@
. = ..()
var/dat = {"<B>Genitals</B><BR><HR>"}
//List genitals
var/obj/item/organ/genital/penis/P = user.getorganslot("penis")
if (P) //they have a pp
dat += "<a href='byond://?src=[REF(src)];hidepenis=1'>[P.mode == "hidden" ? "Penis <font color='red'>(Hidden)</font>" : (P.mode == "clothes" ? "Penis <font color='yellow'>(Hidden by Clothes)</font>" : (P.mode == "visable" ? "Penis <font color='green'>(Visable)</font>" : "Penis <font color='green'>(Visable)</font>"))]</a><BR>"
var/obj/item/organ/genital/testicles/T = user.getorganslot("testicles")
if (T) //they have teabags
if(!T.internal)
dat += "<a href='byond://?src=[REF(src)];hidetesticles=1'>[T.mode == "hidden" ? "Testicles <font color='red'>(Hidden)</font>" : (T.mode == "clothes" ? "Testicles <font color='yellow'>(Hidden by Clothes)</font>" : (T.mode == "visable" ? "Testicles <font color='green'>(Visable)</font>" : "Testicles <font color='green'>(Visable)</font>"))]</a><BR>"
else //internal balls
dat += "<a href='byond://?src=[REF(src)];na=1'>Internal Testicles</A><BR>"
var/obj/item/organ/genital/vagina/V = user.getorganslot("vagina")
if (V) //they have a vjay
dat += "<a href='byond://?src=[REF(src)];hidevagina=1'>[V.mode == "hidden" ? "Vagina <font color='red'>(Hidden)</font>" : (V.mode == "clothes" ? "Vagina <font color='yellow'>(Hidden by Clothes)</font>" : (V.mode == "visable" ? "Vagina <font color='green'>(Visable)</font>" : "Vagina <font color='green'>(Visable)</font>"))]</a><BR>"
var/obj/item/organ/genital/breasts/B = user.getorganslot("breasts")
if (B) //they have a boobiedoo
dat += "<a href='byond://?src=[REF(src)];hidebreasts=1'>[B.mode == "hidden" ? "Breasts <font color='red'>(Hidden)</font>" : (B.mode == "clothes" ? "Breasts <font color='yellow'>(Hidden by Clothes)</font>" : (B.mode == "visable" ? "Breasts <font color='green'>(Visable)</font>" : "Breasts <font color='green'>(Visable)</font>"))]</a><BR>"
var/obj/item/organ/genital/belly/E = user.getorganslot("belly")
if (E)
dat += "<a href='byond://?src=[REF(src)];hidebelly=1'>[E.mode == "hidden" ? "Belly <font color='red'>(Hidden)</font>" : (B.mode == "clothes" ? "Belly <font color='yellow'>(Hidden by Clothes)</font>" : (B.mode == "visable" ? "Belly <font color='green'>(Visable)</font>" : "Belly <font color='green'>(Visable)</font>"))]</a><BR>"
var/mob/living/carbon/U = user
for(var/obj/item/organ/genital/G in U.internal_organs)
dat += "<a href='byond://?src=[REF(src)];hide[G.name]=1'>[G.mode == "hidden" ? "[G.name] <font color='red'>(Hidden)</font>" : (G.mode == "clothes" ? "[G.name] <font color='yellow'>(Hidden by Clothes)</font>" : (G.mode == "visable" ? "[G.name] <font color='green'>(Visable)</font>" : "[G.name] <font color='green'>(Visable)</font>"))]</a><BR>"
dat += {"<BR><B>Contexual Options</B><BR><HR>"}
var/obj/item/organ/genital/penis/P = user.getorganslot("penis")
//Options
dat += "<a href='byond://?src=[REF(src)];masturbate=1'>Masturbate</A>"
dat += "(Stimulate a sexual organ with your hands.)<BR>"
@@ -63,12 +45,16 @@
dat += "<a href='byond://?src=[REF(src)];impreg=1'>Impregnate [user.pulling]</A>"
dat += "(Climax inside another person, knocking them up.)<BR>"
if(P) // They have a dick (make sure to check or this will break everything)
//old code needs to be cleaned
if(P)
if(P.condom == 1)
dat += "<a href='byond://?src=[REF(src)];removecondom=1'>Remove Condom</A><BR>"
dat += "<a href='byond://?src=[REF(src)];removecondom=1'>Remove condom (penis)</A><BR>"
if(P.sounding == 1)
dat += "<a href='byond://?src=[REF(src)];removesound=1'>Remove Sounding Rod</A><BR>"
dat += "<a href='byond://?src=[REF(src)];removesound=1'>Remove sounding rod (penis)</A><BR>"
for(var/obj/item/organ/genital/G in U.internal_organs)
if(G.equipment) //they have equipment
dat += "<a href='byond://?src=[REF(src)];removeequipment[G.name]=1;'>Remove [G.equipment.name] ([G.name]).</A><BR>"
dat += {"<HR>"}//Newline for the objects
//bottom options
dat += "<a href='byond://?src=[REF(src)];refresh=1'>Refresh</A>"
@@ -197,6 +183,31 @@
if(href_list["removesound"])
H.menuremovesounding()
if(href_list["removeequipmentpenis"])
var/obj/item/organ/genital/penis/O = usr.getorganslot("penis")
var/obj/item/I = O.equipment
usr.put_in_hands(I)
O.equipment = null
if(href_list["removeequipmentbreasts"])
var/obj/item/organ/genital/breasts/O = usr.getorganslot("breasts")
var/obj/item/I = O.equipment
usr.put_in_hands(I)
O.equipment = null
if(href_list["removeequipmentvagina"])
var/obj/item/organ/genital/vagina/O = usr.getorganslot("vagina")
var/obj/item/I = O.equipment
usr.put_in_hands(I)
O.equipment = null
if(href_list["removeequipmentbelly"])
var/obj/item/organ/genital/belly/O = usr.getorganslot("belly")
var/obj/item/I = O.equipment
usr.put_in_hands(I)
O.equipment = null
if(href_list["omenu"])
usr << browse(null, "window=arousal") //closes the window
H.mob_climax()
@@ -313,7 +324,6 @@ obj/screen/arousal/proc/kiss()
to_chat(src, "<span class='warning'>You cannot climax without choosing genitals.</span>")
return
/mob/living/carbon/human/proc/climaxwith(mob/living/T)
var/mob/living/carbon/human/L = pick_partner()

View File

View File

@@ -0,0 +1,153 @@
/obj/item/electropack/vibrator
name = "remote vibrator"
desc = "A remote device that can deliver pleasure at a fair. It has three intensities that can be set by twisting the base."
icon = 'hyperstation/icons/obj/vibrator.dmi'
icon_state = "vibe"
item_state = "vibe"
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_DENYPOCKET //no more pocket shockers
var/mode = 1
var/style = "long"
var/inside = FALSE
var/last = 0
/obj/item/electropack/vibrator/Initialize() //give the device its own code
. = ..()
code = rand(1,30)
/obj/item/electropack/vibrator/small //can go anywhere
name = "small remote vibrator"
style = "small"
icon_state = "vibesmall"
item_state = "vibesmall"
/obj/item/electropack/vibrator/AltClick(mob/living/user)
var/dat = {"
<TT>
<B>Frequency/Code</B> for vibrator:<BR>
Frequency:
[format_frequency(src.frequency)]
<A href='byond://?src=[REF(src)];set=freq'>Set</A><BR>
Code:
[src.code]
<A href='byond://?src=[REF(src)];set=code'>Set</A><BR>
</TT>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/electropack/shockcollar/security
name = "security shock collar"
desc = "A reinforced security collar. It has two electrodes that press against the neck, for disobedient pets."
icon_state = "shockseccollar"
item_state = "shockseccollar"
/obj/item/electropack/vibrator/attack_self(mob/user)
if(!istype(user))
return
if(isliving(user))
playsound(user, 'sound/effects/clock_tick.ogg', 50, 1, -1)
switch(mode)
if(1)
mode = 2
to_chat(user, "<span class='notice'>You twist the bottom of [src], setting it to the medium setting.</span>")
return
if(2)
mode = 3
to_chat(user, "<span class='warning'>You twist the bottom of [src], setting it to the high setting.</span>")
return
if(3)
mode = 1
to_chat(user, "<span class='notice'>You twist the bottom of [src], setting it to the low setting.</span>")
return
/obj/item/electropack/vibrator/attack(mob/living/carbon/C, mob/living/user)
var/obj/item/organ/genital/picked_organ
var/mob/living/carbon/human/S = user
var/mob/living/carbon/human/T = C
picked_organ = S.target_genitals(T)
if(picked_organ)
C.visible_message("<span class='warning'>[user] is trying to attach [src] to [T]!</span>",\
"<span class='warning'>[user] is trying to put [src] on you!</span>")
if(!do_mob(user, C, 5 SECONDS))//warn them and have a delay of 5 seconds to apply.
return
if(style == "long" && !(picked_organ.name == "vagina")) //long vibrators dont fit on anything but vaginas, but small ones fit everywhere
to_chat(user, "<span class='warning'>[src] is too big to fit there, use a smaller version.</span>")
return
if(!picked_organ.equipment)
if(!(style == "long"))
to_chat(user, "<span class='love'>You attach [src] to [T]'s [picked_organ.name].</span>")
else
to_chat(user, "<span class='love'>You insert [src] into [T]'s [picked_organ.name].</span>")
else
to_chat(user, "<span class='notice'>They already have a [picked_organ.equipment.name] there.</span>")
return
if(!user.transferItemToLoc(src, picked_organ)) //check if you can put it in
return
src.inside = TRUE
picked_organ.equipment = src
else
to_chat(user, "<span class='notice'>You don't see anywhere to attach this.</span>")
/obj/item/electropack/vibrator/receive_signal(datum/signal/signal)
if(!signal || signal.data["code"] != code)
return
if(last > world.time)
return
last = world.time + 3 SECONDS //lets stop spam.
if(inside)
var/obj/item/organ/genital/G = src.loc
var/mob/living/carbon/U = G.owner
if(G)
switch(G.name) //just being fancy
if("penis")
to_chat(U, "<span class='love'>[src] vibrates against your [G.name]!</span>")
if("breasts")
to_chat(U, "<span class='love'>[src] vibrates against your nipples!</span>")
if("vagina")
to_chat(U, "<span class='love'>[src] vibrates inside you!</span>")
var/intencity = 10*mode
U.adjustArousalLoss(intencity) //give pleasure
playsound(U.loc, 'sound/lewd/vibrate.ogg', intencity, 1, -1) //vibe
switch(mode)
if(1) //low
to_chat(U, "<span class='love'>You feel pleasure surgest through your [G.name]</span>")
if(2) //med, can make you cum
to_chat(U, "<span class='love'>You feel intense pleasure surgest through your [G.name]</span>")
U.Jitter(3)
if (U.getArousalLoss() >= 100 && ishuman(U) && U.has_dna())
U.mob_climax(forced_climax=TRUE)
if(3) //high, makes you stun
to_chat(U, "<span class='userdanger'>You feel overpowering pleasure surgest through your [G.name]</span>")
U.Jitter(3)
U.Stun(30)
if (U.getArousalLoss() >= 100 && ishuman(U) && U.has_dna())
U.mob_climax(forced_climax=TRUE)
if(prob(50))
U.emote("moan")
playsound(src, 'sound/lewd/vibrate.ogg', 40, 1, -1)
if(style == "long") //haha vibrator go brrrrrrr
icon_state = "vibing"
sleep(30)
icon_state = "vibe"
else
icon_state = "vibingsmall"
sleep(30)
icon_state = "vibesmall"

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

View File

@@ -59,7 +59,9 @@
/obj/item/clothing/under/polychromic/bulge = 3,
/obj/item/clothing/suit/maidapron = 3,
/obj/item/clothing/under/corset = 3,
/obj/item/clothing/under/jabroni = 3
/obj/item/clothing/under/jabroni = 3,
/obj/item/electropack/vibrator/small = 2,
/obj/item/electropack/vibrator = 2,
)
contraband = list(
/obj/item/restraints/handcuffs/fake/kinky = 5,

View File

@@ -473,12 +473,27 @@
for(var/obj/item/organ/genital/G in internal_organs)
if(G.can_masturbate_with) //filter out what you can't masturbate with
if(G.is_exposed(worn_stuff)) //Nude or through_clothing
genitals_list += G
if(!G.dontlist)
genitals_list += G
if(genitals_list.len)
ret_organ = input(src, "with what?", "Masturbate", null) as null|obj in genitals_list
return ret_organ
return null //error stuff
/mob/living/carbon/human/proc/target_genitals(mob/living/carbon/human/T) //used for targeting others
var/obj/item/organ/genital/ret_organ
var/list/genitals_list = list()
var/list/worn_stuff = get_equipped_items()
for(var/obj/item/organ/genital/G in T.internal_organs)
if(G.can_climax) //filter out what you can't masturbate with
if(G.is_exposed(worn_stuff)) //Nude or through_clothing
if(!G.dontlist)
genitals_list += G
if(genitals_list.len)
ret_organ = input(src, "", "Gentials", null) as null|obj in genitals_list
return ret_organ
return null //error stuff
/mob/living/carbon/human/proc/pick_climax_genitals()
var/obj/item/organ/genital/ret_organ
@@ -488,7 +503,8 @@
for(var/obj/item/organ/genital/G in internal_organs)
if(G.can_climax) //filter out what you can't masturbate with
if(G.is_exposed(worn_stuff)) //Nude or through_clothing
genitals_list += G
if(!G.dontlist)
genitals_list += G
if(genitals_list.len)
ret_organ = input(src, "with what?", "Climax", null) as null|obj in genitals_list
return ret_organ

View File

@@ -15,6 +15,7 @@
can_climax = TRUE
fluid_transfer_factor = 0.5
var/sent_full_message = TRUE //defaults to 1 since they're full to start
dontlist = TRUE
/obj/item/organ/genital/belly/on_life()
if(QDELETED(src))

View File

@@ -23,6 +23,8 @@
var/hidden = FALSE
var/colourtint = ""
var/mode = "clothes"
var/obj/item/equipment //for fun stuff that goes on the gentials/maybe rings down the line
var/dontlist = FALSE
/obj/item/organ/genital/Initialize()
. = ..()

View File

@@ -19,6 +19,7 @@
masturbation_verb = "massage"
can_climax = TRUE
var/sent_full_message = TRUE //defaults to 1 since they're full to start
dontlist = TRUE
/obj/item/organ/genital/testicles/on_life()

BIN
sound/lewd/vibrate.ogg Normal file

Binary file not shown.

View File

@@ -3073,6 +3073,7 @@
#include "hyperstation\code\obj\rope.dm"
#include "hyperstation\code\obj\sizeitems.dm"
#include "hyperstation\code\obj\sounding.dm"
#include "hyperstation\code\obj\vibrator.dm"
#include "interface\interface.dm"
#include "interface\menu.dm"
#include "interface\stylesheet.dm"