Merge pull request #13644 from DeltaFire15/hybrid-limbs-wound-stuff
[READY] Hybrid bodyparts - wound surgery edition
This commit is contained in:
@@ -91,8 +91,6 @@
|
||||
var/wound_flags = (FLESH_WOUND | BONE_WOUND | ACCEPTS_GAUZE)
|
||||
|
||||
/datum/wound/Destroy()
|
||||
if(attached_surgery)
|
||||
QDEL_NULL(attached_surgery)
|
||||
if(limb?.wounds && (src in limb.wounds)) // destroy can call remove_wound() and remove_wound() calls qdel, so we check to make sure there's anything to remove first
|
||||
remove_wound()
|
||||
limb = null
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
item_flags = SURGICAL_TOOL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_flags = SURGICAL_TOOL
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_flags = SURGICAL_TOOL
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_flags = SURGICAL_TOOL
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_flags = SURGICAL_TOOL
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
item_flags = SURGICAL_TOOL
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(user.zone_selected)
|
||||
return(targeted_bodypart.get_wound_type(targetable_wound))
|
||||
|
||||
/datum/surgery/repair_bone_hairline/biomech
|
||||
requires_bodypart_type = BODYPART_HYBRID
|
||||
steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/repair_bone_hairline, /datum/surgery_step/mechanic_close)
|
||||
|
||||
///// Repair Compound Fracture (Critical)
|
||||
/datum/surgery/repair_bone_compound
|
||||
@@ -25,6 +28,10 @@
|
||||
requires_real_bodypart = TRUE
|
||||
targetable_wound = /datum/wound/blunt/critical
|
||||
|
||||
/datum/surgery/repair_bone_compound/biomech
|
||||
requires_bodypart_type = BODYPART_HYBRID
|
||||
steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/open_hatch, /datum/surgery_step/pry_off_plating, /datum/surgery_step/reset_compound_fracture, /datum/surgery_step/repair_bone_compound, /datum/surgery_step/add_plating, /datum/surgery_step/mechanic_close)
|
||||
|
||||
/datum/surgery/repair_bone_compound/can_start(mob/living/user, mob/living/carbon/target)
|
||||
if(..())
|
||||
var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(user.zone_selected)
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
var/datum/wound/burn/burn_wound = targeted_bodypart.get_wound_type(targetable_wound)
|
||||
return(burn_wound && burn_wound.infestation > 0)
|
||||
|
||||
/datum/surgery/debride/biomech
|
||||
name = "Debride infected synthetic flesh"
|
||||
requires_bodypart_type = BODYPART_HYBRID
|
||||
|
||||
//SURGERY STEPS
|
||||
|
||||
///// Debride
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"[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)
|
||||
/datum/surgery_step/mechanic_open/tool_check(mob/user, obj/item/tool)
|
||||
if(implement_type == /obj/item && !tool.get_sharpness())
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -38,7 +38,7 @@
|
||||
return TRUE
|
||||
//prepare electronics
|
||||
/datum/surgery_step/prepare_electronics
|
||||
name = "prepare electronics"
|
||||
name = "prepare electronics (multitool)"
|
||||
implements = list(
|
||||
TOOL_MULTITOOL = 100,
|
||||
TOOL_HEMOSTAT = 10) // try to reboot internal controllers via short circuit with some conductor
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
//open hatch
|
||||
/datum/surgery_step/open_hatch
|
||||
name = "open the hatch"
|
||||
name = "open the hatch (empty hand)"
|
||||
accept_hand = 1
|
||||
time = 10
|
||||
|
||||
|
||||
@@ -144,4 +144,4 @@
|
||||
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
|
||||
return 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/////BURN FIXING SURGERIES//////
|
||||
/////PUNCTURE FIXING SURGERIES//////
|
||||
|
||||
//the step numbers of each of these two, we only currently use the first to switch back and forth due to advancing after finishing steps anyway
|
||||
#define REALIGN_INNARDS 1
|
||||
@@ -14,6 +14,10 @@
|
||||
requires_real_bodypart = TRUE
|
||||
targetable_wound = /datum/wound/pierce
|
||||
|
||||
/datum/surgery/repair_puncture/biomech
|
||||
requires_bodypart_type = BODYPART_HYBRID
|
||||
steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/repair_innards, /datum/surgery_step/seal_veins, /datum/surgery_step/mechanic_close)
|
||||
|
||||
/datum/surgery/repair_puncture/can_start(mob/living/user, mob/living/carbon/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -81,8 +81,12 @@
|
||||
surgery.status++
|
||||
if(surgery.status > surgery.steps.len)
|
||||
surgery.complete()
|
||||
surgery.step_in_progress = FALSE
|
||||
return advance
|
||||
surgery.step_in_progress = FALSE
|
||||
return advance
|
||||
else
|
||||
surgery.step_in_progress = FALSE
|
||||
return TRUE //Stop the attack chain!
|
||||
|
||||
|
||||
/datum/surgery_step/proc/preop(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You begin to perform surgery on [target]...</span>",
|
||||
|
||||
Reference in New Issue
Block a user