surgery tool refactor (#46856)

* awooooooooooooooooo

* a

* aw shet

* woops!!

* a

* wow heck you
This commit is contained in:
Fikou
2019-10-09 18:25:42 +02:00
committed by moo
parent ba03445c89
commit e450be44dc
32 changed files with 118 additions and 168 deletions

View File

@@ -8,7 +8,12 @@
#define TOOL_ANALYZER "analyzer"
#define TOOL_MINING "mining"
#define TOOL_SHOVEL "shovel"
#define TOOL_RETRACTOR "retractor"
#define TOOL_HEMOSTAT "hemostat"
#define TOOL_CAUTERY "cautery"
#define TOOL_DRILL "drill"
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
// tool sound is only played when op is started. If not, it's played twice.

View File

@@ -13,6 +13,8 @@
energy_drain = 10
force = 15
harmful = TRUE
tool_behaviour = TOOL_DRILL
toolspeed = 0.9
var/drill_delay = 7
var/drill_level = DRILL_BASIC
@@ -141,6 +143,7 @@
drill_delay = 4
drill_level = DRILL_HARDENED
force = 15
toolspeed = 0.7
/obj/item/mecha_parts/mecha_equipment/mining_scanner

View File

@@ -8,6 +8,8 @@
icon_state = "mecha_clamp"
equip_cooldown = 15
energy_drain = 10
tool_behaviour = TOOL_RETRACTOR
toolspeed = 0.8
var/dam_force = 20
var/obj/mecha/working/ripley/cargo_holder
harmful = TRUE

View File

@@ -323,6 +323,8 @@
slot_flags = ITEM_SLOT_BELT
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
tool_behaviour = TOOL_SAW
toolspeed = 1.5 //slower than a real saw
/obj/item/nullrod/claymore/glowing
icon_state = "swordon"
@@ -476,6 +478,8 @@
slot_flags = ITEM_SLOT_BELT
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
tool_behaviour = TOOL_SAW
toolspeed = 0.5 //faster than normal saw
/obj/item/nullrod/hammmer
icon_state = "hammeron"
@@ -500,6 +504,8 @@
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
tool_behaviour = TOOL_SAW
toolspeed = 2 //slower than a real saw
/obj/item/nullrod/chainsaw/Initialize()
. = ..()

View File

@@ -140,6 +140,8 @@
w_class = WEIGHT_CLASS_NORMAL
sharpness = IS_SHARP
light_color = "#40ceff"
tool_behaviour = TOOL_SAW
toolspeed = 0.7 //faster as a saw
/obj/item/melee/transforming/energy/sword/cyborg/saw/cyborg_unequip(mob/user)
if(!active)

View File

@@ -577,6 +577,8 @@
hitsound = "swing_hit"
sharpness = IS_SHARP
actions_types = list(/datum/action/item_action/startchainsaw)
tool_behaviour = TOOL_SAW
toolspeed = 0.5
var/on = FALSE
/obj/item/twohanded/required/chainsaw/Initialize()

View File

@@ -441,6 +441,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
tool_behaviour = TOOL_SAW
toolspeed = 1
/obj/item/mounted_chainsaw/Initialize()
. = ..()

View File

@@ -285,7 +285,7 @@
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/paicard))
insertpai(user, W)
else if(istype(W, /obj/item/hemostat) && paicard)
else if(W.tool_behaviour == TOOL_HEMOSTAT && paicard)
if(open)
to_chat(user, "<span class='warning'>Close the access panel before manipulating the personality slot!</span>")
else

View File

@@ -429,17 +429,13 @@
#undef BRAINS_BLOWN_THROW_RANGE
GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
/obj/item/circular_saw,
/obj/item/gun/energy/plasmacutter,
/obj/item/melee/transforming/energy,
/obj/item/twohanded/required/chainsaw,
/obj/item/nullrod/claymore/chainsaw_sword,
/obj/item/nullrod/chainsaw,
/obj/item/mounted_chainsaw)))
)))
///Handles all the logic of sawing off guns,
/obj/item/gun/ballistic/proc/sawoff(mob/user, obj/item/saw)
if(!saw.get_sharpness() || !is_type_in_typecache(saw, GLOB.gun_saw_types)) //needs to be sharp. Otherwise turned off eswords can cut this.
if(!saw.get_sharpness() || !is_type_in_typecache(saw, GLOB.gun_saw_types) && !saw.tool_behaviour == TOOL_SAW) //needs to be sharp. Otherwise turned off eswords can cut this.
return
if(sawn_off)
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
@@ -490,5 +486,4 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
/obj/item/suppressor/specialoffer
name = "cheap suppressor"
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits most weapons."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"

View File

@@ -223,9 +223,9 @@
/datum/design/searingtool
name = "Searing Tool"
desc = "Used to mend tissue togheter."
desc = "Used to mend tissue together. Or drill tissue away."
id = "searingtool"
build_path = /obj/item/cautery/advanced
build_path = /obj/item/surgicaldrill/advanced
build_type = PROTOLATHE
materials = list(/datum/material/iron = 4000, /datum/material/glass = 2000, /datum/material/plasma = 2000, /datum/material/uranium = 3000, /datum/material/titanium = 3000)
category = list("Tool Designs")

View File

@@ -27,7 +27,7 @@
/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)
implements = list(TOOL_HEMOSTAT = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 200
var/objective

View File

@@ -23,7 +23,7 @@
/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,
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

View File

@@ -20,7 +20,7 @@
/datum/surgery_step/pacify
name = "rewire brain"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
implements = list(TOOL_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)

View File

@@ -20,7 +20,7 @@
/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.
implements = list(TOOL_CAUTERY = 100, TOOL_WELDER = 50, /obj/item = 30) // 30% success with any hot item.
time = 100
chems_needed = list(/datum/reagent/medicine/spaceacillin,/datum/reagent/consumable/virus_food,/datum/reagent/toxin/formaldehyde)

View File

@@ -9,7 +9,7 @@
/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)
implements = list(TOOL_SCALPEL = 100, TOOL_SAW = 100, /obj/item/melee/arm_blade = 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)

View File

@@ -14,7 +14,7 @@
/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
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
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target)

View File

@@ -14,7 +14,7 @@
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 100)
implements = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 100)
time = 16
/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -15,7 +15,7 @@
//an incision but with greater bleed, and a 90% base success chance
/datum/surgery_step/incise_heart
name = "incise heart"
implements = list(/obj/item/scalpel = 90, /obj/item/melee/transforming/energy/sword = 45, /obj/item/kitchen/knife = 45,
implements = list(TOOL_SCALPEL = 90, /obj/item/melee/transforming/energy/sword = 45, /obj/item/kitchen/knife = 45,
/obj/item/shard = 25)
time = 16

View File

@@ -25,7 +25,7 @@
/datum/surgery_step/dissection
name = "dissection"
implements = list(/obj/item/scalpel/augment = 75, /obj/item/scalpel/advanced = 60, /obj/item/scalpel = 45, /obj/item/kitchen/knife = 20, /obj/item/shard = 10)// special tools not only cut down time but also improve probability
implements = list(/obj/item/scalpel/augment = 75, /obj/item/scalpel/advanced = 60, TOOL_SCALPEL = 45, /obj/item/kitchen/knife = 20, /obj/item/shard = 10)// special tools not only cut down time but also improve probability
time = 125
silicons_obey_prob = TRUE
repeatable = TRUE

View File

@@ -8,7 +8,7 @@
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)

View File

@@ -23,7 +23,7 @@
/datum/surgery_step/heal
name = "repair body"
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 65, /obj/item/pen = 55)
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 65, /obj/item/pen = 55)
repeatable = TRUE
time = 25
var/brutehealing = 0

View File

@@ -89,12 +89,12 @@
"<span class='notice'>You remove [I] from [M]'s [parse_zone(selected_zone)].</span>")
qdel(S)
else if(S.can_cancel)
var/close_tool_type = /obj/item/cautery
var/required_tool_type = TOOL_CAUTERY
var/obj/item/close_tool = user.get_inactive_held_item()
var/is_robotic = S.requires_bodypart_type == BODYPART_ROBOTIC
if(is_robotic)
close_tool_type = /obj/item/screwdriver
if(istype(close_tool, close_tool_type) || iscyborg(user))
required_tool_type = TOOL_SCREWDRIVER
if(close_tool.tool_behaviour == required_tool_type || iscyborg(user))
if (ishuman(M))
var/mob/living/carbon/human/H = M
H.bleed_rate = max( (H.bleed_rate - 3), 0)

View File

@@ -21,7 +21,7 @@
//95% chance of success, not 100 because organs are delicate
/datum/surgery_step/hepatectomy
name = "remove damaged liver section"
implements = list(/obj/item/scalpel = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
time = 52

View File

@@ -8,7 +8,7 @@
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 65)
implements = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 65)
time = 64
var/obj/item/implant/I = null

View File

@@ -6,7 +6,7 @@
/datum/surgery_step/replace
name = "sever muscles"
implements = list(/obj/item/scalpel = 100, TOOL_WIRECUTTER = 55)
implements = list(TOOL_SCALPEL = 100, TOOL_WIRECUTTER = 55)
time = 32

View File

@@ -12,7 +12,7 @@
//cut fat
/datum/surgery_step/cut_fat
name = "cut excess fat"
implements = list(/obj/item/circular_saw = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
implements = list(TOOL_SAW = 100, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
time = 64
/datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -30,7 +30,7 @@
//remove fat
/datum/surgery_step/remove_fat
name = "remove loose fat"
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
implements = list(TOOL_RETRACTOR = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 32
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -15,7 +15,7 @@
//lobectomy, removes the most damaged lung lobe with a 95% base success chance
/datum/surgery_step/lobectomy
name = "excise damaged lung node"
implements = list(/obj/item/scalpel = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
time = 42

View File

@@ -3,7 +3,7 @@
name = "unscrew shell"
implements = list(
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75, // med borgs could try to unskrew shell with scalpel
TOOL_SCALPEL = 75, // med borgs could try to unskrew shell with scalpel
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
time = 24
@@ -24,7 +24,7 @@
name = "screw shell"
implements = list(
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75,
TOOL_SCALPEL = 75,
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
time = 24
@@ -45,7 +45,7 @@
name = "prepare electronics"
implements = list(
TOOL_MULTITOOL = 100,
/obj/item/hemostat = 10) // try to reboot internal controllers via short circuit with some conductor
TOOL_HEMOSTAT = 10) // try to reboot internal controllers via short circuit with some conductor
time = 24
/datum/surgery_step/prepare_electronics/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -58,7 +58,7 @@
name = "unwrench bolts"
implements = list(
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
TOOL_RETRACTOR = 10)
time = 24
/datum/surgery_step/mechanic_unwrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -71,7 +71,7 @@
name = "wrench bolts"
implements = list(
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
TOOL_RETRACTOR = 10)
time = 24
/datum/surgery_step/mechanic_wrench/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -69,7 +69,7 @@
name = "manipulate organs"
repeatable = 1
implements = list(/obj/item/organ = 100, /obj/item/reagent_containers/food/snacks/organ = 0, /obj/item/organ_storage = 100)
var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55)
var/implements_extract = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 55)
var/current_type
var/obj/item/organ/I = null

View File

@@ -2,7 +2,7 @@
//make incision
/datum/surgery_step/incise
name = "make incision"
implements = list(/obj/item/scalpel = 100, /obj/item/melee/transforming/energy/sword = 75, /obj/item/kitchen/knife = 65,
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
@@ -40,7 +40,7 @@
//clamp bleeders
/datum/surgery_step/clamp_bleeders
name = "clamp bleeders"
implements = list(/obj/item/hemostat = 100, TOOL_WIRECUTTER = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
implements = list(TOOL_HEMOSTAT = 100, TOOL_WIRECUTTER = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 24
/datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -59,7 +59,7 @@
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
implements = list(TOOL_RETRACTOR = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 24
/datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -72,7 +72,7 @@
//close incision
/datum/surgery_step/close
name = "mend incision"
implements = list(/obj/item/cautery = 100, /obj/item/gun/energy/laser = 90, TOOL_WELDER = 70,
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
@@ -100,9 +100,8 @@
//saw bone
/datum/surgery_step/saw
name = "saw bone"
implements = list(/obj/item/circular_saw = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100,
/obj/item/melee/arm_blade = 75, /obj/item/mounted_chainsaw = 65, /obj/item/twohanded/required/chainsaw = 50,
/obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
implements = list(TOOL_SAW = 100,/obj/item/melee/arm_blade = 75,
/obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
time = 54
/datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -120,7 +119,7 @@
//drill bone
/datum/surgery_step/drill
name = "drill bone"
implements = list(/obj/item/surgicaldrill = 100, /obj/item/screwdriver/power = 80, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, TOOL_SCREWDRIVER = 20)
implements = list(TOOL_DRILL = 100, /obj/item/screwdriver/power = 80, /obj/item/pickaxe/drill = 60, TOOL_SCREWDRIVER = 20)
time = 30
/datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -6,7 +6,7 @@
//reshape_face
/datum/surgery_step/reshape_face
name = "reshape face"
implements = list(/obj/item/scalpel = 100, /obj/item/kitchen/knife = 50, TOOL_WIRECUTTER = 35)
implements = list(TOOL_SCALPEL = 100, /obj/item/kitchen/knife = 50, TOOL_WIRECUTTER = 35)
time = 64
/datum/surgery_step/reshape_face/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -10,15 +10,11 @@
flags_1 = CONDUCT_1
item_flags = SURGICAL_TOOL
w_class = WEIGHT_CLASS_TINY
tool_behaviour = TOOL_RETRACTOR
toolspeed = 1
/obj/item/retractor/augment
name = "retractor"
desc = "Micro-mechanical manipulator for retracting stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
custom_materials = list(/datum/material/iron=6000, /datum/material/glass=3000)
w_class = WEIGHT_CLASS_TINY
toolspeed = 0.5
@@ -35,17 +31,12 @@
item_flags = SURGICAL_TOOL
w_class = WEIGHT_CLASS_TINY
attack_verb = list("attacked", "pinched")
tool_behaviour = TOOL_HEMOSTAT
toolspeed = 1
/obj/item/hemostat/augment
name = "hemostat"
desc = "Tiny servos power a pair of pincers to stop bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
custom_materials = list(/datum/material/iron=5000, /datum/material/glass=2500)
w_class = WEIGHT_CLASS_TINY
toolspeed = 0.5
attack_verb = list("attacked", "pinched")
/obj/item/cautery
@@ -61,17 +52,12 @@
item_flags = SURGICAL_TOOL
w_class = WEIGHT_CLASS_TINY
attack_verb = list("burnt")
tool_behaviour = TOOL_CAUTERY
toolspeed = 1
/obj/item/cautery/augment
name = "cautery"
desc = "A heated element that cauterizes wounds."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
custom_materials = list(/datum/material/iron=2500, /datum/material/glass=750)
w_class = WEIGHT_CLASS_TINY
toolspeed = 0.5
attack_verb = list("burnt")
/obj/item/surgicaldrill
@@ -88,19 +74,15 @@
force = 15
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("drilled")
tool_behaviour = TOOL_DRILL
toolspeed = 1
/obj/item/surgicaldrill/augment
name = "surgical drill"
desc = "Effectively a small power drill contained within your arm, edges dulled to prevent tissue damage. May or may not pierce the heavens."
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
custom_materials = list(/datum/material/iron=10000, /datum/material/glass=6000)
force = 10
w_class = WEIGHT_CLASS_SMALL
toolspeed = 0.5
attack_verb = list("drilled")
/obj/item/scalpel
@@ -113,7 +95,6 @@
item_state = "scalpel"
flags_1 = CONDUCT_1
item_flags = SURGICAL_TOOL
force = 10
w_class = WEIGHT_CLASS_TINY
throwforce = 5
@@ -123,26 +104,16 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP_ACCURATE
tool_behaviour = TOOL_SCALPEL
toolspeed = 1
/obj/item/scalpel/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 80 * toolspeed, 100, 0)
/obj/item/scalpel/augment
name = "scalpel"
desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy."
icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel"
force = 10
w_class = WEIGHT_CLASS_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
custom_materials = list(/datum/material/iron=4000, /datum/material/glass=1000)
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
toolspeed = 0.5
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP_ACCURATE
/obj/item/scalpel/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] [pick("wrists", "throat", "stomach")] with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -168,25 +139,19 @@
custom_materials = list(/datum/material/iron=10000, /datum/material/glass=6000)
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharpness = IS_SHARP
tool_behaviour = TOOL_SAW
toolspeed = 1
/obj/item/circular_saw/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 40 * toolspeed, 100, 5, 'sound/weapons/circsawhit.ogg') //saws are very accurate and fast at butchering
/obj/item/circular_saw/augment
name = "circular saw"
desc = "A small but very fast spinning saw. Edges dulled to prevent accidental cutting inside of the surgeon."
icon = 'icons/obj/surgery.dmi'
icon_state = "saw"
force = 10
w_class = WEIGHT_CLASS_SMALL
throwforce = 9
throw_speed = 2
throw_range = 5
custom_materials = list(/datum/material/iron=10000, /datum/material/glass=6000)
force = 10
toolspeed = 0.5
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharpness = IS_SHARP
/obj/item/surgical_drapes
name = "surgical drapes"
@@ -277,78 +242,61 @@
/obj/item/scalpel/advanced
name = "laser scalpel"
desc = "An advanced scalpel which uses laser technology to cut. It's set to scalpel mode."
desc = "An advanced scalpel which uses laser technology to cut."
icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel_a"
hitsound = 'sound/weapons/blade1.ogg'
force = 16
toolspeed = 0.7
light_color = LIGHT_COLOR_GREEN
sharpness = IS_SHARP_ACCURATE
/obj/item/scalpel/advanced/Initialize()
. = ..()
set_light(1)
/obj/item/scalpel/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/machines/click.ogg',50,TRUE)
var/obj/item/circular_saw/advanced/saw = new /obj/item/circular_saw/advanced(drop_location())
to_chat(user, "<span class='notice'>You incease the power, now it can cut bones.</span>")
qdel(src)
user.put_in_active_hand(saw)
playsound(get_turf(user), 'sound/machines/click.ogg', 50, TRUE)
if(tool_behaviour == TOOL_SCALPEL)
tool_behaviour = TOOL_SAW
to_chat(user, "<span class='notice'>You increase the power of [src], now it can cut bones.</span>")
set_light(2)
force += 1 //we don't want to ruin sharpened stuff
icon_state = "saw_a"
else
tool_behaviour = TOOL_SCALPEL
to_chat(user, "<span class='notice'>You lower the power of [src], it can no longer cut bones.</span>")
set_light(1)
force -= 1
icon_state = "scalpel_a"
/obj/item/circular_saw/advanced
name = "laser scalpel"
desc = "An advanced scalpel which uses laser technology to cut. It's set to saw mode."
icon = 'icons/obj/surgery.dmi'
icon_state = "saw_a"
hitsound = 'sound/weapons/blade1.ogg'
force = 17
toolspeed = 0.7
sharpness = IS_SHARP_ACCURATE
light_color = LIGHT_COLOR_GREEN
/obj/item/circular_saw/advanced/Initialize()
. = ..()
set_light(2)
/obj/item/circular_saw/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/machines/click.ogg',50,TRUE)
var/obj/item/scalpel/advanced/scalpel = new /obj/item/scalpel/advanced(drop_location())
to_chat(user, "<span class='notice'>You lower the power.</span>")
qdel(src)
user.put_in_active_hand(scalpel)
/obj/item/scalpel/advanced/examine()
. += " It's set to [tool_behaviour == TOOL_SCALPEL ? "scalpel" : "saw"] mode."
/obj/item/retractor/advanced
name = "mechanical pinches"
desc = "An agglomerate of rods and gears. It resembles a retractor."
desc = "An agglomerate of rods and gears."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor_a"
toolspeed = 0.7
/obj/item/retractor/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,TRUE)
var/obj/item/hemostat/advanced/hemostat = new /obj/item/hemostat/advanced(drop_location())
to_chat(user, "<span class='notice'>You set the [src] to hemostat mode.</span>")
qdel(src)
user.put_in_active_hand(hemostat)
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, TRUE)
if(tool_behaviour == TOOL_RETRACTOR)
tool_behaviour = TOOL_HEMOSTAT
to_chat(user, "<span class='notice'>You configure the gears of [src], they are now in hemostat mode.</span>")
icon_state = "hemostat_a"
else
tool_behaviour = TOOL_RETRACTOR
to_chat(user, "<span class='notice'>You configure the gears of [src], they are now in retractor mode.</span>")
icon_state = "retractor_a"
/obj/item/hemostat/advanced
name = "mechanical pinches"
desc = "An agglomerate of rods and gears. It resembles an hemostat."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat_a"
toolspeed = 0.7
/obj/item/hemostat/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,TRUE)
var/obj/item/retractor/advanced/retractor = new /obj/item/retractor/advanced(drop_location())
to_chat(user, "<span class='notice'>You set the [src] to retractor mode.</span>")
qdel(src)
user.put_in_active_hand(retractor)
/obj/item/retractor/advanced/examine()
. += " It resembles a retractor[tool_behaviour == TOOL_RETRACTOR ? "retractor" : "hemostat"]."
/obj/item/surgicaldrill/advanced
name = "searing tool"
desc = "It projects a high power laser used for medical application. It's set to drilling mode."
desc = "It projects a high power laser used for medical application."
icon = 'icons/obj/surgery.dmi'
icon_state = "surgicaldrill_a"
hitsound = 'sound/items/welder.ogg'
@@ -360,29 +308,15 @@
set_light(1)
/obj/item/surgicaldrill/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/weapons/tap.ogg',50,TRUE)
var/obj/item/cautery/advanced/cautery = new /obj/item/cautery/advanced(drop_location())
to_chat(user, "<span class='notice'>You dilate the lenses, setting it to mending mode.</span>")
qdel(src)
user.put_in_active_hand(cautery)
playsound(get_turf(user), 'sound/weapons/tap.ogg', 50, TRUE)
if(tool_behaviour == TOOL_DRILL)
tool_behaviour = TOOL_CAUTERY
to_chat(user, "<span class='notice'>You focus the lenses of [src], it is now in mending mode.</span>")
icon_state = "cautery_a"
else
tool_behaviour = TOOL_DRILL
to_chat(user, "<span class='notice'>You dilate the lenses of [src], it is now in drilling mode.</span>")
icon_state = "surgicaldrill_a"
/obj/item/cautery/advanced
name = "searing tool"
desc = "It projects a high power laser used for medical application. It's set to mending mode."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery_a"
hitsound = 'sound/items/welder2.ogg'
force = 15
toolspeed = 0.7
light_color = LIGHT_COLOR_RED
/obj/item/cautery/advanced/Initialize()
. = ..()
set_light(1)
/obj/item/cautery/advanced/attack_self(mob/user)
playsound(get_turf(user),'sound/items/welderdeactivate.ogg',50,TRUE)
var/obj/item/surgicaldrill/advanced/surgicaldrill = new /obj/item/surgicaldrill/advanced(drop_location())
to_chat(user, "<span class='notice'>You focus the lensess, it is now set to drilling mode.</span>")
qdel(src)
user.put_in_active_hand(surgicaldrill)
/obj/item/surgicaldrill/advanced/examine()
. += " It's set to [tool_behaviour == TOOL_DRILL ? "drilling" : "mending"] mode."