This commit is contained in:
Ghommie
2019-08-24 19:05:51 +02:00
763 changed files with 18834 additions and 6252 deletions
@@ -17,10 +17,14 @@
time = 155
/datum/surgery_step/ground_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts splicing together [target]'s nerves.", "<span class='notice'>You start splicing together [target]'s nerves.</span>")
display_results(user, target, "<span class='notice'>You start rerouting [target]'s nerves.</span>",
"[user] starts rerouting [target]'s nerves.",
"[user] starts manipulating [target]'s nervous system.")
/datum/surgery_step/ground_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully splices [target]'s nervous system!", "<span class='notice'>You successfully splice [target]'s nervous system!</span>")
display_results(user, target, "<span class='notice'>You successfully reroute [target]'s nervous system!</span>",
"[user] successfully reroutes [target]'s nervous system!",
"[user] finishes manipulating [target]'s nervous system.")
new /datum/bioware/grounded_nerves(target)
return TRUE
@@ -37,4 +41,4 @@
/datum/bioware/grounded_nerves/on_lose()
..()
owner.physiology.siemens_coeff = prev_coeff
owner.physiology.siemens_coeff = prev_coeff
@@ -10,17 +10,20 @@
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
bioware_target = BIOWARE_NERVES
/datum/surgery_step/splice_nerves
name = "splice nerves"
accept_hand = TRUE
time = 155
/datum/surgery_step/splice_nerves/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts splicing together [target]'s nerves.", "<span class='notice'>You start splicing together [target]'s nerves.</span>")
display_results(user, target, "<span class='notice'>You start splicing together [target]'s nerves.</span>",
"[user] starts splicing together [target]'s nerves.",
"[user] starts manipulating [target]'s nervous system.")
/datum/surgery_step/splice_nerves/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully splices [target]'s nervous system!", "<span class='notice'>You successfully splice [target]'s nervous system!</span>")
display_results(user, target, "<span class='notice'>You successfully splice [target]'s nervous system!</span>",
"[user] successfully splices [target]'s nervous system!",
"[user] finishes manipulating [target]'s nervous system.")
new /datum/bioware/spliced_nerves(target)
return TRUE
@@ -28,11 +31,9 @@
name = "Spliced Nerves"
desc = "Nerves are connected to each other multiple times, greatly reducing the impact of stunning effects."
mod_type = BIOWARE_NERVES
/datum/bioware/spliced_nerves/on_gain()
..()
owner.physiology.stun_mod *= 0.5
/datum/bioware/spliced_nerves/on_lose()
..()
owner.physiology.stun_mod *= 2
owner.physiology.stun_mod *= 2
@@ -10,17 +10,20 @@
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
bioware_target = BIOWARE_CIRCULATION
/datum/surgery_step/thread_veins
name = "thread veins"
accept_hand = TRUE
time = 125
/datum/surgery_step/thread_veins/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts weaving [target]'s circulatory system.", "<span class='notice'>You start weaving [target]'s circulatory system.</span>")
display_results(user, target, "<span class='notice'>You start weaving [target]'s circulatory system.</span>",
"[user] starts weaving [target]'s circulatory system.",
"[user] starts manipulating [target]'s circulatory system.")
/datum/surgery_step/thread_veins/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] weaves [target]'s circulatory system into a resistant mesh!", "<span class='notice'>You weave [target]'s circulatory system into a resistant mesh!</span>")
display_results(user, target, "<span class='notice'>You weave [target]'s circulatory system into a resistant mesh!</span>",
"[user] weaves [target]'s circulatory system into a resistant mesh!",
"[user] finishes manipulating [target]'s circulatory system.")
new /datum/bioware/threaded_veins(target)
return TRUE
@@ -28,11 +31,9 @@
name = "Threaded Veins"
desc = "The circulatory system is woven into a mesh, severely reducing the amount of blood lost from wounds."
mod_type = BIOWARE_CIRCULATION
/datum/bioware/threaded_veins/on_gain()
..()
owner.physiology.bleed_mod *= 0.25
/datum/bioware/threaded_veins/on_lose()
..()
owner.physiology.bleed_mod *= 4
owner.physiology.bleed_mod *= 4
+13 -11
View File
@@ -2,7 +2,6 @@
name = "Brainwashing Surgery Disk"
desc = "The disk provides instructions on how to impress an order on a brain, making it the primary objective of the patient."
surgeries = list(/datum/surgery/advanced/brainwashing)
/datum/surgery/advanced/brainwashing
name = "Brainwashing"
desc = "A surgical procedure which directly implants a directive into the patient's brain, making it their absolute priority. It can be cleared using a mindshield implant."
@@ -13,10 +12,9 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/brainwash,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_HEAD)
/datum/surgery/advanced/brainwashing/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
@@ -24,27 +22,29 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/brainwash
name = "brainwash"
implements = list(/obj/item/hemostat = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 200
var/objective
/datum/surgery_step/brainwash/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
objective = stripped_input(user, "Choose the objective to imprint on your victim's brain.", "Brainwashing", null, MAX_MESSAGE_LEN)
if(!objective)
return -1
user.visible_message("[user] begins to tinker with [target]'s brain.", "<span class='notice'>You begin to brainwash [target]...</span>")
display_results(user, target, "<span class='notice'>You begin to brainwash [target]...</span>",
"[user] begins to fix [target]'s brain.",
"[user] begins to perform surgery on [target]'s brain.")
/datum/surgery_step/brainwash/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(!target.mind)
user.visible_message("[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...")
to_chat(user, "<span class='warning'>[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...</span>")
return FALSE
if(HAS_TRAIT(target, TRAIT_MINDSHIELD))
user.visible_message("You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.")
to_chat(user, "<span class='warning'>You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.</span>")
return FALSE
user.visible_message("[user] successfully brainwashes [target]!", "<span class='notice'>You succeed in brainwashing [target].</span>")
display_results(user, target, "<span class='notice'>You succeed in brainwashing [target].</span>",
"[user] successfully fixes [target]'s brain!",
"[user] completes the surgery on [target]'s brain.")
to_chat(target, "<span class='userdanger'>A new compulsion fills your mind... you feel forced to obey it!</span>")
brainwash(target, objective)
message_admins("[ADMIN_LOOKUPFLW(user)] surgically brainwashed [ADMIN_LOOKUPFLW(target)] with the objective '[objective]'.")
@@ -53,8 +53,10 @@
/datum/surgery_step/brainwash/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorganslot(ORGAN_SLOT_BRAIN))
user.visible_message("<span class='warning'>[user] damages some brain tissue!</span>", "<span class='warning'>You bruise some brain tissue!</span>")
display_results(user, target, "<span class='warning'>You screw up, bruising the brain tissue!</span>",
"<span class='warning'>[user] screws up, causing brain damage!</span>",
"[user] completes the surgery on [target]'s brain.")
target.adjustBrainLoss(40)
else
user.visible_message("<span class='warning'>[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "<span class='warning'>You suddenly notice that the brain you were working on is not there anymore.</span>")
return FALSE
return FALSE
+10 -7
View File
@@ -12,7 +12,6 @@
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/lobotomy/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
@@ -20,23 +19,25 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/lobotomize
name = "perform lobotomy"
implements = list(/obj/item/scalpel = 85, /obj/item/melee/transforming/energy/sword = 55, /obj/item/kitchen/knife = 35,
/obj/item/shard = 25, /obj/item = 20)
time = 100
/datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
return FALSE
return TRUE
/datum/surgery_step/lobotomize/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to cut a piece of [target]'s brain.", "<span class='notice'>You begin to cut a piece of [target]'s brain...</span>")
display_results(user, target, "<span class='notice'>You begin to perform a lobotomy on [target]'s brain...</span>",
"[user] begins to perform a lobotomy on [target]'s brain.",
"[user] begins to perform surgery on [target]'s brain.")
/datum/surgery_step/lobotomize/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully lobotomizes [target]!", "<span class='notice'>You succeed in lobotomizing [target].</span>")
display_results(user, target, "<span class='notice'>You succeed in lobotomizing [target].</span>",
"[user] successfully lobotomizes [target]!",
"[user] completes the surgery on [target]'s brain.")
target.cure_all_traumas(TRAUMA_RESILIENCE_LOBOTOMY)
if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
@@ -51,7 +52,9 @@
/datum/surgery_step/lobotomize/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorganslot(ORGAN_SLOT_BRAIN))
user.visible_message("<span class='warning'>[user] removes the wrong part, causing more damage!</span>", "<span class='warning'>You remove the wrong part, causing more damage!</span>")
display_results(user, target, "<span class='warning'>You remove the wrong part, causing more damage!</span>",
"[user] successfully lobotomizes [target]!",
"[user] completes the surgery on [target]'s brain.")
target.adjustBrainLoss(80)
switch(rand(1,3))
if(1)
@@ -62,4 +65,4 @@
target.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_MAGIC)
else
user.visible_message("<span class='warning'>[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "<span class='warning'>You suddenly notice that the brain you were working on is not there anymore.</span>")
return FALSE
return FALSE
@@ -7,9 +7,7 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/bionecrosis,
/datum/surgery_step/close)
possible_locs = list(BODY_ZONE_HEAD)
/datum/surgery/advanced/necrotic_revival/can_start(mob/user, mob/living/carbon/target)
. = ..()
var/obj/item/organ/zombie_infection/ZI = target.getorganslot(ORGAN_SLOT_ZOMBIE)
@@ -19,16 +17,21 @@
/datum/surgery_step/bionecrosis
name = "start bionecrosis"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30)
time = 50
chems_needed = list("zombiepowder", "rezadone")
require_all_chems = FALSE
/datum/surgery_step/bionecrosis/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to stimulate [target]'s brain.", "<span class='notice'>You begin to stimulate [target]'s brain...</span>")
display_results(user, target, "<span class='notice'>You begin to grow a romerol tumor on [target]'s brain...</span>",
"[user] begins to tinker with [target]'s brain...",
"[user] begins to perform surgery on [target]'s brain.")
/datum/surgery_step/bionecrosis/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully grows a necrotic tumor on [target]'s brain!", "<span class='notice'>You succeed in growing a necrotic tumor on [target]'s brain.</span>")
display_results(user, target, "<span class='notice'>You succeed in growing a romerol tumor on [target]'s brain.</span>",
"[user] successfully grows a romerol tumor on [target]'s brain!",
"[user] completes the surgery on [target]'s brain.")
if(!target.getorganslot(ORGAN_SLOT_ZOMBIE))
var/obj/item/organ/zombie_infection/ZI = new()
ZI.Insert(target)
return TRUE
return TRUE
+10 -7
View File
@@ -7,31 +7,34 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/pacify,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/pacify/can_start(mob/user, mob/living/carbon/target)
. = ..()
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
return FALSE
/datum/surgery_step/pacify
name = "rewire brain"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
time = 40
/datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to reshape [target]'s brain.", "<span class='notice'>You begin to reshape [target]'s brain...</span>")
display_results(user, target, "<span class='notice'>You begin to pacify [target]...</span>",
"[user] begins to fix [target]'s brain.",
"[user] begins to perform surgery on [target]'s brain.")
/datum/surgery_step/pacify/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] reshapes [target]'s brain!", "<span class='notice'>You succeed in reshaping [target]'s brain.</span>")
display_results(user, target, "<span class='notice'>You succeed in neurologically pacifying [target].</span>",
"[user] successfully fixes [target]'s brain!",
"[user] completes the surgery on [target]'s brain.")
target.gain_trauma(/datum/brain_trauma/severe/pacifism, TRAUMA_RESILIENCE_LOBOTOMY)
return TRUE
/datum/surgery_step/pacify/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] reshapes [target]'s brain!", "<span class='notice'>You screwed up, and rewired [target]'s brain the wrong way around...</span>")
display_results(user, target, "<span class='notice'>You screw up, rewiring [target]'s brain the wrong way around...</span>",
"<span class='warning'>[user] screws up, causing brain damage!</span>",
"[user] completes the surgery on [target]'s brain.")
target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
return FALSE
return FALSE
+12 -8
View File
@@ -8,11 +8,9 @@
/datum/surgery_step/incise,
/datum/surgery_step/revive,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery/advanced/revival/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
@@ -24,12 +22,10 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/revive
name = "electrically stimulate brain"
implements = list(/obj/item/twohanded/shockpaddles = 100, /obj/item/abductor/gizmo = 100, /obj/item/melee/baton = 75, /obj/item/organ/cyberimp/arm/baton = 75, /obj/item/organ/cyberimp/arm/gun/taser = 60, /obj/item/gun/energy/e_gun/advtaser = 60, /obj/item/gun/energy/taser = 60)
time = 120
/datum/surgery_step/revive/tool_check(mob/user, obj/item/tool)
. = TRUE
if(istype(tool, /obj/item/twohanded/shockpaddles))
@@ -51,25 +47,33 @@
return FALSE
/datum/surgery_step/revive/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] prepares to shock [target]'s brain with [tool].", "<span class='notice'>You prepare to give [target]'s brain the spark of life with [tool].</span>")
display_results(user, target, "<span class='notice'>You prepare to give [target]'s brain the spark of life with [tool].</span>",
"[user] prepares to shock [target]'s brain with [tool].",
"[user] prepares to shock [target]'s brain with [tool].")
target.notify_ghost_cloning("Someone is trying to zap your brain. Re-enter your corpse if you want to be revived!", source = target)
/datum/surgery_step/revive/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] send a powerful shock to [target]'s brain with [tool]...", "<span class='notice'>You successfully shock [target]'s brain with [tool]...</span>")
display_results(user, target, "<span class='notice'>You successfully shock [target]'s brain with [tool]...</span>",
"[user] send a powerful shock to [target]'s brain with [tool]...",
"[user] send a powerful shock to [target]'s brain with [tool]...")
playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1)
target.adjustOxyLoss(-50, 0)
target.updatehealth()
if(target.revive())
user.visible_message("...[target] wakes up, alive and aware!", "<span class='notice'><b>IT'S ALIVE!</b></span>")
target.visible_message("...[target] wakes up, alive and aware!")
target.emote("gasp")
target.adjustBrainLoss(50, 199) //MAD SCIENCE
return TRUE
else
user.visible_message("...[target.p_they()] convulses, then lies still.")
target.visible_message("...[target.p_they()] convulses, then lies still.")
return FALSE
/datum/surgery_step/revive/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.", "<span class='notice'>You shock [target]'s brain with [tool], but [target.p_they()] doesn't react.</span>")
display_results(user, target, "<span class='notice'>You shock [target]'s brain with [tool], but [target.p_they()] doesn't react.</span>",
"[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.",
"[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.")
playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1)
target.adjustBrainLoss(15, 199)
return FALSE
return FALSE
@@ -7,17 +7,14 @@
/datum/surgery_step/incise,
/datum/surgery_step/viral_bond,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
/datum/surgery/advanced/viral_bonding/can_start(mob/user, mob/living/carbon/target)
if(!..())
return FALSE
if(!LAZYLEN(target.diseases))
return FALSE
return TRUE
/datum/surgery_step/viral_bond
name = "viral bond"
implements = list(/obj/item/cautery = 100, TOOL_WELDER = 50, /obj/item = 30) // 30% success with any hot item.
@@ -27,15 +24,18 @@
/datum/surgery_step/viral_bond/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return TRUE
/datum/surgery_step/viral_bond/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] starts heating [target]'s bone marrow with [tool]...", "<span class='notice'>You start heating [target]'s bone marrow with [tool]...</span>")
display_results(user, target, "<span class='notice'>You start heating [target]'s bone marrow with [tool]...</span>",
"[user] starts heating [target]'s bone marrow with [tool]...",
"[user] starts heating something in [target]'s chest with [tool]...")
/datum/surgery_step/viral_bond/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[target]'s bone marrow begins pulsing slowly.", "<span class='notice'>[target]'s bone marrow begins pulsing slowly. The viral bonding is complete.</span>")
display_results(user, target, "<span class='notice'>[target]'s bone marrow begins pulsing slowly. The viral bonding is complete.</span>",
"[target]'s bone marrow begins pulsing slowly.",
"[user] finishes the operation.")
for(var/X in target.diseases)
var/datum/disease/D = X
D.carrier = TRUE
return TRUE
return TRUE
+8 -8
View File
@@ -1,25 +1,25 @@
/datum/surgery/amputation
name = "amputation"
name = "Amputation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/sever_limb)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery_step/sever_limb
name = "sever limb"
implements = list(/obj/item/scalpel = 100, /obj/item/circular_saw = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100, /obj/item/melee/arm_blade = 80, /obj/item/twohanded/required/chainsaw = 80, /obj/item/mounted_chainsaw = 80, /obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 40, /obj/item/kitchen/knife/butcher = 25)
time = 64
/datum/surgery_step/sever_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to sever [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You begin to sever [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to sever [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to sever [target]'s [parse_zone(target_zone)]!",
"[user] begins to sever [target]'s [parse_zone(target_zone)]!")
/datum/surgery_step/sever_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/mob/living/carbon/human/L = target
user.visible_message("[user] severs [L]'s [parse_zone(target_zone)]!", "<span class='notice'>You sever [L]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You sever [L]'s [parse_zone(target_zone)].</span>",
"[user] severs [L]'s [parse_zone(target_zone)]!",
"[user] severs [L]'s [parse_zone(target_zone)]!")
if(surgery.operated_bodypart)
var/obj/item/bodypart/target_limb = surgery.operated_bodypart
target_limb.drop_limb()
return 1
return 1
+2 -1
View File
@@ -354,7 +354,8 @@
if("mam_body_markings" in S.default_features)
var/datum/sprite_accessory/Smark
Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]]
body_markings_icon = Smark.icon
if(Smark)
body_markings_icon = Smark.icon
if(H.dna.features.["mam_body_markings"] != "None")
body_markings = lowertext(H.dna.features.["mam_body_markings"])
auxmarking = lowertext(H.dna.features.["mam_body_markings"])
@@ -20,8 +20,8 @@
icon_state = "borg_l_arm"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
brute_reduction = 2
burn_reduction = 1
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -41,8 +41,8 @@
icon_state = "borg_r_arm"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
brute_reduction = 2
burn_reduction = 1
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -62,8 +62,8 @@
icon_state = "borg_l_leg"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
brute_reduction = 2
burn_reduction = 1
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -83,8 +83,8 @@
icon_state = "borg_r_leg"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
brute_reduction = 2
burn_reduction = 1
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -103,8 +103,8 @@
icon_state = "borg_chest"
status = BODYPART_ROBOTIC
brute_reduction = 5
burn_reduction = 4
brute_reduction = 2
burn_reduction = 1
light_brute_msg = ROBOTIC_LIGHT_BRUTE_MSG
medium_brute_msg = ROBOTIC_MEDIUM_BRUTE_MSG
@@ -268,38 +268,38 @@
burn_reduction = 0
max_damage = 20
// Upgraded Surplus lims
// Upgraded Surplus lims - Better then robotic lims
/obj/item/bodypart/l_arm/robot/surplus_upgraded
name = "reinforced surplus prosthetic left arm"
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection."
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 1
burn_reduction = 1
max_damage = 30
brute_reduction = 3
burn_reduction = 2
max_damage = 55
/obj/item/bodypart/r_arm/robot/surplus_upgraded
name = "reinforced surplus prosthetic right arm"
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection."
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 1
burn_reduction = 1
max_damage = 30
brute_reduction = 3
burn_reduction = 2
max_damage = 55
/obj/item/bodypart/l_leg/robot/surplus_upgraded
name = "reinforced surplus prosthetic left leg"
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection."
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 1
burn_reduction = 1
max_damage = 30
brute_reduction = 3
burn_reduction = 2
max_damage = 55
/obj/item/bodypart/r_leg/robot/surplus_upgraded
name = "reinforced surplus prosthetic right leg"
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection."
desc = "A skeletal, robotic limb. This one is reinforced to provide better protection, and is made of stronger parts."
icon = 'icons/mob/augmentation/surplus_augments.dmi'
brute_reduction = 1
burn_reduction = 1
max_damage = 30
brute_reduction = 3
burn_reduction = 2
max_damage = 55
#undef ROBOTIC_LIGHT_BRUTE_MSG
#undef ROBOTIC_MEDIUM_BRUTE_MSG
+11 -8
View File
@@ -1,5 +1,5 @@
/datum/surgery/brain_surgery
name = "brain surgery"
name = "Brain surgery"
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
@@ -7,16 +7,13 @@
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/fix_brain,
/datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_HEAD)
requires_bodypart_type = 0
/datum/surgery_step/fix_brain
name = "fix brain"
implements = list(/obj/item/hemostat = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
time = 120 //long and complicated
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
@@ -24,10 +21,14 @@
return TRUE
/datum/surgery_step/fix_brain/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to fix [target]'s brain.", "<span class='notice'>You begin to fix [target]'s brain...</span>")
display_results(user, target, "<span class='notice'>You begin to fix [target]'s brain...</span>",
"[user] begins to fix [target]'s brain.",
"[user] begins to perform surgery on [target]'s brain.")
/datum/surgery_step/fix_brain/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully fixes [target]'s brain!", "<span class='notice'>You succeed in fixing [target]'s brain.</span>")
display_results(user, target, "<span class='notice'>You succeed in fixing [target]'s brain.</span>",
"[user] successfully fixes [target]'s brain!",
"[user] completes the surgery on [target]'s brain.")
if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
target.adjustBrainLoss(-60)
@@ -36,9 +37,11 @@
/datum/surgery_step/fix_brain/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorganslot(ORGAN_SLOT_BRAIN))
user.visible_message("<span class='warning'>[user] screws up, causing more damage!</span>", "<span class='warning'>You screw up, causing more damage!</span>")
display_results(user, target, "<span class='warning'>You screw up, causing more damage!</span>",
"<span class='warning'>[user] screws up, causing brain damage!</span>",
"[user] completes the surgery on [target]'s brain.")
target.adjustBrainLoss(60)
target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
else
user.visible_message("<span class='warning'>[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "<span class='warning'>You suddenly notice that the brain you were working on is not there anymore.</span>")
return FALSE
return FALSE
+19 -17
View File
@@ -1,30 +1,32 @@
/datum/surgery/cavity_implant
name = "cavity implant"
name = "Cavity implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/handle_cavity, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
//handle cavity
/datum/surgery_step/handle_cavity
name = "implant item"
accept_hand = 1
accept_any_item = 1
implements = list(/obj/item = 100)
repeatable = TRUE
time = 32
var/obj/item/IC = null
/datum/surgery_step/handle_cavity/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/cautery) || istype(tool, /obj/item/gun/energy/laser))
return FALSE
return !tool.is_hot()
/datum/surgery_step/handle_cavity/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)
IC = CH.cavity_item
if(tool)
if(istype(tool, /obj/item/surgical_drapes) || istype(tool, /obj/item/bedsheet))
var/obj/item/inactive = user.get_inactive_held_item()
if(istype(inactive, /obj/item/cautery) || istype(inactive, /obj/item/screwdriver) || iscyborg(user))
attempt_cancel_surgery(surgery, tool, target, user)
return -1
user.visible_message("[user] begins to insert [tool] into [target]'s [target_zone].", "<span class='notice'>You begin to insert [tool] into [target]'s [target_zone]...</span>")
display_results(user, target, "<span class='notice'>You begin to insert [tool] into [target]'s [target_zone]...</span>",
"[user] begins to insert [tool] into [target]'s [target_zone].",
"[user] begins to insert [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].")
else
user.visible_message("[user] checks for items in [target]'s [target_zone].", "<span class='notice'>You check for items in [target]'s [target_zone]...</span>")
display_results(user, target, "<span class='notice'>You check for items in [target]'s [target_zone]...</span>",
"[user] checks for items in [target]'s [target_zone].",
"[user] looks for something in [target]'s [target_zone].")
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)
@@ -32,18 +34,18 @@
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
to_chat(user, "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>")
return 0
var/obj/item/electronic_assembly/EA = tool
if(istype(EA) && EA.combat_circuits && tool.w_class > WEIGHT_CLASS_SMALL)
to_chat(user, "<span class='warning'>[tool] is too dangerous to put in [target]'s [target_zone]! Maybe if it was smaller...</span>")
return 0
else
user.visible_message("[user] stuffs [tool] into [target]'s [target_zone]!", "<span class='notice'>You stuff [tool] into [target]'s [target_zone].</span>")
display_results(user, target, "<span class='notice'>You stuff [tool] into [target]'s [target_zone].</span>",
"[user] stuffs [tool] into [target]'s [target_zone]!",
"[user] stuffs [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].")
user.transferItemToLoc(tool, target, TRUE)
CH.cavity_item = tool
return 1
else
if(IC)
user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "<span class='notice'>You pull [IC] out of [target]'s [target_zone].</span>")
display_results(user, target, "<span class='notice'>You pull [IC] out of [target]'s [target_zone].</span>",
"[user] pulls [IC] out of [target]'s [target_zone]!",
"[user] pulls [IC.w_class > WEIGHT_CLASS_SMALL ? IC : "something"] out of [target]'s [target_zone].")
user.put_in_hands(IC)
CH.cavity_item = null
return 1
+8 -5
View File
@@ -1,5 +1,5 @@
/datum/surgery/core_removal
name = "core removal"
name = "Core removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/extract_core)
species = list(/mob/living/simple_animal/slime)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
@@ -8,7 +8,6 @@
if(target.stat == DEAD)
return 1
return 0
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
@@ -16,13 +15,17 @@
time = 16
/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to extract a core from [target].", "<span class='notice'>You begin to extract a core from [target]...</span>")
display_results(user, target, "<span class='notice'>You begin to extract a core from [target]...</span>",
"[user] begins to extract a core from [target].",
"[user] begins to extract a core from [target].")
/datum/surgery_step/extract_core/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/mob/living/simple_animal/slime/slime = target
if(slime.cores > 0)
slime.cores--
user.visible_message("[user] successfully extracts a core from [target]!", "<span class='notice'>You successfully extract a core from [target]. [slime.cores] core\s remaining.</span>")
display_results(user, target, "<span class='notice'>You successfully extract a core from [target]. [slime.cores] core\s remaining.</span>",
"[user] successfully extracts a core from [target]!",
"[user] successfully extracts a core from [target]!")
new slime.coretype(slime.loc)
@@ -33,4 +36,4 @@
return 0
else
to_chat(user, "<span class='warning'>There aren't any cores left in [target]!</span>")
return 1
return 1
+14 -8
View File
@@ -1,16 +1,14 @@
/datum/surgery/eye_surgery
name = "eye surgery"
name = "Eye surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_PRECISE_EYES)
requires_bodypart_type = 0
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES)
if(!E)
@@ -19,10 +17,14 @@
return TRUE
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to fix [target]'s eyes.", "<span class='notice'>You begin to fix [target]'s eyes...</span>")
display_results(user, target, "<span class='notice'>You begin to fix [target]'s eyes...</span>",
"[user] begins to fix [target]'s eyes.",
"[user] begins to perform surgery on [target]'s eyes.")
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully fixes [target]'s eyes!", "<span class='notice'>You succeed in fixing [target]'s eyes.</span>")
display_results(user, target, "<span class='notice'>You succeed in fixing [target]'s eyes.</span>",
"[user] successfully fixes [target]'s eyes!",
"[user] completes the surgery on [target]'s eyes.")
target.cure_blind(list(EYE_DAMAGE))
target.set_blindness(0)
target.cure_nearsighted(list(EYE_DAMAGE))
@@ -32,8 +34,12 @@
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorgan(/obj/item/organ/brain))
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>", "<span class='warning'>You accidentally stab [target] right in the brain!</span>")
display_results(user, target, "<span class='warning'>You accidentally stab [target] right in the brain!</span>",
"<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>",
"<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>")
target.adjustBrainLoss(70)
else
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
return FALSE
display_results(user, target, "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>",
"<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>",
"<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>")
return FALSE
+1 -2
View File
@@ -65,7 +65,7 @@
if(S.ignore_clothes || get_location_accessible(M, selected_zone))
var/datum/surgery/procedure = new S.type(M, selected_zone, affecting)
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].", \
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(selected_zone)] to prepare for surgery.", \
"<span class='notice'>You drape [I] over [M]'s [parse_zone(selected_zone)] to prepare for \an [procedure.name].</span>")
log_combat(user, M, "operated on", null, "(OPERATION TYPE: [procedure.name]) (TARGET AREA: [selected_zone])")
@@ -169,4 +169,3 @@
return 0
return 1
+13 -9
View File
@@ -3,27 +3,30 @@
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 65)
time = 64
var/obj/item/implant/I = null
/datum/surgery_step/extract_implant/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
for(var/obj/item/O in target.implants)
I = O
break
if(I)
user.visible_message("[user] begins to extract [I] from [target]'s [target_zone].", "<span class='notice'>You begin to extract [I] from [target]'s [target_zone]...</span>")
display_results(user, target, "<span class='notice'>You begin to extract [I] from [target]'s [target_zone]...</span>",
"[user] begins to extract [I] from [target]'s [target_zone].",
"[user] begins to extract something from [target]'s [target_zone].")
else
user.visible_message("[user] looks for an implant in [target]'s [target_zone].", "<span class='notice'>You look for an implant in [target]'s [target_zone]...</span>")
display_results(user, target, "<span class='notice'>You look for an implant in [target]'s [target_zone]...</span>",
"[user] looks for an implant in [target]'s [target_zone].",
"[user] looks for something in [target]'s [target_zone].")
/datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(I)
user.visible_message("[user] successfully removes [I] from [target]'s [target_zone]!", "<span class='notice'>You successfully remove [I] from [target]'s [target_zone].</span>")
display_results(user, target, "<span class='notice'>You successfully remove [I] from [target]'s [target_zone].</span>",
"[user] successfully removes [I] from [target]'s [target_zone]!",
"[user] successfully removes something from [target]'s [target_zone]!")
I.removed(target)
var/obj/item/implantcase/case
@@ -36,14 +39,15 @@
case.imp = I
I.forceMove(case)
case.update_icon()
user.visible_message("[user] places [I] into [case]!", "<span class='notice'>You place [I] into [case].</span>")
display_results(user, target, "<span class='notice'>You place [I] into [case].</span>",
"[user] places [I] into [case]!",
"[user] places it into [case]!")
else
qdel(I)
else
to_chat(user, "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>")
return 1
/datum/surgery/implant_removal/mechanic
name = "implant removal"
requires_bodypart_type = BODYPART_ROBOTIC
@@ -53,4 +57,4 @@
/datum/surgery_step/mechanic_unwrench,
/datum/surgery_step/extract_implant,
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close)
/datum/surgery_step/mechanic_close)
+10 -15
View File
@@ -1,9 +1,5 @@
/////AUGMENTATION SURGERIES//////
//SURGERY STEPS
/datum/surgery_step/replace
name = "sever muscles"
implements = list(/obj/item/scalpel = 100, TOOL_WIRECUTTER = 55)
@@ -11,16 +7,15 @@
/datum/surgery_step/replace/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...</span>")
display_results(user, target, "<span class ='notice'>You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...</span>",
"[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].",
"[user] begins an incision on [target]'s [parse_zone(user.zone_selected)].")
/datum/surgery_step/replace_limb
name = "replace limb"
implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100)
time = 32
var/obj/item/bodypart/L = null // L because "limb"
/datum/surgery_step/replace_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/organ_storage) && istype(tool.contents[1], /obj/item/bodypart))
tool = tool.contents[1]
@@ -33,22 +28,20 @@
return -1
L = surgery.operated_bodypart
if(L)
user.visible_message("[user] begins to augment [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to augment [target]'s [parse_zone(user.zone_selected)]...</span>")
display_results(user, target, "<span class ='notice'>You begin to augment [target]'s [parse_zone(user.zone_selected)]...</span>",
"[user] begins to augment [target]'s [parse_zone(user.zone_selected)] with [aug].",
"[user] begins to augment [target]'s [parse_zone(user.zone_selected)].")
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")
//ACTUAL SURGERIES
/datum/surgery/augmentation
name = "augmentation"
name = "Augmentation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/saw, /datum/surgery_step/replace_limb)
species = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
requires_real_bodypart = TRUE
//SURGERY STEP SUCCESSES
/datum/surgery_step/replace_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
if(L)
if(istype(tool, /obj/item/organ_storage))
@@ -58,7 +51,9 @@
tool = tool.contents[1]
if(istype(tool) && user.temporarilyRemoveItemFromInventory(tool))
tool.replace_limb(target, TRUE)
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>",
"[user] successfully augments [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully augments [target]'s [parse_zone(target_zone)]!")
log_combat(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
else
to_chat(user, "<span class='warning'>[target] has no organic [parse_zone(target_zone)] there!</span>")
+15 -12
View File
@@ -1,14 +1,11 @@
/datum/surgery/lipoplasty
name = "lipoplasty"
name = "Lipoplasty"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close)
possible_locs = list(BODY_ZONE_CHEST)
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
if(HAS_TRAIT(target, TRAIT_FAT))
return 1
return 0
//cut fat
/datum/surgery_step/cut_fat
name = "cut excess fat"
@@ -16,10 +13,14 @@
time = 64
/datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to cut away [target]'s excess fat.", "<span class='notice'>You begin to cut away [target]'s excess fat...</span>")
display_results(user, target, "<span class='notice'>You begin to cut away [target]'s excess fat...</span>",
"[user] begins to cut away [target]'s excess fat.",
"[user] begins to cut [target]'s [target_zone] with [tool].")
/datum/surgery_step/cut_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] cuts [target]'s excess fat loose!", "<span class='notice'>You cut [target]'s excess fat loose.</span>")
display_results(user, target, "<span class='notice'>You cut [target]'s excess fat loose.</span>",
"[user] cuts [target]'s excess fat loose!",
"[user] finishes the cut on [target]'s [target_zone].")
return 1
//remove fat
@@ -29,25 +30,27 @@
time = 32
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to extract [target]'s loose fat!", "<span class='notice'>You begin to extract [target]'s loose fat...</span>")
display_results(user, target, "<span class='notice'>You begin to extract [target]'s loose fat...</span>",
"[user] begins to extract [target]'s loose fat!",
"[user] begins to extract something from [target]'s [target_zone].")
/datum/surgery_step/remove_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] extracts [target]'s fat!", "<span class='notice'>You extract [target]'s fat.</span>")
display_results(user, target, "<span class='notice'>You extract [target]'s fat.</span>",
"[user] extracts [target]'s fat!",
"[user] extracts [target]'s fat!")
target.overeatduration = 0 //patient is unfatted
var/removednutriment = target.nutrition
target.nutrition = NUTRITION_LEVEL_WELL_FED
removednutriment -= 450 //whatever was removed goes into the meat
var/mob/living/carbon/human/H = target
var/typeofmeat = /obj/item/reagent_containers/food/snacks/meat/slab/human
if(H.dna && H.dna.species)
typeofmeat = H.dna.species.meat
var/obj/item/reagent_containers/food/snacks/meat/slab/human/newmeat = new typeofmeat
newmeat.name = "fatty meat"
newmeat.desc = "Extremely fatty tissue taken from a patient."
newmeat.subjectname = H.real_name
newmeat.subjectjob = H.job
newmeat.reagents.add_reagent ("nutriment", (removednutriment / 15)) //To balance with nutriment_factor of nutriment
newmeat.reagents.add_reagent (/datum/reagent/consumable/nutriment, (removednutriment / 15)) //To balance with nutriment_factor of nutriment
newmeat.forceMove(target.loc)
return 1
return 1
+18 -16
View File
@@ -9,15 +9,14 @@
time = 24
/datum/surgery_step/mechanic_open/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to unscrew the shell of [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to unscrew the shell of [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].",
"[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/mechanic_incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
return FALSE
return TRUE
//close shell
/datum/surgery_step/mechanic_close
name = "screw shell"
@@ -29,15 +28,14 @@
time = 24
/datum/surgery_step/mechanic_close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to screw the shell of [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to screw the shell of [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].",
"[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
return FALSE
return TRUE
//prepare electronics
/datum/surgery_step/prepare_electronics
name = "prepare electronics"
@@ -47,8 +45,9 @@
time = 24
/datum/surgery_step/prepare_electronics/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to prepare electronics in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to prepare electronics in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].",
"[user] begins to prepare electronics in [target]'s [parse_zone(target_zone)].")
//unwrench
/datum/surgery_step/mechanic_unwrench
@@ -59,8 +58,9 @@
time = 24
/datum/surgery_step/mechanic_unwrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to unwrench some bolts in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to unwrench some bolts in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].",
"[user] begins to unwrench some bolts in [target]'s [parse_zone(target_zone)].")
//wrench
/datum/surgery_step/mechanic_wrench
@@ -71,8 +71,9 @@
time = 24
/datum/surgery_step/mechanic_wrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to wrench some bolts in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to wrench some bolts in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].",
"[user] begins to wrench some bolts in [target]'s [parse_zone(target_zone)].")
//open hatch
/datum/surgery_step/open_hatch
@@ -81,5 +82,6 @@
time = 10
/datum/surgery_step/open_hatch/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to open the hatch holders in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to open the hatch holders in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].",
"[user] begins to open the hatch holders in [target]'s [parse_zone(target_zone)].")
+18 -23
View File
@@ -1,5 +1,5 @@
/datum/surgery/organ_manipulation
name = "organ manipulation"
name = "Organ manipulation"
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
requires_real_bodypart = 1
@@ -13,7 +13,6 @@
//there should be bone fixing
/datum/surgery_step/close
)
/datum/surgery/organ_manipulation/soft
possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
steps = list(
@@ -24,9 +23,8 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/close
)
/datum/surgery/organ_manipulation/alien
name = "alien organ manipulation"
name = "Alien organ manipulation"
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
species = list(/mob/living/carbon/alien/humanoid)
steps = list(
@@ -37,9 +35,8 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/close
)
/datum/surgery/organ_manipulation/mechanic
name = "prosthesis organ manipulation"
name = "Prosthesis organ manipulation"
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
requires_bodypart_type = BODYPART_ROBOTIC
steps = list(
@@ -51,7 +48,6 @@
/datum/surgery_step/mechanic_wrench,
/datum/surgery_step/mechanic_close
)
/datum/surgery/organ_manipulation/mechanic/soft
possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
steps = list(
@@ -61,7 +57,6 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/mechanic_close
)
/datum/surgery_step/manipulate_organs
time = 64
name = "manipulate organs"
@@ -70,11 +65,9 @@
var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55)
var/current_type
var/obj/item/organ/I = null
/datum/surgery_step/manipulate_organs/New()
..()
implements = implements + implements_extract
/datum/surgery_step/manipulate_organs/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
I = null
if(istype(tool, /obj/item/organ_storage))
@@ -92,9 +85,9 @@
if(target_zone != I.zone || target.getorganslot(I.slot))
to_chat(user, "<span class='notice'>There is no room for [I] in [target]'s [parse_zone(target_zone)]!</span>")
return -1
user.visible_message("[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].",
"[user] begins to insert something into [target]'s [parse_zone(target_zone)].")
else if(implement_type in implements_extract)
current_type = "extract"
@@ -107,21 +100,20 @@
O.on_find(user)
organs -= O
organs[O.name] = O
I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
I = organs[I]
if(!I)
return -1
user.visible_message("[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].",
"[user] begins to extract something from [target]'s [parse_zone(target_zone)].")
else
return -1
else if(istype(tool, /obj/item/reagent_containers/food/snacks/organ))
to_chat(user, "<span class='warning'>[tool] was bitten by someone! It's too damaged to use!</span>")
return -1
/datum/surgery_step/manipulate_organs/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(current_type == "insert")
if(istype(tool, /obj/item/organ_storage))
@@ -134,17 +126,20 @@
I = tool
user.temporarilyRemoveItemFromInventory(I, TRUE)
I.Insert(target)
user.visible_message("[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>",
"[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
"[user] inserts something into [target]'s [parse_zone(target_zone)]!")
else if(current_type == "extract")
if(I && I.owner == target)
user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>",
"[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!")
log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
I.Remove(target)
I.forceMove(get_turf(target))
else
user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>")
display_results(user, target, "<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!")
return 0
+39 -25
View File
@@ -1,4 +1,3 @@
//make incision
/datum/surgery_step/incise
name = "make incision"
@@ -7,13 +6,22 @@
time = 16
/datum/surgery_step/incise/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to make an incision in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to make an incision in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to make an incision in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to make an incision in [target]'s [parse_zone(target_zone)].",
"[user] begins to make an incision in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
return FALSE
return TRUE
/datum/surgery_step/incise/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if ishuman(target)
var/mob/living/carbon/human/H = target
if (!(NOBLOOD in H.dna.species.species_traits))
display_results(user, target, "<span class='notice'>Blood pools around the incision in [H]'s [parse_zone(target_zone)].</span>",
"Blood pools around the incision in [H]'s [parse_zone(target_zone)].",
"")
H.bleed_rate += 3
return TRUE
//clamp bleeders
@@ -23,15 +31,17 @@
time = 24
/datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to clamp bleeders in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to clamp bleeders in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].",
"[user] begins to clamp bleeders in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/clamp_bleeders/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
target.heal_bodypart_damage(20,0)
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.bleed_rate = max( (H.bleed_rate - 3), 0)
return ..()
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
@@ -39,8 +49,9 @@
time = 24
/datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to retract the skin in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to retract the skin in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].",
"[user] begins to retract the skin in [target]'s [parse_zone(target_zone)].")
@@ -52,22 +63,21 @@
time = 24
/datum/surgery_step/close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to mend the incision in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to mend the incision in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].",
"[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/close/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return TRUE
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
target.heal_bodypart_damage(45,0)
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.bleed_rate = max( (H.bleed_rate - 3), 0)
return ..()
//saw bone
/datum/surgery_step/saw
name = "saw bone"
@@ -77,13 +87,15 @@
time = 54
/datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].",
"[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
target.apply_damage(50, BRUTE, "[target_zone]")
user.visible_message("[user] saws [target]'s [parse_zone(target_zone)] open!", "<span class='notice'>You saw [target]'s [parse_zone(target_zone)] open.</span>")
display_results(user, target, "<span class='notice'>You saw [target]'s [parse_zone(target_zone)] open.</span>",
"[user] saws [target]'s [parse_zone(target_zone)] open!",
"[user] saws [target]'s [parse_zone(target_zone)] open!")
return 1
//drill bone
@@ -93,10 +105,12 @@
time = 30
/datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to drill into the bone in [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class='notice'>You begin to drill into the bone in [target]'s [parse_zone(target_zone)]...</span>",
"[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].",
"[user] begins to drill into the bone in [target]'s [parse_zone(target_zone)].")
/datum/surgery_step/drill/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] drills into [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You drill into [target]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You drill into [target]'s [parse_zone(target_zone)].</span>",
"[user] drills into [target]'s [parse_zone(target_zone)]!",
"[user] drills into [target]'s [parse_zone(target_zone)]!")
return 1
+1 -1
View File
@@ -132,7 +132,7 @@
else
var/list/choice_list = list()
for(var/obj/item/I in items_list)
choice_list[I] = getFlatIcon(I)
choice_list[I] = image(I)
var/obj/item/choice = show_radial_menu(owner, owner, choice_list)
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && (choice in contents))
// This monster sanity check is a nice example of how bad input is.
+3 -17
View File
@@ -169,7 +169,6 @@
var/list/obj/effect/abstract/eye_lighting/eye_lighting
var/obj/effect/abstract/eye_lighting/on_mob
var/image/mob_overlay
var/datum/component/mobhook
/obj/item/organ/eyes/robotic/glow/Initialize()
. = ..()
@@ -185,7 +184,7 @@
/obj/item/organ/eyes/robotic/glow/proc/terminate_effects()
if(owner && active)
deactivate()
deactivate(TRUE)
active = FALSE
clear_visuals(TRUE)
STOP_PROCESSING(SSfastprocess, src)
@@ -238,26 +237,12 @@
return
deactivate(silent = TRUE)
/obj/item/organ/eyes/robotic/glow/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = FALSE)
. = ..()
if (mobhook && mobhook.parent != M)
QDEL_NULL(mobhook)
if (!mobhook)
mobhook = M.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_DIR_CHANGE = CALLBACK(src, .proc/update_visuals)))
/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M)
. = ..()
QDEL_NULL(mobhook)
/obj/item/organ/eyes/robotic/glow/Destroy()
QDEL_NULL(mobhook) // mobhook is not our component
return ..()
/obj/item/organ/eyes/robotic/glow/proc/activate(silent = FALSE)
start_visuals()
if(!silent)
to_chat(owner, "<span class='warning'>Your [src] clicks and makes a whining noise, before shooting out a beam of light!</span>")
active = TRUE
RegisterSignal(owner, COMSIG_ATOM_DIR_CHANGE, .proc/update_visuals)
cycle_mob_overlay()
/obj/item/organ/eyes/robotic/glow/proc/deactivate(silent = FALSE)
@@ -265,6 +250,7 @@
if(!silent)
to_chat(owner, "<span class='warning'>Your [src] shuts off!</span>")
active = FALSE
UnregisterSignal(owner, COMSIG_ATOM_DIR_CHANGE)
remove_mob_overlay()
/obj/item/organ/eyes/robotic/glow/proc/update_visuals(datum/source, olddir, newdir)
+32
View File
@@ -1,6 +1,7 @@
#define LIVER_DEFAULT_HEALTH 100 //amount of damage required for liver failure
#define LIVER_DEFAULT_TOX_TOLERANCE 3 //amount of toxins the liver can filter out
#define LIVER_DEFAULT_TOX_LETHALITY 0.01 //lower values lower how harmful toxins are to the liver
#define LIVER_SWELLING_MOVE_MODIFY "pharma"
/obj/item/organ/liver
name = "liver"
@@ -16,6 +17,8 @@
var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off
var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
var/filterToxins = TRUE //whether to filter toxins
var/swelling = 0
var/cachedmoveCalc = 1
/obj/item/organ/liver/on_life()
var/mob/living/carbon/C = owner
@@ -45,11 +48,40 @@
if(damage > maxHealth)//cap liver damage
damage = maxHealth
if(swelling >= 10)
pharmacokinesis()
/obj/item/organ/liver/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("iron", 5)
return S
//Just in case
/obj/item/organ/liver/Remove(mob/living/carbon/M, special = 0)
..()
M.remove_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY)
M.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret.
sizeMoveMod(1, M)
//Applies some of the effects to the patient.
/obj/item/organ/liver/proc/pharmacokinesis()
var/moveCalc = 1+((round(swelling) - 9)/3)
if(moveCalc == cachedmoveCalc)//reduce calculations
return
if(prob(5))
to_chat(owner, "<span class='notice'>You feel a stange ache in your side, almost like a sitch. This pain is affecting your movements and making you feel lightheaded.</span>")
var/mob/living/carbon/human/H = owner
H.add_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc)
H.AdjustBloodVol(moveCalc/3)
sizeMoveMod(moveCalc, H)
/obj/item/organ/liver/proc/sizeMoveMod(var/value, mob/living/carbon/human/H)
if(cachedmoveCalc == value)
return
H.next_move_modifier /= cachedmoveCalc
H.next_move_modifier *= value
cachedmoveCalc = value
/obj/item/organ/liver/fly
name = "insectoid liver"
icon_state = "liver-x" //xenomorph liver? It's just a black liver so it fits.
+51 -5
View File
@@ -1,3 +1,5 @@
#define LUNGS_MAX_HEALTH 300
/obj/item/organ/lungs
name = "lungs"
icon_state = "lungs"
@@ -54,8 +56,40 @@
var/crit_stabilizing_reagent = "epinephrine"
//health
var/maxHealth = LUNGS_MAX_HEALTH
var/damage = 0
//TODO: lung health affects lung function
/obj/item/organ/lungs/proc/adjustLungLoss(damage_mod, mob/living/carbon/M) //damage might be too low atm.
if (maxHealth == INFINITY)
return
if(damage+damage_mod < 0)
damage = 0
return
damage += damage_mod
if ((damage / maxHealth) > 1)
to_chat(M, "<span class='userdanger'>You feel your lungs collapse within your chest as you gasp for air, unable to inflate them anymore!</span>")
M.emote("gasp")
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Lungs lost")
qdel(src)
else if ((damage / maxHealth) > 0.75)
to_chat(M, "<span class='warning'>It's getting really hard to breathe!!</span>")
M.emote("gasp")
M.Dizzy(3)
else if ((damage / maxHealth) > 0.5)
M.Dizzy(2)
to_chat(M, "<span class='notice'>Your chest is really starting to hurt.</span>")
M.emote("cough")
else if ((damage / maxHealth) > 0.2)
to_chat(M, "<span class='notice'>You feel an ache within your chest.</span>")
M.emote("cough")
M.Dizzy(1)
/obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
//TODO: add lung damage = less oxygen gains
var/breathModifier = (5-(5*(damage/maxHealth)/2)) //range 2.5 - 5
if((H.status_flags & GODMODE))
return
if(HAS_TRAIT(H, TRAIT_NOBREATH))
@@ -124,7 +158,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
H.adjustOxyLoss(-breathModifier) //More damaged lungs = slower oxy rate up to a factor of half
gas_breathed = breath_gases[/datum/gas/oxygen]
H.clear_alert("not_enough_oxy")
@@ -153,7 +187,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
H.adjustOxyLoss(-breathModifier)
gas_breathed = breath_gases[/datum/gas/nitrogen]
H.clear_alert("nitro")
@@ -190,7 +224,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
H.adjustOxyLoss(-breathModifier)
gas_breathed = breath_gases[/datum/gas/carbon_dioxide]
H.clear_alert("not_enough_co2")
@@ -220,7 +254,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
H.adjustOxyLoss(-breathModifier)
gas_breathed = breath_gases[/datum/gas/plasma]
H.clear_alert("not_enough_tox")
@@ -244,6 +278,9 @@
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
H.emote(pick("giggle", "laugh"))
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "chemical_euphoria", /datum/mood_event/chemical_euphoria)
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria")
// BZ
@@ -368,10 +405,13 @@
var/cold_modifier = H.dna.species.coldmod
if(breath_temperature < cold_level_3_threshold)
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
adjustLungLoss((cold_level_3_damage*cold_modifier*2), H)
if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold)
H.apply_damage_type(cold_level_2_damage*cold_modifier, cold_damage_type)
adjustLungLoss((cold_level_2_damage*cold_modifier*2), H)
if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold)
H.apply_damage_type(cold_level_1_damage*cold_modifier, cold_damage_type)
adjustLungLoss((cold_level_1_damage*cold_modifier*2), H)
if(breath_temperature < cold_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
@@ -380,10 +420,13 @@
var/heat_modifier = H.dna.species.heatmod
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
adjustLungLoss((heat_level_1_damage*heat_modifier*2), H)
if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold)
H.apply_damage_type(heat_level_2_damage*heat_modifier, heat_damage_type)
adjustLungLoss((heat_level_2_damage*heat_modifier*2), H)
if(breath_temperature > heat_level_3_threshold)
H.apply_damage_type(heat_level_3_damage*heat_modifier, heat_damage_type)
adjustLungLoss((heat_level_3_damage*heat_modifier*2), H)
if(breath_temperature > heat_level_1_threshold)
if(prob(20))
to_chat(H, "<span class='warning'>You feel [hot_message] in your [name]!</span>")
@@ -402,12 +445,14 @@
safe_oxygen_max = 0 // Like, at all.
safe_toxins_min = 16 //We breath THIS!
safe_toxins_max = 0
maxHealth = INFINITY//I don't understand how plamamen work, so I'm not going to try t give them special lungs atm
/obj/item/organ/lungs/cybernetic
name = "cybernetic lungs"
desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement."
icon_state = "lungs-c"
synthetic = TRUE
maxHealth = 400
/obj/item/organ/lungs/cybernetic/emp_act()
. = ..()
@@ -427,6 +472,7 @@
cold_level_1_threshold = 200
cold_level_2_threshold = 140
cold_level_3_threshold = 100
maxHealth = 550
/obj/item/organ/lungs/ashwalker
name = "ash lungs"
@@ -451,6 +497,6 @@
/obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
. = ..()
if (breath.gases[/datum/gas/plasma])
if (breath && breath.gases[/datum/gas/plasma])
var/plasma_pp = breath.get_breath_partial_pressure(breath.gases[/datum/gas/plasma])
owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.
@@ -153,6 +153,17 @@
// if they have no mutant tongues, give them a regular one
T.Insert(src)
else
var/obj/item/organ/tongue/oT = getorganslot(ORGAN_SLOT_TONGUE)
if(oT.name == "fluffy tongue")
var/obj/item/organ/tongue/T
if(dna && dna.species && dna.species.mutanttongue)
T = new dna.species.mutanttongue()
else
T = new()
oT.Remove(src)
qdel(oT)
T.Insert(src)
if(!getorganslot(ORGAN_SLOT_EYES))
var/obj/item/organ/eyes/E
+67 -1
View File
@@ -1,3 +1,5 @@
#define TONGUE_MAX_HEALTH 60
/obj/item/organ/tongue
name = "tongue"
desc = "A fleshy muscle mostly used for lying."
@@ -8,6 +10,8 @@
var/list/languages_possible
var/say_mod = null
var/taste_sensitivity = 15 // lower is more sensitive.
var/maxHealth = TONGUE_MAX_HEALTH
var/damage = 0
var/modifies_speech = FALSE
var/static/list/languages_possible_base = typecacheof(list(
/datum/language/common,
@@ -27,6 +31,29 @@
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
/obj/item/organ/tongue/proc/adjustTongueLoss(mob/living/carbon/M, damage_mod)
if (maxHealth == "alien")
return
if (maxHealth == "bone")
var/target = M.get_bodypart(BODY_ZONE_HEAD)
M.apply_damage(damage_mod, BURN, target)
to_chat(M, "<span class='userdanger'>The drink burns your skull! Oof, your bones!</span>")
return
if(damage+damage_mod < 0)
damage = 0
return
damage += damage_mod
if ((damage / maxHealth) > 1)
to_chat(M, "<span class='userdanger'>Your tongue is singed beyond recognition, and disintegrates!</span>")
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi")
qdel(src)
else if ((damage / maxHealth) > 0.85)
to_chat(M, "<span class='warning'>Your tongue feels like it's about to fall out!.</span>")
else if ((damage / maxHealth) > 0.5)
to_chat(M, "<span class='notice'>Your tongue is really starting to hurt.</span>")
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0)
..()
if(say_mod && M.dna && M.dna.species)
@@ -51,6 +78,7 @@
icon_state = "tonguelizard"
say_mod = "hisses"
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
maxHealth = 40 //extra sensitivity means tongue is more susceptible to damage
modifies_speech = TRUE
/obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args)
@@ -68,6 +96,7 @@
icon_state = "tonguefly"
say_mod = "buzzes"
taste_sensitivity = 25 // you eat vomit, this is a mercy
maxHealth = 80 //years of eatting trash has made your tongue strong
modifies_speech = TRUE
/obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args)
@@ -85,6 +114,7 @@
icon_state = "tongueayylmao"
say_mod = "gibbers"
taste_sensitivity = 101 // ayys cannot taste anything.
maxHealth = 120 //Ayys probe a lot
modifies_speech = TRUE
/obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args)
@@ -113,6 +143,7 @@
icon_state = "tonguezombie"
say_mod = "moans"
taste_sensitivity = 32
maxHealth = 65 //Stop! It's already dead...!
modifies_speech = TRUE
/obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args)
@@ -137,6 +168,7 @@
icon_state = "tonguexeno"
say_mod = "hisses"
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
maxHealth = "alien" //Their blood is acid, so, no, though a tongueless xeno might be funny
modifies_speech = TRUE // not really, they just hiss
var/static/list/languages_possible_alien = typecacheof(list(
/datum/language/xenocommon,
@@ -159,6 +191,7 @@
say_mod = "rattles"
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
taste_sensitivity = 101 // skeletons cannot taste anything
maxHealth = "bone" //Take brute damage instead
modifies_speech = TRUE
var/chattering = FALSE
var/phomeme_type = "sans"
@@ -181,6 +214,7 @@
name = "plasma bone \"tongue\""
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
icon_state = "tongueplasma"
maxHealth = "alien"
modifies_speech = FALSE
/obj/item/organ/tongue/robot
@@ -192,6 +226,7 @@
attack_verb = list("beeped", "booped")
modifies_speech = TRUE
taste_sensitivity = 25 // not as good as an organic tongue
maxHealth = 100 //RoboTongue!
var/electronics_magic = TRUE
/obj/item/organ/tongue/robot/can_speak_in_language(datum/language/dt)
@@ -200,8 +235,39 @@
/obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
/obj/item/organ/tongue/fluffy
name = "fluffy tongue"
desc = "OwO what's this?"
icon_state = "tonguefluffy"
taste_sensitivity = 10 // extra sensitive and inquisitive uwu
maxHealth = 35 //Sensitive tongue!
modifies_speech = TRUE
/obj/item/organ/tongue/fluffy/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "ne", "nye")
message = replacetext(message, "nu", "nyu")
message = replacetext(message, "na", "nya")
message = replacetext(message, "no", "nyo")
message = replacetext(message, "ove", "uv")
message = replacetext(message, "l", "w")
message = replacetext(message, "r", "w")
message = lowertext(message)
speech_args[SPEECH_MESSAGE] = message
/obj/item/organ/tongue/cybernetic
name = "cybernetic tongue"
desc = "A state of the art robotic tongue that can detect the pH of anything drank."
icon_state = "tonguecybernetic"
taste_sensitivity = 10
maxHealth = 60 //It's robotic!
/obj/item/organ/tongue/cybernetic/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
/obj/item/organ/tongue/robot/ipc
name = "positronic voicebox"
say_mod = "beeps"
desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms."
electronics_magic = FALSE
electronics_magic = FALSE
+863 -2
View File
@@ -3,7 +3,7 @@
#define COOLDOWN_MEME 300
#define COOLDOWN_NONE 100
/obj/item/organ/vocal_cords //organs that are activated through speech with the :x channel
/obj/item/organ/vocal_cords //organs that are activated through speech with the :x/MODE_KEY_VOCALCORDS channel
name = "vocal cords"
icon_state = "appendix"
zone = BODY_ZONE_PRECISE_MOUTH
@@ -575,7 +575,7 @@
cooldown = COOLDOWN_MEME
for(var/V in listeners)
var/mob/living/carbon/human/H = V
if(H.canbearoused && H.has_dna()) // probably a redundant check but for good measure
if(H.canbearoused && H.has_dna() && HAS_TRAIT(H, TRAIT_NYMPHO)) // probably a redundant check but for good measure
H.mob_climax(forced_climax=TRUE)
//DAB
@@ -608,6 +608,867 @@
return cooldown
//////////////////////////////////////
///////ENTHRAL VELVET CHORDS//////////
//////////////////////////////////////
//Heavily modified voice of god code
/obj/item/organ/vocal_cords/velvet
name = "Velvet chords"
desc = "The voice spoken from these just make you want to drift off, sleep and obey."
icon_state = "velvet_chords"
actions_types = list(/datum/action/item_action/organ_action/velvet)
spans = list("velvet")
/datum/action/item_action/organ_action/velvet
name = "Velvet chords"
var/obj/item/organ/vocal_cords/velvet/cords = null
//icon_icon = 'icons/mob/screen_alert.dmi'
//button_icon_state = "velvet_chords"
//icon = 'icons/mob/screen_alert.dmi'
//icon_state = "in_love"
/datum/action/item_action/organ_action/velvet/New()
..()
cords = target
/datum/action/item_action/organ_action/velvet/IsAvailable()
return TRUE
/datum/action/item_action/organ_action/velvet/Trigger()
. = ..()
var/command = input(owner, "Speak in a sultry tone", "Command")
if(QDELETED(src) || QDELETED(owner))
return
if(!command)
return
owner.say(".x[command]")
/obj/item/organ/vocal_cords/velvet/can_speak_with()
return TRUE
/obj/item/organ/vocal_cords/velvet/handle_speech(message) //actually say the message
owner.say(message, spans = spans, sanitize = FALSE)
velvetspeech(message, owner, 1)
//////////////////////////////////////
///////////FermiChem//////////////////
//////////////////////////////////////
//Removed span_list from input arguments.
/proc/velvetspeech(message, mob/living/user, base_multiplier = 1, message_admins = FALSE, debug = FALSE)
if(!user || !user.can_speak() || user.stat)
return 0 //no cooldown
var/log_message = message
//FIND THRALLS
message = lowertext(message)
var/mob/living/list/listeners = list()
for(var/mob/living/L in get_hearers_in_view(8, user))
if(L.can_hear() && !L.anti_magic_check(FALSE, TRUE) && L.stat != DEAD)
if(L.has_status_effect(/datum/status_effect/chem/enthrall))//Check to see if they have the status
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)//Check to see if pet is on cooldown from last command and if the master is right
if(E.master != user)
continue
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
if (E.cooldown > 0)//If they're on cooldown you can't give them more commands.
continue
listeners += L
if(!listeners.len)
return 0
//POWER CALCULATIONS
var/power_multiplier = base_multiplier
// Not sure I want to give extra power to anyone at the moment...? We'll see how it turns out
if(user.mind)
//Chaplains are very good at indoctrinating
if(user.mind.assigned_role == "Chaplain")
power_multiplier *= 1.2
//Command staff has authority
if(user.mind.assigned_role in GLOB.command_positions)
power_multiplier *= 1.1
//Why are you speaking
if(user.mind.assigned_role == "Mime")
power_multiplier *= 0.5
//Cultists are closer to their gods and are better at indoctrinating
if(iscultist(user))
power_multiplier *= 1.2
else if (is_servant_of_ratvar(user))
power_multiplier *= 1.2
else if (is_devil(user))//The devil is supposed to be seductive, right?
power_multiplier *= 1.2
//range = 0.5 - 1.4~
//most cases = 1
//Try to check if the speaker specified a name or a job to focus on
var/list/specific_listeners = list()
var/found_string = null
//Get the proper job titles
message = get_full_job_name(message)
for(var/V in listeners)
var/mob/living/L = V
if(dd_hasprefix(message, L.real_name))
specific_listeners += L //focus on those with the specified name
//Cut out the name so it doesn't trigger commands
found_string = L.real_name
power_multiplier += 0.5
else if(dd_hasprefix(message, L.first_name()))
specific_listeners += L //focus on those with the specified name
//Cut out the name so it doesn't trigger commands
found_string = L.first_name()
power_multiplier += 0.5
else if(L.mind && L.mind.assigned_role && dd_hasprefix(message, L.mind.assigned_role))
specific_listeners += L //focus on those with the specified job
//Cut out the job so it doesn't trigger commands
found_string = L.mind.assigned_role
power_multiplier += 0.25
if(specific_listeners.len)
listeners = specific_listeners
//power_multiplier *= (1 + (1/specific_listeners.len)) //Put this is if it becomes OP, power is judged internally on a thrall, so shouldn't be nessicary.
message = copytext(message, 0, 1)+copytext(message, 1 + length(found_string), length(message) + 1)//I have no idea what this does
var/obj/item/organ/tongue/T = user.getorganslot(ORGAN_SLOT_TONGUE)
if (T.name == "fluffy tongue") //If you sound hillarious, it's hard to take you seriously. This is a way for other players to combat/reduce their effectiveness.
power_multiplier *= 0.75
if(debug == TRUE)
to_chat(world, "[user]'s power is [power_multiplier].")
//Mixables
var/static/regex/enthral_words = regex("relax|obey|love|serve|docile|so easy|ara ara")
var/static/regex/reward_words = regex("good boy|good girl|good pet|good job")
var/static/regex/punish_words = regex("bad boy|bad girl|bad pet|bad job")
//phase 0
var/static/regex/saymyname_words = regex("say my name|who am i|whoami")
var/static/regex/wakeup_words = regex("revert|awaken|snap") //works
//phase1
var/static/regex/petstatus_words = regex("how are you|what is your status|are you okay")
var/static/regex/silence_words = regex("shut up|silence|be silent|ssh|quiet|hush")
var/static/regex/speak_words = regex("talk to me|speak")
var/static/regex/antiresist_words = regex("unable to resist|give in")//useful if you think your target is resisting a lot
var/static/regex/resist_words = regex("resist|snap out of it|fight")//useful if two enthrallers are fighting
var/static/regex/forget_words = regex("forget|muddled|awake and forget")
var/static/regex/attract_words = regex("come here|come to me|get over here|attract")
//phase 2
var/static/regex/orgasm_words = regex("cum|orgasm|climax|squirt|heyo") //wah, lewd
var/static/regex/awoo_words = regex("howl|awoo|bark")
var/static/regex/nya_words = regex("nya|meow|mewl")
var/static/regex/sleep_words = regex("sleep|slumber|rest")
var/static/regex/strip_words = regex("strip|derobe|nude")
var/static/regex/walk_words = regex("slow down|walk")
var/static/regex/run_words = regex("run|speed up")
var/static/regex/liedown_words = regex("lie down") //TO ADD
var/static/regex/knockdown_words = regex("drop|fall|trip|knockdown|kneel")
//phase 3
var/static/regex/statecustom_words = regex("state triggers|state your triggers")
var/static/regex/custom_words = regex("new trigger|listen to me")
var/static/regex/custom_words_words = regex("speak|echo|shock|cum|kneel|strip|trance")//What a descriptive name!
var/static/regex/custom_echo = regex("obsess|fills your mind|loop")
var/static/regex/instill_words = regex("feel|entice|overwhel")
var/static/regex/recognise_words = regex("recognise me|did you miss me?")
var/static/regex/objective_words = regex("new objective|obey this command|unable to resist|compulsed")
var/static/regex/heal_words = regex("live|heal|survive|mend|life|pets never die")
var/static/regex/stun_words = regex("stop|wait|stand still|hold on|halt")
var/static/regex/hallucinate_words = regex("get high|hallucinate")
var/static/regex/hot_words = regex("heat|hot|hell")
var/static/regex/cold_words = regex("cold|cool down|chill|freeze")
var/static/regex/getup_words = regex("get up")
var/static/regex/pacify_words = regex("more and more docile|complaisant|friendly|pacifist")
var/static/regex/charge_words = regex("charge|oorah|attack")
var/distancelist = list(2,2,1.5,1.3,1.15,1,0.8,0.6,0.5,0.25)
//CALLBACKS ARE USED FOR MESSAGES BECAUSE SAY IS HANDLED AFTER THE PROCESSING.
//Tier 1
//ENTHRAL mixable (works I think)
if(findtext(message, enthral_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
power_multiplier *= distancelist[get_dist(user, V)+1]
if(L == user)
continue
if(length(message))
E.enthrallTally += (power_multiplier*(((length(message))/200) + 1)) //encourage players to say more than one word.
else
E.enthrallTally += power_multiplier*1.25 //thinking about it, I don't know how this can proc
if(L.canbearoused)
if(L.client?.prefs.lewdchem)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='nicegreen'><i><b>[E.enthrallGender] is so nice to listen to.</b></i></span>"), 5)
E.cooldown += 1
//REWARD mixable works
if(findtext(message, reward_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
power_multiplier *= distancelist[get_dist(user, V)+1]
if(L == user)
continue
if (L.client?.prefs.lewdchem)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='love'>[E.enthrallGender] has praised me!!</span>"), 5)
if(HAS_TRAIT(L, TRAIT_NYMPHO))
L.adjustArousalLoss(2*power_multiplier)
if(HAS_TRAIT(L, TRAIT_MASO))
E.enthrallTally -= power_multiplier
E.resistanceTally += power_multiplier
E.cooldown += 1
else
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='nicegreen'><b><i>I've been praised for doing a good job!</b></i></span>"), 5)
E.resistanceTally -= power_multiplier
E.enthrallTally += power_multiplier
var/descmessage = "<span class='love'><i>[(L.client?.prefs.lewdchem?"I feel so happy! I'm a good pet who [E.enthrallGender] loves!":"I did a good job!")]</i></span>"
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "enthrallpraise", /datum/mood_event/enthrallpraise, descmessage)
E.cooldown += 1
//PUNISH mixable works
else if(findtext(message, punish_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
var/descmessage = "[(L.client?.prefs.lewdchem?"I've failed [E.enthrallGender]... What a bad, bad pet!":"I did a bad job...")]"
if(L == user)
continue
if (L.client?.prefs.lewdchem)
if(HAS_TRAIT(L, TRAIT_MASO))
L.adjustArousalLoss(3*power_multiplier)
descmessage += "And yet, it feels so good..!</span>" //I don't really understand masco, is this the right sort of thing they like?
E.enthrallTally += power_multiplier
E.resistanceTally -= power_multiplier
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='love'>I've let [E.enthrallGender] down...!</b></span>"), 5)
else
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='warning'>I've let [E.enthrallGender] down...</b></span>"), 5)
else
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='warning'>I've failed [E.master]...</b></span>"), 5)
E.resistanceTally += power_multiplier
E.enthrallTally += power_multiplier
E.cooldown += 1
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "enthrallscold", /datum/mood_event/enthrallscold, descmessage)
E.cooldown += 1
//teir 0
//SAY MY NAME works
if((findtext(message, saymyname_words)))
for(var/V in listeners)
var/mob/living/carbon/C = V
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
REMOVE_TRAIT(C, TRAIT_MUTE, "enthrall")
C.silent = 0
if(C.client?.prefs.lewdchem)
addtimer(CALLBACK(C, /atom/movable/proc/say, "[E.enthrallGender]"), 5)
else
addtimer(CALLBACK(C, /atom/movable/proc/say, "[E.master]"), 5)
//WAKE UP
else if((findtext(message, wakeup_words)))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
L.SetSleeping(0)//Can you hear while asleep?
switch(E.phase)
if(0)
E.phase = 3
E.status = null
user.emote("snap")
if(L.client?.prefs.lewdchem)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='big warning'>The snapping of your [E.enthrallGender]'s fingers brings you back to your enthralled state, obedient and ready to serve.</b></span>"), 5)
else
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='big warning'>The snapping of [E.master]'s fingers brings you back to being under their influence.</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You wake up [L]!</i></span>")
//tier 1
//PETSTATUS i.e. how they are
else if((findtext(message, petstatus_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
REMOVE_TRAIT(H, TRAIT_MUTE, "enthrall")
var/speaktrigger = ""
//phase
switch(E.phase)
if(0)
continue
if(1)
addtimer(CALLBACK(H, /atom/movable/proc/say, "I feel happy being with you."), 5)
continue
if(2)
speaktrigger += "[(H.client?.prefs.lewdchem?"I think I'm in love with you... ":"I find you really inspirational, ")]" //'
if(3)
speaktrigger += "[(H.client?.prefs.lewdchem?"I'm devoted to being your pet":"I'm commited to following your cause!")]! "
if(4)
speaktrigger += "[(H.client?.prefs.lewdchem?"You are my whole world and all of my being belongs to you, ":"I cannot think of anything else but aiding your cause, ")] "//Redflags!!
//mood
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
switch(mood.sanity)
if(SANITY_GREAT to INFINITY)
speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho
if(SANITY_NEUTRAL to SANITY_GREAT)
speaktrigger += "I'm really happy! "
if(SANITY_DISTURBED to SANITY_NEUTRAL)
speaktrigger += "I'm a little sad, "
if(SANITY_UNSTABLE to SANITY_DISTURBED)
speaktrigger += "I'm really upset, "
if(SANITY_CRAZY to SANITY_UNSTABLE)
speaktrigger += "I'm about to fall apart without you! "
if(SANITY_INSANE to SANITY_CRAZY)
speaktrigger += "Hold me, please.. "
//Withdrawal
switch(E.withdrawalTick)
if(10 to 36) //denial
speaktrigger += "I missed you, "
if(36 to 66) //barganing
speaktrigger += "I missed you, but I knew you'd come back for me! "
if(66 to 90) //anger
speaktrigger += "I couldn't take being away from you like that, "
if(90 to 140) //depression
speaktrigger += "I was so scared you'd never come back, "
if(140 to INFINITY) //acceptance
speaktrigger += "I'm hurt that you left me like that... I felt so alone... "
//hunger
switch(H.nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
speaktrigger += "I'm famished, please feed me..! "
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
speaktrigger += "I'm so hungry... "
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
speaktrigger += "I'm hungry, "
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
speaktrigger += "I'm sated, "
if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
speaktrigger += "I've a full belly! "
if(NUTRITION_LEVEL_FULL to INFINITY)
speaktrigger += "I'm fat... "
//health
switch(H.health)
if(100 to INFINITY)
speaktrigger += "I feel fit, "
if(80 to 99)
speaktrigger += "I ache a little bit, "
if(40 to 80)
speaktrigger += "I'm really hurt, "
if(0 to 40)
speaktrigger += "I'm in a lot of pain, help! "
if(-INFINITY to 0)
speaktrigger += "I'm barely concious and in so much pain, please help me! "
//toxin
switch(H.getToxLoss())
if(10 to 30)
speaktrigger += "I feel a bit queasy... "
if(30 to 60)
speaktrigger += "I feel nauseous... "
if(60 to INFINITY)
speaktrigger += "My head is pounding and I feel like I'm going to be sick... "
//oxygen
if (H.getOxyLoss() >= 25)
speaktrigger += "I can't breathe! "
//blind
if (HAS_TRAIT(H, TRAIT_BLIND))
speaktrigger += "I can't see! "
//deaf..?
if (HAS_TRAIT(H, TRAIT_DEAF))//How the heck you managed to get here I have no idea, but just in case!
speaktrigger += "I can barely hear you! "
//And the brain damage. And the brain damage. And the brain damage. And the brain damage. And the brain damage.
switch(H.getBrainLoss())
if(20 to 40)
speaktrigger += "I have a mild head ache, "
if(40 to 80)
speaktrigger += "I feel disorentated and confused, "
if(80 to 120)
speaktrigger += "My head feels like it's about to explode, "
if(120 to 160)
speaktrigger += "You are the only thing keeping my mind sane, "
if(160 to INFINITY)
speaktrigger += "I feel like I'm on the brink of losing my mind, "
//horny
if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && H.client?.prefs.lewdchem)
switch(H.getArousalLoss())
if(40 to 60)
speaktrigger += "I'm feeling a little horny, "
if(60 to 80)
speaktrigger += "I'm feeling horny, "
if(80 to INFINITY)
speaktrigger += "I'm really, really horny, "
//collar
if(istype(H.wear_neck, /obj/item/clothing/neck/petcollar))
speaktrigger += "I love the collar you gave me, "
//End
if(H.client?.prefs.lewdchem)
speaktrigger += "[E.enthrallGender]!"
else
speaktrigger += "[user.first_name()]!"
//say it!
addtimer(CALLBACK(H, /atom/movable/proc/say, "[speaktrigger]"), 5)
E.cooldown += 1
//SILENCE
else if((findtext(message, silence_words)))
for(var/mob/living/carbon/C in listeners)
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
power_multiplier *= distancelist[get_dist(user, C)+1]
if (E.phase >= 3) //If target is fully enthralled,
ADD_TRAIT(C, TRAIT_MUTE, "enthrall")
else
C.silent += ((10 * power_multiplier) * E.phase)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='notice'>You are unable to speak!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You silence [C].</i></span>")
E.cooldown += 3
//SPEAK
else if((findtext(message, speak_words)))//fix
for(var/mob/living/carbon/C in listeners)
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
REMOVE_TRAIT(C, TRAIT_MUTE, "enthrall")
C.silent = 0
E.cooldown += 3
to_chat(user, "<span class='notice'><i>You [(C.client?.prefs.lewdchem?"allow [C] to speak again":"encourage [C] to speak again")].</i></span>")
//Antiresist
else if((findtext(message, antiresist_words)))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
E.status = "Antiresist"
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='big warning'>Your mind clouds over, as you find yourself unable to resist!</b></span>"), 5)
E.statusStrength = (1 * power_multiplier * E.phase)
E.cooldown += 15//Too short? yes, made 15
to_chat(user, "<span class='notice'><i>You frustrate [L]'s attempts at resisting.</i></span>")
//RESIST
else if((findtext(message, resist_words)))
for(var/mob/living/carbon/C in listeners)
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
power_multiplier *= distancelist[get_dist(user, C)+1]
E.deltaResist += (power_multiplier)
E.owner_resist()
E.cooldown += 2
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='notice'>You are spurred into resisting from [user]'s words!'</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You spark resistance in [C].</i></span>")
//FORGET (A way to cancel the process)
else if((findtext(message, forget_words)))
for(var/mob/living/carbon/C in listeners)
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase == 4)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='warning'>You're unable to forget about [(C.client?.prefs.lewdchem?"the dominating presence of [E.enthrallGender]":"[E.master]")]!</b></span>"), 5)
continue
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='warning'>You wake up, forgetting everything that just happened. You must've dozed off..? How embarassing!</b></span>"), 5)
C.Sleeping(50)
switch(E.phase)
if(1 to 2)
E.phase = -1
to_chat(C, "<span class='big warning'>You have no recollection of being enthralled by [E.master]!</b></span>")
to_chat(user, "<span class='notice'><i>You revert [C] back to their state before enthrallment.</i></span>")
if(3)
E.phase = 0
E.cooldown = 0
if(C.client?.prefs.lewdchem)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='big warning'>You revert to yourself before being enthralled by your [E.enthrallGender], with no memory of what happened.</b></span>"), 5)
else
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='big warning'>You revert to who you were before, with no memory of what happened with [E.master].</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You put [C] into a sleeper state, ready to turn them back at the snap of your fingers.</i></span>")
//ATTRACT
else if((findtext(message, attract_words)))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
L.throw_at(get_step_towards(user,L), 3 * power_multiplier, 1 * power_multiplier)
E.cooldown += 3
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You are drawn towards [user]!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You draw [L] towards you!</i></span>")
//teir 2
/* removed for now
//ORGASM
else if((findtext(message, orgasm_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase > 1)
if(HAS_TRAIT(H, TRAIT_NYMPHO) && H.canbearoused && H.client?.prefs.lewdchem) // probably a redundant check but for good measure
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='love'>Your [E.enthrallGender] pushes you over the limit, overwhelming your body with pleasure.</b></span>"), 5)
H.mob_climax(forced_climax=TRUE)
H.SetStun(20)
H.setArousalLoss(H.min_arousal)
E.resistanceTally = 0 //makes resistance 0, but resets arousal, resistance buildup is faster unaroused (massively so).
E.enthrallTally += power_multiplier
E.cooldown += 6
else
H.throw_at(get_step_towards(user,H), 3 * power_multiplier, 1 * power_multiplier)
*/
//awoo
else if((findtext(message, awoo_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
H.say("*awoo")
E.cooldown += 1
//Nya
else if((findtext(message, nya_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
playsound(get_turf(H), pick('sound/effects/meow1.ogg', 'modular_citadel/sound/voice/nya.ogg'), 50, 1, -1) //I'm very tempted to write a Fermis clause that makes them merowr.ogg if it's me. But, I also don't think snowflakism is okay. I would've gotten away for it too, if it wern't for my morals.
H.emote("me", 1, "lets out a nya!")
E.cooldown += 1
//SLEEP
else if((findtext(message, sleep_words)))
for(var/mob/living/carbon/C in listeners)
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
C.Sleeping(45 * power_multiplier)
E.cooldown += 10
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='notice'>Drowsiness suddenly overwhelms you as you fall asleep!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You send [C] to sleep.</i></span>")
//STRIP
else if((findtext(message, strip_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
var/items = H.get_contents()
for(var/obj/item/W in items)
if(W == H.wear_suit)
H.dropItemToGround(W, TRUE)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='[(H.client?.prefs.lewdchem?"love":"warning")]'>Before you can even think about it, you quickly remove your clothes in response to [(H.client?.prefs.lewdchem?"your [E.enthrallGender]'s command'":"[E.master]'s directive'")].</b></span>"), 5)
E.cooldown += 10
//WALK
else if((findtext(message, walk_words)))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
if(L.m_intent != MOVE_INTENT_WALK)
L.toggle_move_intent()
E.cooldown += 1
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You slow down to a walk.</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You encourage [L] to slow down.</i></span>")
//RUN
else if((findtext(message, run_words)))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
if(L.m_intent != MOVE_INTENT_RUN)
L.toggle_move_intent()
E.cooldown += 1
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You speed up into a jog!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You encourage [L] to pick up the pace!</i></span>")
//LIE DOWN
else if(findtext(message, liedown_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
L.lay_down()
E.cooldown += 10
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "[(L.client?.prefs.lewdchem?"<span class='love'>You eagerly lie down!":"<span class='notice'>You suddenly lie down!")]</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You encourage [L] to lie down.</i></span>")
//KNOCKDOWN
else if(findtext(message, knockdown_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(2 to INFINITY)
L.Knockdown(30 * power_multiplier * E.phase)
E.cooldown += 8
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You suddenly drop to the ground!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You encourage [L] to drop down to the ground.</i></span>")
//tier3
//STATE TRIGGERS
else if((findtext(message, statecustom_words)))//doesn't work
for(var/V in listeners)
var/mob/living/carbon/C = V
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
if (E.phase == 3)
var/speaktrigger = ""
C.emote("me", 1, "whispers something quietly.")
if (get_dist(user, C) > 1)//Requires user to be next to their pet.
to_chat(user, "<span class='warning'>You need to be next to your pet to hear them!</b></span>")
continue
for (var/trigger in E.customTriggers)
speaktrigger += "[trigger], "
to_chat(user, "<b>[C]</b> whispers, \"<i>[speaktrigger] are my triggers.</i>\"")//So they don't trigger themselves!
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='notice'>You whisper your triggers to [(C.client?.prefs.lewdchem?"Your [E.enthrallGender]":"[E.master]")].</span>"), 5)
//CUSTOM TRIGGERS
else if((findtext(message, custom_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase == 3)
if (get_dist(user, H) > 1)//Requires user to be next to their pet.
to_chat(user, "<span class='warning'>You need to be next to your pet to give them a new trigger!</b></span>")
continue
else
user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.")
user.SetStun(1000)//Hands are handy, so you have to stay still
H.SetStun(1000)
if (E.mental_capacity >= 5)
var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN))
var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel")
var/trigger2 = input(user, "Pick an effect", "Effects") in custom_words_words_list
trigger2 = lowertext(trigger2)
if ((findtext(trigger2, custom_words_words)))
if (trigger2 == "speak" || trigger2 == "echo")
var/trigger3 = html_decode(stripped_input(user, "Enter the phrase spoken. Abusing this to self antag is bannable.", MAX_MESSAGE_LEN))
E.customTriggers[trigger] = list(trigger2, trigger3)
log_game("FERMICHEM: [H] has been implanted by [user] with [trigger], triggering [trigger2], to send [trigger3].")
if(findtext(trigger3, "admin"))
message_admins("FERMICHEM: [user] maybe be trying to abuse MKUltra by implanting by [H] with [trigger], triggering [trigger2], to send [trigger3].")
else
E.customTriggers[trigger] = trigger2
log_game("FERMICHEM: [H] has been implanted by [user] with [trigger], triggering [trigger2].")
E.mental_capacity -= 5
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='notice'>[(H.client?.prefs.lewdchem?"your [E.enthrallGender]":"[E.master]")] whispers you a new trigger.</span>"), 5)
to_chat(user, "<span class='notice'><i>You sucessfully set the trigger word [trigger] in [H]</i></span>")
else
to_chat(user, "<span class='warning'>Your pet looks at you confused, it seems they don't understand that effect!</b></span>")
else
to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blase expression, you don't think you can program anything else into them</b></span>")
user.SetStun(0)
H.SetStun(0)
//CUSTOM ECHO
else if((findtext(message, custom_echo)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase == 3)
if (get_dist(user, H) > 1)//Requires user to be next to their pet.
to_chat(user, "<span class='warning'>You need to be next to your pet to give them a new echophrase!</b></span>")
continue
else
user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.")
user.SetStun(1000)//Hands are handy, so you have to stay still
H.SetStun(1000)
var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN)
var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet")
var/trigger2 = input(user, "Pick the style", "Style") in customSpan
trigger2 = lowertext(trigger2)
E.customEcho = trigger
E.customSpan = trigger2
user.SetStun(0)
H.SetStun(0)
to_chat(user, "<span class='notice'><i>You sucessfully set an echoing phrase in [H]</i></span>")
//CUSTOM OBJECTIVE
else if((findtext(message, objective_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase == 3)
if (get_dist(user, H) > 1)//Requires user to be next to their pet.
to_chat(user, "<span class='warning'>You need to be next to your pet to give them a new objective!</b></span>")
continue
else
user.emote("me", 1, "puts their hands upon [H.name]'s head and looks deep into their eyes, whispering something to them.'")
user.SetStun(1000)//So you can't run away!
H.SetStun(1000)
if (E.mental_capacity >= 200)
var/datum/objective/brainwashing/objective = stripped_input(user, "Add an objective to give your pet.", MAX_MESSAGE_LEN)
if(!LAZYLEN(objective))
to_chat(user, "<span class='warning'>You can't give your pet an objective to do nothing!</b></span>")
continue
//Pets don't understand harm
objective = replacetext(lowertext(objective), "kill", "hug")
objective = replacetext(lowertext(objective), "murder", "cuddle")
objective = replacetext(lowertext(objective), "harm", "snuggle")
objective = replacetext(lowertext(objective), "decapitate", "headpat")
objective = replacetext(lowertext(objective), "strangle", "meow at")
objective = replacetext(lowertext(objective), "suicide", "self-love")
message_admins("[H] has been implanted by [user] with the objective [objective].")
log_game("FERMICHEM: [H] has been implanted by [user] with the objective [objective] via MKUltra.")
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='notice'>[(H.client?.prefs.lewdchem?"Your [E.enthrallGender]":"[E.master]")] whispers you a new objective.</span>"), 5)
brainwash(H, objective)
E.mental_capacity -= 200
to_chat(user, "<span class='notice'><i>You sucessfully give an objective to [H]</i></span>")
else
to_chat(user, "<span class='warning'>Your pet looks at you with a vacant blasé expression, you don't think you can program anything else into them</b></span>")
user.SetStun(0)
H.SetStun(0)
//INSTILL
else if((findtext(message, instill_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase == 3 && H.client?.prefs.lewdchem)
var/instill = stripped_input(user, "Instill an emotion in your [(user.client?.prefs.lewdchem?"Your pet":"listener")].", MAX_MESSAGE_LEN)
to_chat(H, "<i>[instill]</i>")
to_chat(user, "<span class='notice'><i>You sucessfully instill a feeling in [H]</i></span>")
log_game("FERMICHEM: [H] has been instilled by [user] with [instill] via MKUltra.")
E.cooldown += 1
//RECOGNISE
else if((findtext(message, recognise_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase > 1)
if(user.ckey == E.enthrallID && user.real_name == E.master.real_name)
E.master = user
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='nicegreen'>[(H.client?.prefs.lewdchem?"You hear the words of your [E.enthrallGender] again!! They're back!!":"You recognise the voice of [E.master].")]</b></span>"), 5)
to_chat(user, "<span class='notice'><i>[H] looks at you with sparkling eyes, recognising you!</i></span>")
//I dunno how to do state objectives without them revealing they're an antag
//HEAL (maybe make this nap instead?)
else if(findtext(message, heal_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3)//Tier 3 only
E.status = "heal"
E.statusStrength = (5 * power_multiplier)
E.cooldown += 5
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You begin to lick your wounds.</b></span>"), 5)
L.Stun(15 * power_multiplier)
to_chat(user, "<span class='notice'><i>[L] begins to lick their wounds.</i></span>")
//STUN
else if(findtext(message, stun_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)
L.Stun(40 * power_multiplier)
E.cooldown += 8
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>Your muscles freeze up!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You cause [L] to freeze up!</i></span>")
//HALLUCINATE
else if(findtext(message, hallucinate_words))
for(var/V in listeners)
var/mob/living/carbon/C = V
var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)
new /datum/hallucination/delusion(C, TRUE, null,150 * power_multiplier,0)
to_chat(user, "<span class='notice'><i>You send [C] on a trip.</i></span>")
//HOT
else if(findtext(message, hot_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)
L.adjust_bodytemperature(50 * power_multiplier)//This seems nuts, reduced it, but then it didn't do anything, so I reverted it.
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You feel your metabolism speed up!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You speed [L]'s metabolism up!</i></span>")
//COLD
else if(findtext(message, cold_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)
L.adjust_bodytemperature(-50 * power_multiplier)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You feel your metabolism slow down!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You slow [L]'s metabolism down!</i></span>")
//GET UP
else if(findtext(message, getup_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3 to INFINITY)//Tier 3 only
if(L.resting)
L.lay_down() //aka get up
L.SetStun(0)
L.SetKnockdown(0)
L.SetUnconscious(0) //i said get up i don't care if you're being tased
E.cooldown += 10 //This could be really strong
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You jump to your feet from sheer willpower!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You spur [L] to their feet!</i></span>")
//PACIFY
else if(findtext(message, pacify_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3)//Tier 3 only
E.status = "pacify"
E.cooldown += 10
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You feel like never hurting anyone ever again.</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You remove any intent to harm from [L]'s mind.</i></span>")
//CHARGE
else if(findtext(message, charge_words))
for(var/V in listeners)
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
switch(E.phase)
if(3)//Tier 3 only
E.statusStrength = 2* power_multiplier
E.status = "charge"
E.cooldown += 10
to_chat(user, "<span class='notice'><i>You rally [L], leading them into a charge!</i></span>")
if(message_admins || debug)//Do you want this in?
message_admins("[ADMIN_LOOKUPFLW(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
log_game("FERMICHEM: [key_name(user)] ckey: [user.key] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times people have spoken with a velvet voice")
//SSblackbox.record_feedback("tally", "Velvet_voice", 1, log_message) If this is on, it fills the thing up and OOFs the server
return
#undef COOLDOWN_STUN
#undef COOLDOWN_DAMAGE
+18 -5
View File
@@ -1,8 +1,7 @@
/datum/surgery/plastic_surgery
name = "plastic surgery"
name = "Plastic surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/close)
possible_locs = list(BODY_ZONE_HEAD)
//reshape_face
/datum/surgery_step/reshape_face
name = "reshape face"
@@ -10,12 +9,16 @@
time = 64
/datum/surgery_step/reshape_face/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to alter [target]'s appearance.", "<span class='notice'>You begin to alter [target]'s appearance...</span>")
display_results(user, target, "<span class='notice'>You begin to alter [target]'s appearance...</span>",
"[user] begins to alter [target]'s appearance.",
"[user] begins to make an incision in [target]'s face.")
/datum/surgery_step/reshape_face/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(HAS_TRAIT_FROM(target, TRAIT_DISFIGURED, TRAIT_GENERIC))
REMOVE_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC)
user.visible_message("[user] successfully restores [target]'s appearance!", "<span class='notice'>You successfully restore [target]'s appearance.</span>")
display_results(user, target, "<span class='notice'>You successfully restore [target]'s appearance.</span>",
"[user] successfully restores [target]'s appearance!",
"[user] finishes the operation on [target]'s face.")
else
var/list/names = list()
if(!isabductor(user))
@@ -31,8 +34,18 @@
var/oldname = target.real_name
target.real_name = chosen_name
var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name
user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] is now [newname]!", "<span class='notice'>You alter [oldname]'s appearance completely, [target.p_they()] is now [newname].</span>")
display_results(user, target, "<span class='notice'>You alter [oldname]'s appearance completely, [target.p_they()] is now [newname].</span>",
"[user] alters [oldname]'s appearance completely, [target.p_they()] is now [newname]!",
"[user] finishes the operation on [target]'s face.")
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.sec_hud_set_ID()
return 1
return TRUE
/datum/surgery_step/reshape_face/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='warning'>You screw up, leaving [target]'s appearance disfigured!</span>",
"[user] screws up, disfiguring [target]'s appearance!",
"[user] finishes the operation on [target]'s face.")
ADD_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC)
return FALSE
+13 -12
View File
@@ -1,26 +1,21 @@
/datum/surgery/prosthetic_replacement
name = "prosthetic replacement"
name = "Prosthetic replacement"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/add_prosthetic)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD)
requires_bodypart = FALSE //need a missing limb
requires_bodypart_type = 0
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target)
if(!iscarbon(target))
return 0
var/mob/living/carbon/C = target
if(!C.get_bodypart(user.zone_selected)) //can only start if limb is missing
return 1
/datum/surgery_step/add_prosthetic
name = "add prosthetic"
implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100, /obj/item/twohanded/required/chainsaw = 100, /obj/item/melee/synthetic_arm_blade = 100)
time = 32
var/organ_rejection_dam = 0
/datum/surgery_step/add_prosthetic/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/organ_storage))
if(!tool.contents.len)
@@ -48,16 +43,19 @@
organ_rejection_dam = 30
if(target_zone == BP.body_zone) //so we can't replace a leg with an arm, or a human arm with a monkey arm.
user.visible_message("[user] begins to replace [target]'s [parse_zone(target_zone)].", "<span class ='notice'>You begin to replace [target]'s [parse_zone(target_zone)]...</span>")
display_results(user, target, "<span class ='notice'>You begin to replace [target]'s [parse_zone(target_zone)] with [tool]...</span>",
"[user] begins to replace [target]'s [parse_zone(target_zone)] with [tool].",
"[user] begins to replace [target]'s [parse_zone(target_zone)].")
else
to_chat(user, "<span class='warning'>[tool] isn't the right type for [parse_zone(target_zone)].</span>")
return -1
else if(target_zone == BODY_ZONE_L_ARM || target_zone == BODY_ZONE_R_ARM)
user.visible_message("[user] begins to attach [tool] onto [target].", "<span class='notice'>You begin to attach [tool] onto [target]...</span>")
display_results(user, target, "<span class='notice'>You begin to attach [tool] onto [target]...</span>",
"[user] begins to attach [tool] onto [target]'s [parse_zone(target_zone)].",
"[user] begins to attach something onto [target]'s [parse_zone(target_zone)].")
else
to_chat(user, "<span class='warning'>[tool] must be installed onto an arm.</span>")
return -1
/datum/surgery_step/add_prosthetic/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/organ_storage))
tool.icon_state = initial(tool.icon_state)
@@ -69,13 +67,17 @@
L.attach_limb(target)
if(organ_rejection_dam)
target.adjustToxLoss(organ_rejection_dam)
user.visible_message("[user] successfully replaces [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You succeed in replacing [target]'s [parse_zone(target_zone)].</span>")
display_results(user, target, "<span class='notice'>You succeed in replacing [target]'s [parse_zone(target_zone)].</span>",
"[user] successfully replaces [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully replaces [target]'s [parse_zone(target_zone)]!")
return 1
else
var/obj/item/bodypart/L = target.newBodyPart(target_zone, FALSE, FALSE)
L.is_pseudopart = TRUE
L.attach_limb(target)
user.visible_message("[user] finishes attaching [tool]!", "<span class='notice'>You attach [tool].</span>")
display_results(user, target, "<span class='notice'>You attach [tool].</span>",
"[user] finishes attaching [tool]!",
"[user] finishes the attachment procedure!")
qdel(tool)
if(istype(tool, /obj/item/twohanded/required/chainsaw))
var/obj/item/mounted_chainsaw/new_arm = new(target)
@@ -85,4 +87,3 @@
var/obj/item/melee/arm_blade/new_arm = new(target,TRUE,TRUE)
target_zone == BODY_ZONE_R_ARM ? target.put_in_r_hand(new_arm) : target.put_in_l_hand(new_arm)
return 1
@@ -2,23 +2,20 @@
name = "removal of embedded objects"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/remove_object)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
/datum/surgery_step/remove_object
name = "remove embedded objects"
time = 32
accept_hand = 1
var/obj/item/bodypart/L = null
/datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
L = surgery.operated_bodypart
if(L)
user.visible_message("[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].", "<span class='notice'>You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...</span>")
display_results(user, target, "<span class='notice'>You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...</span>",
"[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].",
"[user] looks for something in [target]'s [parse_zone(user.zone_selected)].")
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "<span class='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")
/datum/surgery_step/remove_object/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(L)
if(ishuman(target))
@@ -33,11 +30,12 @@
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "embedded")
if(objects > 0)
user.visible_message("[user] successfully removes [objects] objects from [H]'s [L]!", "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>")
display_results(user, target, "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>",
"[user] successfully removes [objects] objects from [H]'s [L]!",
"[user] successfully removes [objects] objects from [H]'s [L]!")
else
to_chat(user, "<span class='warning'>You find no objects embedded in [H]'s [L]!</span>")
else
to_chat(user, "<span class='warning'>You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!</span>")
return 1
+35 -46
View File
@@ -2,13 +2,12 @@
var/name
var/list/implements = list() //format is path = probability of success. alternatively
var/implement_type = null //the current type of implement used. This has to be stored, as the actual typepath of the tool may not match the list type.
var/accept_hand = 0 //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item.
var/accept_any_item = 0 //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand.
var/accept_hand = FALSE //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item.
var/accept_any_item = FALSE //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand.
var/time = 10 //how long does the step take?
var/repeatable = 0 //can this step be repeated? Make shure it isn't last step, or it used in surgery with `can_cancel = 1`. Or surgion will be stuck in the loop
var/repeatable = FALSE //can this step be repeated? Make shure it isn't last step, or it used in surgery with `can_cancel = 1`. Or surgion will be stuck in the loop
var/list/chems_needed = list() //list of chems needed to complete the step. Even on success, the step will have no effect if there aren't the chems required in the mob.
var/require_all_chems = TRUE //any on the list or all on the list?
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
var/success = FALSE
if(accept_hand)
@@ -16,104 +15,87 @@
success = TRUE
if(iscyborg(user))
success = TRUE
if(accept_any_item)
if(tool && tool_check(user, tool))
success = TRUE
else if(tool)
for(var/key in implements)
var/match = FALSE
if(ispath(key) && istype(tool, key))
match = TRUE
else if(tool.tool_behaviour == key)
match = TRUE
if(match)
implement_type = key
if(tool_check(user, tool))
success = TRUE
break
if(success)
if(target_zone == surgery.location)
if(get_location_accessible(target, target_zone) || surgery.ignore_clothes)
initiate(user, target, target_zone, tool, surgery, try_to_fail)
return 1
return initiate(user, target, target_zone, tool, surgery, try_to_fail)
else
to_chat(user, "<span class='warning'>You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!</span>")
return 1 //returns 1 so we don't stab the guy in the dick or wherever.
return TRUE //returns TRUE so we don't stab the guy in the dick or wherever.
if(repeatable)
var/datum/surgery_step/next_step = surgery.get_surgery_next_step()
if(next_step)
surgery.status++
if(next_step.try_op(user, target, user.zone_selected, user.get_active_held_item(), surgery))
return 1
return TRUE
else
surgery.status--
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
return 1
return 0
return FALSE
/datum/surgery_step/proc/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
surgery.step_in_progress = 1
surgery.step_in_progress = TRUE
var/speed_mod = 1
var/advance = FALSE
if(preop(user, target, target_zone, tool, surgery) == -1)
surgery.step_in_progress = 0
return
surgery.step_in_progress = FALSE
return FALSE
if(tool)
speed_mod = tool.toolspeed
if(do_after(user, time * speed_mod, target = target))
var/advance = 0
var/prob_chance = 100
if(implement_type) //this means it isn't a require hand or any item step.
prob_chance = implements[implement_type]
prob_chance *= surgery.get_propability_multiplier()
if((prob(prob_chance) || iscyborg(user)) && chem_check(target) && !try_to_fail)
if(success(user, target, target_zone, tool, surgery))
advance = 1
advance = TRUE
else
if(failure(user, target, target_zone, tool, surgery))
advance = 1
advance = TRUE
if(advance && !repeatable)
surgery.status++
if(surgery.status > surgery.steps.len)
surgery.complete()
surgery.step_in_progress = 0
surgery.step_in_progress = FALSE
return advance
/datum/surgery_step/proc/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to perform surgery on [target].", "<span class='notice'>You begin to perform surgery on [target]...</span>")
display_results(user, target, "<span class='notice'>You begin to perform surgery on [target]...</span>",
"[user] begins to perform surgery on [target].",
"[user] begins to perform surgery on [target].")
/datum/surgery_step/proc/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] succeeds!", "<span class='notice'>You succeed.</span>")
return 1
display_results(user, target, "<span class='notice'>You succeed.</span>",
"[user] succeeds!",
"[user] finishes.")
return TRUE
/datum/surgery_step/proc/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("<span class='warning'>[user] screws up!</span>", "<span class='warning'>You screw up!</span>")
return 0
display_results(user, target, "<span class='warning'>You screw up!</span>",
"<span class='warning'>[user] screws up!</span>",
"[user] finishes.", TRUE) //By default the patient will notice if the wrong thing has been cut
return FALSE
/datum/surgery_step/proc/tool_check(mob/user, obj/item/tool)
return 1
return TRUE
/datum/surgery_step/proc/chem_check(mob/living/carbon/target)
if(!LAZYLEN(chems_needed))
return TRUE
if(require_all_chems)
. = TRUE
for(var/R in chems_needed)
@@ -124,7 +106,6 @@
for(var/R in chems_needed)
if(target.reagents.has_reagent(R))
return TRUE
/datum/surgery_step/proc/get_chem_list()
if(!LAZYLEN(chems_needed))
return
@@ -135,3 +116,11 @@
var/chemname = temp.name
chems += chemname
return english_list(chems, and_text = require_all_chems ? " and " : " or ")
//Replaces visible_message during operations so only people looking over the surgeon can tell what they're doing, allowing for shenanigans.
/datum/surgery_step/proc/display_results(mob/user, mob/living/carbon/target, self_message, detailed_message, vague_message, target_detailed = FALSE)
var/list/detailed_mobs = get_hearers_in_view(1, user) //Only the surgeon and people looking over his shoulder can see the operation clearly
if(!target_detailed)
detailed_mobs -= target //The patient can't see well what's going on, unless it's something like getting cut
user.visible_message(detailed_message, self_message, vision_distance = 1, ignored_mobs = target_detailed ? null : target)
user.visible_message(vague_message, "", ignored_mobs = detailed_mobs)