Upload files

This commit is contained in:
SandPoot
2022-04-09 15:42:57 -03:00
parent 5e4aef0b30
commit 4e296b72d5
34 changed files with 144 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
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."
@@ -23,11 +24,16 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/brainwash
name = "brainwash"
implements = list(TOOL_HEMOSTAT = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 200
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
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)

View File

@@ -12,6 +12,7 @@
target_mobtypes = 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, obj/item/tool)
if(!..())
return FALSE
@@ -19,11 +20,16 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/lobotomize
name = "perform lobotomy"
implements = list(TOOL_SCALPEL = 85, /obj/item/melee/transforming/energy/sword = 55, /obj/item/kitchen/knife = 35,
/obj/item/shard = 25, /obj/item = 20)
time = 100
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/scalpel2.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE

View File

@@ -11,15 +11,20 @@
target_mobtypes = 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, obj/item/tool)
. = ..()
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B)
return FALSE
/datum/surgery_step/pacify
name = "rewire brain"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
time = 40
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to pacify [target]...</span>",

View File

@@ -12,6 +12,7 @@
target_mobtypes = 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, obj/item/tool)
if(!..())
return FALSE
@@ -23,10 +24,14 @@
if(!B)
return FALSE
return TRUE
/datum/surgery_step/revive
name = "electrically stimulate brain"
implements = list(/obj/item/shockpaddles = 100, /obj/item/abductor/gizmo = 100, /obj/item/rod_of_asclepius = 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
success_sound = 'sound/magic/lightningbolt.ogg'
failure_sound = 'sound/magic/lightningbolt.ogg'
/datum/surgery_step/revive/tool_check(mob/user, obj/item/tool)
. = TRUE
if(istype(tool, /obj/item/shockpaddles))
@@ -53,11 +58,16 @@
"[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/play_preop_sound(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/shockpaddles))
playsound(tool, 'sound/machines/defib_charge.ogg', 75, 0)
else
..()
/datum/surgery_step/revive/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
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()
var/tplus = world.time - target.timeofdeath
@@ -86,6 +96,5 @@
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.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 199)
return FALSE

View File

@@ -4,10 +4,13 @@
target_mobtypes = 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(TOOL_SCALPEL = 100, TOOL_SAW = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100, /obj/item/melee/arm_blade = 80, /obj/item/chainsaw = 80, /obj/item/mounted_chainsaw = 80, /obj/item/fireaxe = 50, /obj/item/hatchet = 40, /obj/item/kitchen/knife/butcher = 25)
time = 64
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/sever_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to sever [target]'s [parse_zone(target_zone)]...</span>",

View File

@@ -11,10 +11,15 @@
target_mobtypes = 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(TOOL_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
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
if(!B || istype(B, /obj/item/organ/brain/ipc))

View File

@@ -28,6 +28,9 @@
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCALPEL = 85, TOOL_SAW = 60, TOOL_WIRECUTTER = 40)
time = 30
repeatable = TRUE
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/retractor2.ogg'
failure_sound = 'sound/surgery/organ1.ogg'
/datum/surgery_step/debride/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(surgery.operated_wound)

View File

@@ -3,6 +3,7 @@
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)
target_mobtypes = 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"
@@ -11,11 +12,15 @@
implements = list(/obj/item = 100)
repeatable = TRUE
time = 32
preop_sound = 'sound/surgery/organ1.ogg'
success_sound = 'sound/surgery/organ2.ogg'
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.get_temperature()
/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

View File

@@ -12,13 +12,15 @@
return TRUE
return FALSE
//an incision but with greater bleed, and a 90% base success chance
/datum/surgery_step/incise_heart
name = "incise heart"
implements = list(TOOL_SCALPEL = 90, /obj/item/melee/transforming/energy/sword = 45, /obj/item/kitchen/knife = 45,
/obj/item/shard = 25)
time = 16
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/scalpel2.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/incise_heart/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to make an incision in [target]'s heart...</span>",
@@ -53,6 +55,9 @@
name = "graft coronary bypass"
implements = list(TOOL_HEMOSTAT = 90, TOOL_WIRECUTTER = 35, /obj/item/stack/packageWrap = 15, /obj/item/stack/cable_coil = 5)
time = 90
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/coronary_bypass/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to graft a bypass onto [target]'s heart...</span>",

View File

@@ -32,6 +32,8 @@
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 65, /obj/item/pen = 55)
repeatable = TRUE
time = 15
success_sound = 'sound/surgery/retractor2.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
var/brutehealing = 0
var/burnhealing = 0
var/missinghpbonus = 0 //heals an extra point of damager per X missing damage of type (burn damage for burn healing, brute for brute). Smaller Number = More Healing!

View File

@@ -3,12 +3,15 @@
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)
target_mobtypes = 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(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 65)
time = 64
success_sound = 'sound/surgery/hemostat1.ogg'
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
@@ -48,6 +51,7 @@
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

View File

@@ -19,6 +19,9 @@
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
time = 42
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/organ1.ogg'
failure_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/lobectomy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to make an incision in [target]'s lungs...</span>",

View File

@@ -3,10 +3,12 @@
name = "unscrew shell"
implements = list(
TOOL_SCREWDRIVER = 100,
TOOL_SCALPEL = 75, // med borgs could try to unskrew shell with scalpel
TOOL_SCALPEL = 75, // med borgs could try to unscrew shell with scalpel
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
time = 24
preop_sound = 'sound/items/screwdriver.ogg'
success_sound = 'sound/items/screwdriver2.ogg'
/datum/surgery_step/mechanic_open/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to unscrew the shell of [target]'s [parse_zone(target_zone)]...</span>",
@@ -16,7 +18,11 @@
/datum/surgery_step/mechanic_open/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
if(tool.usesound)
preop_sound = tool.usesound
return TRUE
//close shell
/datum/surgery_step/mechanic_close
name = "screw shell"
@@ -26,6 +32,8 @@
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
time = 24
preop_sound = 'sound/items/screwdriver.ogg'
success_sound = 'sound/items/screwdriver2.ogg'
/datum/surgery_step/mechanic_close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to screw the shell of [target]'s [parse_zone(target_zone)]...</span>",
@@ -35,7 +43,11 @@
/datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
if(tool.usesound)
preop_sound = tool.usesound
return TRUE
//prepare electronics
/datum/surgery_step/prepare_electronics
name = "prepare electronics (multitool)"
@@ -43,6 +55,8 @@
TOOL_MULTITOOL = 100,
TOOL_HEMOSTAT = 10) // try to reboot internal controllers via short circuit with some conductor
time = 24
preop_sound = 'sound/items/taperecorder/tape_flip.ogg'
success_sound = 'sound/items/taperecorder/taperecorder_close.ogg'
/datum/surgery_step/prepare_electronics/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to prepare electronics in [target]'s [parse_zone(target_zone)]...</span>",
@@ -56,12 +70,19 @@
TOOL_WRENCH = 100,
TOOL_RETRACTOR = 10)
time = 24
preop_sound = 'sound/items/ratchet.ogg'
/datum/surgery_step/mechanic_unwrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
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)].")
/datum/surgery_step/mechanic_unwrench/tool_check(mob/user, obj/item/tool)
if(tool.usesound)
preop_sound = tool.usesound
return TRUE
//wrench
/datum/surgery_step/mechanic_wrench
name = "wrench bolts"
@@ -69,23 +90,38 @@
TOOL_WRENCH = 100,
TOOL_RETRACTOR = 10)
time = 24
preop_sound = 'sound/items/ratchet.ogg'
/datum/surgery_step/mechanic_wrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
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)].")
/datum/surgery_step/mechanic_wrench/tool_check(mob/user, obj/item/tool)
if(tool.usesound)
preop_sound = tool.usesound
return TRUE
//open hatch
/datum/surgery_step/open_hatch
name = "open the hatch (empty hand)"
accept_hand = 1
time = 10
preop_sound = 'sound/items/ratchet.ogg'
preop_sound = 'sound/machines/doorclick.ogg'
/datum/surgery_step/open_hatch/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
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)].")
/datum/surgery_step/mechanic_unwrench/tool_check(mob/user, obj/item/tool)
if(tool.usesound)
preop_sound = tool.usesound
return TRUE
//cut wires
/datum/surgery_step/cut_wires
name = "cut wires"

View File

@@ -14,6 +14,7 @@
//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,6 +25,7 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/close
)
/datum/surgery/organ_manipulation/alien
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)
@@ -36,6 +38,7 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/close
)
/datum/surgery/organ_manipulation/mechanic
name = "Prosthesis organ manipulation"
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
@@ -49,6 +52,7 @@
/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(
@@ -58,20 +62,27 @@
/datum/surgery_step/manipulate_organs,
/datum/surgery_step/mechanic_close
)
/datum/surgery_step/manipulate_organs
time = 64
name = "manipulate organs"
repeatable = 1
implements = list(/obj/item/organ = 100, /obj/item/organ_storage = 100)
preop_sound = 'sound/surgery/organ2.ogg'
success_sound = 'sound/surgery/organ1.ogg'
var/implements_extract = list(TOOL_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))
preop_sound = initial(preop_sound)
success_sound = initial(success_sound)
if(!tool.contents.len)
to_chat(user, "<span class='notice'>There is nothing inside [tool]!</span>")
return -1
@@ -82,6 +93,8 @@
tool = I
if(isorgan(tool))
current_type = "insert"
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/organ2.ogg'
I = tool
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>")

View File

@@ -4,6 +4,8 @@
implements = list(TOOL_SCALPEL = 100, /obj/item/melee/transforming/energy/sword = 75, /obj/item/kitchen/knife = 65,
/obj/item/shard = 45, /obj/item = 30) // 30% success with any sharp item.
time = 16
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/scalpel2.ogg'
/datum/surgery_step/incise/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to make an incision in [target]'s [parse_zone(target_zone)]...</span>",
@@ -41,6 +43,7 @@
name = "clamp bleeders"
implements = list(TOOL_HEMOSTAT = 100, TOOL_WIRECUTTER = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 24
preop_sound = 'sound/surgery/hemostat1.ogg'
/datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to clamp bleeders in [target]'s [parse_zone(target_zone)]...</span>",
@@ -56,25 +59,28 @@
if(BP)
BP.generic_bleedstacks -= 3
return ..()
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
implements = list(TOOL_RETRACTOR = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 24
preop_sound = 'sound/surgery/retractor1.ogg'
success_sound = 'sound/surgery/retractor2.ogg'
/datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
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)].")
//close incision
/datum/surgery_step/close
name = "mend incision"
implements = list(TOOL_CAUTERY = 100, /obj/item/gun/energy/laser = 90, TOOL_WELDER = 70,
/obj/item = 30) // 30% success with any hot item.
time = 24
preop_sound = 'sound/surgery/cautery1.ogg'
success_sound = 'sound/surgery/cautery2.ogg'
/datum/surgery_step/close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to mend the incision in [target]'s [parse_zone(target_zone)]...</span>",
@@ -85,6 +91,7 @@
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.get_temperature()
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)
@@ -94,11 +101,14 @@
if(BP)
BP.generic_bleedstacks -= 3
return ..()
//saw bone
/datum/surgery_step/saw
name = "saw bone"
implements = list(TOOL_SAW = 100, /obj/item/melee/arm_blade = 75, /obj/item/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
time = 54
preop_sound = 'sound/surgery/saw.ogg'
success_sound = 'sound/surgery/organ2.ogg'
/datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...</span>",

View File

@@ -9,6 +9,9 @@
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?
var/silicons_obey_prob = FALSE
var/preop_sound //Sound played when the step is started
var/success_sound //Sound played if the step succeeded
var/failure_sound //Sound played if the step fails
/datum/surgery_step/proc/try_op(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
var/success = FALSE
@@ -56,6 +59,9 @@
if(preop(user, target, target_zone, tool, surgery) == -1)
surgery.step_in_progress = FALSE
return FALSE
play_preop_sound(user, target, target_zone, tool, surgery) // Here because most steps overwrite preop
if(tool)
speed_mod = tool.toolspeed //faster tools mean faster surgeries, but also less experience.
if(user.mind)
@@ -69,6 +75,7 @@
if((prob(prob_chance) || (iscyborg(user) && !silicons_obey_prob)) && chem_check(target) && !try_to_fail)
if(success(user, target, target_zone, tool, surgery))
play_success_sound(user, target, target_zone, tool, surgery)
var/multi = (delay/SKILL_GAIN_DELAY_DIVISOR)
if(repeatable)
multi *= 0.5 //Spammable surgeries award less experience.
@@ -76,6 +83,7 @@
advance = TRUE
else
if(failure(user, target, target_zone, tool, surgery))
play_failure_sound(user, target, target_zone, tool, surgery)
advance = TRUE
if(advance && !repeatable)
surgery.status++
@@ -98,18 +106,33 @@
"[user] begins to perform surgery on [target].",
"[user] begins to perform surgery on [target].")
/datum/surgery_step/proc/play_preop_sound(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(!preop_sound)
return
playsound(get_turf(target), preop_sound, 75, TRUE, falloff_exponent = 12, falloff_distance = 1)
/datum/surgery_step/proc/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(user, target, "<span class='notice'>You succeed.</span>",
"[user] succeeds!",
"[user] finishes.")
return TRUE
/datum/surgery_step/proc/play_success_sound(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(!success_sound)
return
playsound(get_turf(target), success_sound, 75, TRUE, falloff_exponent = 12, falloff_distance = 1)
/datum/surgery_step/proc/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
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/play_failure_sound(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(!failure_sound)
return
playsound(get_turf(target), failure_sound, 75, TRUE, falloff_exponent = 12, falloff_distance = 1)
/datum/surgery_step/proc/tool_check(mob/user, obj/item/tool)
return TRUE

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sound/surgery/cautery1.ogg Normal file

Binary file not shown.

BIN
sound/surgery/cautery2.ogg Normal file

Binary file not shown.

BIN
sound/surgery/hemostat1.ogg Normal file

Binary file not shown.

BIN
sound/surgery/organ1.ogg Normal file

Binary file not shown.

BIN
sound/surgery/organ2.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sound/surgery/saw.ogg Normal file

Binary file not shown.

BIN
sound/surgery/scalpel1.ogg Normal file

Binary file not shown.

BIN
sound/surgery/scalpel2.ogg Normal file

Binary file not shown.