diff --git a/modular_citadel/code/modules/integrated_electronics/subtypes/input.dm b/modular_citadel/code/modules/integrated_electronics/subtypes/input.dm
new file mode 100644
index 0000000000..8dd13c618e
--- /dev/null
+++ b/modular_citadel/code/modules/integrated_electronics/subtypes/input.dm
@@ -0,0 +1,29 @@
+/obj/item/integrated_circuit/input/bonermeter
+ name = "bonermeter"
+ desc = "Detects the target's arousal and various statistics about the target's arousal levels. Invasive!"
+ icon_state = "medscan"
+ complexity = 4
+ inputs = list("target" = IC_PINTYPE_REF)
+ outputs = list(
+ "current arousal" = IC_PINTYPE_NUMBER,
+ "minimum arousal" = IC_PINTYPE_NUMBER,
+ "maximum arousal" = IC_PINTYPE_NUMBER,
+ "can be aroused" = IC_PINTYPE_BOOLEAN
+ )
+ activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
+ spawn_flags = IC_SPAWN_RESEARCH
+ power_draw_per_use = 40
+
+/obj/item/integrated_circuit/input/bonermeter/do_work()
+
+ var/mob/living/L = get_pin_data_as_type(IC_INPUT, 1, /mob/living)
+
+ if(!istype(L) || !L.Adjacent(get_turf(src)) ) //Invalid input
+ return
+
+ set_pin_data(IC_OUTPUT, 1, L.getArousalLoss())
+ set_pin_data(IC_OUTPUT, 2, L.min_arousal)
+ set_pin_data(IC_OUTPUT, 3, L.max_arousal)
+ set_pin_data(IC_OUTPUT, 4, L.canbearoused)
+ push_data()
+ activate_pin(2)
\ No newline at end of file
diff --git a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm
index 79d229c757..d60b641dfa 100644
--- a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm
+++ b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm
@@ -1,33 +1,59 @@
/obj/item/integrated_circuit/manipulation/electric_stimulator
name = "electronic stimulation module"
- desc = "Used to induce sexual stimulation with electricity."
+ desc = "Used to induce a target with sexual stimulation with electricity."
icon_state = "power_relay"
- extended_desc = "The circuit accepts a reference to a person and upon activation, attempts to stimulate them to orgasm."
- complexity = 10
- size = 3
- inputs = list("target" = IC_PINTYPE_REF)
- outputs = list()
- activators = list("fire" = IC_PINTYPE_PULSE_IN)
+ extended_desc = "The circuit accepts a reference to a person, as well as a number representing the strength of the shock, and upon activation, attempts to stimulate them to orgasm. The number ranges from -100 to 100, with negative numbers reducing arousal and positive numbers increasing it."
+ complexity = 15
+ size = 2
+ inputs = list("target" = IC_PINTYPE_REF, "strength" = IC_PINTYPE_NUMBER)
+ outputs = list("arousal gain"=IC_PINTYPE_NUMBER)
+ activators = list("fire" = IC_PINTYPE_PULSE_IN, "on success" = IC_PINTYPE_PULSE_OUT, "on fail" = IC_PINTYPE_PULSE_OUT, "on orgasm" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 500
cooldown_per_use = 50
+ ext_cooldown = 25
/obj/item/integrated_circuit/manipulation/electric_stimulator/do_work()
..()
+ set_pin_data(IC_OUTPUT, 1, 0)
var/mob/living/M = get_pin_data_as_type(IC_INPUT, 1, /mob/living)
if(!check_target(M))
return
- if(ismob(M) && M.canbearoused)
- if(M.getArousalLoss() >= 100 && ishuman(M) && M.has_dna())
- var/mob/living/carbon/human/H = M
- var/orgasm_message = pick("A sharp pulse of electricity pushes you to orgasm!", "You feel a jolt of electricity force you into orgasm!")
- H.visible_message("\The [assembly] electrodes shock [H]!", "[orgasm_message]")
- playsound(src, "sound/effects/light_flicker.ogg", 30, 1)
- H.mob_climax(forced_climax=TRUE)
+
+ var/arousal_gain = CLAMP(get_pin_data(IC_INPUT, 2)*(35/100),-35,35)
+ set_pin_data(IC_OUTPUT, 1, arousal_gain)
+
+ if(ismob(M) && M.canbearoused && arousal_gain != 0)
+ var/orgasm = FALSE
+ if(arousal_gain > 0)
+ if(M.getArousalLoss() >= 100 && ishuman(M) && M.has_dna())
+ var/mob/living/carbon/human/H = M
+ var/orgasm_message = pick("A sharp pulse of electricity pushes you to orgasm!", "You feel a jolt of electricity force you into orgasm!")
+ H.visible_message("\The [assembly] electrodes shock [H]!", "[orgasm_message]")
+ playsound(src, "sound/effects/light_flicker.ogg", 30, 1)
+ H.mob_climax(forced_climax=TRUE)
+ orgasm = TRUE
+ else
+ M.adjustArousalLoss(arousal_gain)
+ var/stimulate_message = pick("You feel a sharp warming tingle of electricity through your body!", "A burst of arousing electricity flows through your body!")
+ M.visible_message("\The [assembly] electrodes shock [M]!", "[stimulate_message]")
+
else
- M.adjustArousalLoss(35)
- var/stimulate_message = pick("You feel a sharp warming tingle of electricity through your body!", "A burst of arousing electricity flows through your body!")
+ var/stimulate_message = pick("You feel a dull prickle of electricity through your body!", "A burst of dull electricity flows through your body!")
M.visible_message("\The [assembly] electrodes shock [M]!", "[stimulate_message]")
- playsound(src, "sound/effects/light_flicker.ogg", 30, 1)
+ M.adjustArousalLoss(arousal_gain)
+
+ playsound(src, "sound/effects/light_flicker.ogg", 30, 1)
+ push_data()
+ activate_pin(2)
+ if(orgasm) activate_pin(4)
+
else
visible_message("\The [assembly] electrodes fail to shock [M]!")
+ push_data()
+ activate_pin(3)
+
+
+/*
+{"assembly":{"type":"type-a electronic mechanism"},"components":[{"type":"bonermeter"},{"type":"electronic stimulation module"},{"type":"number pad"},{"type":"local locator"},{"type":"text-to-speech circuit","inputs":[[1,0,"Orgasm"]]},{"type":"text-to-speech circuit","inputs":[[1,0,"Scanned"]]},{"type":"text-to-speech circuit"}],"wires":[[[1,"I",1],[4,"O",1]],[[1,"A",1],[2,"A",2]],[[1,"A",2],[6,"A",1]],[[2,"I",1],[4,"O",1]],[[2,"I",2],[3,"O",1]],[[2,"A",1],[4,"A",2]],[[2,"A",4],[5,"A",1]],[[3,"A",1],[4,"A",1]]]}
+/*
\ No newline at end of file
diff --git a/tgstation.dme b/tgstation.dme
index 5b4c4eabe5..4f1cda7c23 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2897,6 +2897,7 @@
#include "modular_citadel\code\modules\events\blob.dm"
#include "modular_citadel\code\modules\events\wizard\magicarp.dm"
#include "modular_citadel\code\modules\food_and_drinks\snacks\meat.dm"
+#include "modular_citadel\code\modules\integrated_electronics\subtypes\input.dm"
#include "modular_citadel\code\modules\integrated_electronics\subtypes\manipulation.dm"
#include "modular_citadel\code\modules\jobs\dresscode_values.dm"
#include "modular_citadel\code\modules\jobs\job_types\captain.dm"