From dba2b6deaf62cf35c1e3cedf1888bff385eb9305 Mon Sep 17 00:00:00 2001 From: BurgerLua Date: Tue, 16 Apr 2019 11:55:54 -0700 Subject: [PATCH 1/4] Tweaks Electric Stimulator + Adds Bonermeter --- .../integrated_electronics/subtypes/input.dm | 29 +++++++++ .../subtypes/manipulation.dm | 60 +++++++++++++------ tgstation.dme | 1 + 3 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 modular_citadel/code/modules/integrated_electronics/subtypes/input.dm 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" From d49178fd84f7847ae045b0ac88edcb03841eab49 Mon Sep 17 00:00:00 2001 From: BurgerLua Date: Tue, 16 Apr 2019 12:10:03 -0700 Subject: [PATCH 2/4] Removed debug code, made the arousal input just be a flat value. --- .../integrated_electronics/subtypes/manipulation.dm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm index d60b641dfa..548d0b7c64 100644 --- a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -2,7 +2,7 @@ name = "electronic stimulation module" 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, 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." + 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 -35 to 35, with negative numbers reducing arousal and positive numbers increasing it by that amount." complexity = 15 size = 2 inputs = list("target" = IC_PINTYPE_REF, "strength" = IC_PINTYPE_NUMBER) @@ -20,7 +20,7 @@ if(!check_target(M)) return - var/arousal_gain = CLAMP(get_pin_data(IC_INPUT, 2)*(35/100),-35,35) + var/arousal_gain = CLAMP(get_pin_data(IC_INPUT, 2),-35,35) set_pin_data(IC_OUTPUT, 1, arousal_gain) if(ismob(M) && M.canbearoused && arousal_gain != 0) @@ -51,9 +51,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 + activate_pin(3) \ No newline at end of file From fdd0eb4b17dfb9943f8a5e68df4a8091e85b20ba Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 16 Apr 2019 15:40:55 -0700 Subject: [PATCH 3/4] Update modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm Co-Authored-By: BurgerLUA --- .../modules/integrated_electronics/subtypes/manipulation.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm index 548d0b7c64..246205f7b6 100644 --- a/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/modular_citadel/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -1,6 +1,6 @@ /obj/item/integrated_circuit/manipulation/electric_stimulator name = "electronic stimulation module" - desc = "Used to induce a target with sexual stimulation with electricity." + desc = "Used to induce sexual stimulation in a target via electricity." icon_state = "power_relay" 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 -35 to 35, with negative numbers reducing arousal and positive numbers increasing it by that amount." complexity = 15 @@ -51,4 +51,4 @@ else visible_message("\The [assembly] electrodes fail to shock [M]!") push_data() - activate_pin(3) \ No newline at end of file + activate_pin(3) From 7ff2b6817ba81baf7a758c019bbe24584270284a Mon Sep 17 00:00:00 2001 From: BurgerLua Date: Tue, 16 Apr 2019 21:06:57 -0700 Subject: [PATCH 4/4] No more seperate whatever --- .../integrated_electronics/subtypes/input.dm | 31 +++++++++++++++++++ .../integrated_electronics/subtypes/input.dm | 29 ----------------- tgstation.dme | 1 - 3 files changed, 31 insertions(+), 30 deletions(-) delete mode 100644 modular_citadel/code/modules/integrated_electronics/subtypes/input.dm diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 6e8b0cb777..a7c58e8669 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -1309,4 +1309,35 @@ set_pin_data(IC_OUTPUT, 2, regurgitated_contents) push_data() + activate_pin(2) + +//Degens +/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/input.dm b/modular_citadel/code/modules/integrated_electronics/subtypes/input.dm deleted file mode 100644 index 8dd13c618e..0000000000 --- a/modular_citadel/code/modules/integrated_electronics/subtypes/input.dm +++ /dev/null @@ -1,29 +0,0 @@ -/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/tgstation.dme b/tgstation.dme index 4f1cda7c23..5b4c4eabe5 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2897,7 +2897,6 @@ #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"