Merge branch 'master' into upstream-merge-31855
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
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("r_arm", "l_arm", "l_leg", "r_leg", "head")
|
||||
requires_organic_bodypart = 0
|
||||
requires_bodypart_type = 0
|
||||
|
||||
|
||||
/datum/surgery_step/sever_limb
|
||||
@@ -22,4 +22,4 @@
|
||||
var/obj/item/bodypart/target_limb = surgery.operated_bodypart
|
||||
target_limb.drop_limb()
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
/datum/surgery/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("eyes")
|
||||
requires_organic_bodypart = 0
|
||||
|
||||
//fix eyes
|
||||
/datum/surgery_step/fix_eyes
|
||||
name = "fix eyes"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/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("eye_sight")
|
||||
if(!E)
|
||||
to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.")
|
||||
return FALSE
|
||||
|
||||
/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>")
|
||||
|
||||
/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>")
|
||||
target.cure_blind()
|
||||
target.set_blindness(0)
|
||||
target.cure_nearsighted()
|
||||
target.blur_eyes(35) //this will fix itself slowly.
|
||||
target.set_eye_damage(0)
|
||||
return TRUE
|
||||
|
||||
/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>")
|
||||
target.adjustBrainLoss(100)
|
||||
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>")
|
||||
/datum/surgery/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("eyes")
|
||||
requires_bodypart_type = 0
|
||||
|
||||
//fix eyes
|
||||
/datum/surgery_step/fix_eyes
|
||||
name = "fix eyes"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/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)
|
||||
to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.")
|
||||
return FALSE
|
||||
|
||||
/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>")
|
||||
|
||||
/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>")
|
||||
target.cure_blind()
|
||||
target.set_blindness(0)
|
||||
target.cure_nearsighted()
|
||||
target.blur_eyes(35) //this will fix itself slowly.
|
||||
target.set_eye_damage(0)
|
||||
return TRUE
|
||||
|
||||
/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>")
|
||||
target.adjustBrainLoss(100)
|
||||
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
|
||||
@@ -29,7 +29,7 @@
|
||||
if(affecting)
|
||||
if(!S.requires_bodypart)
|
||||
continue
|
||||
if(S.requires_organic_bodypart && affecting.status == BODYPART_ROBOTIC)
|
||||
if(S.requires_bodypart_type && affecting.status == BODYPART_ROBOTIC)
|
||||
continue
|
||||
if(S.requires_real_bodypart && affecting.is_pseudopart)
|
||||
continue
|
||||
@@ -56,7 +56,7 @@
|
||||
if(affecting)
|
||||
if(!S.requires_bodypart)
|
||||
return
|
||||
if(S.requires_organic_bodypart && affecting.status == BODYPART_ROBOTIC)
|
||||
if(S.requires_bodypart_type && affecting.status == BODYPART_ROBOTIC)
|
||||
return
|
||||
else if(C && S.requires_bodypart)
|
||||
return
|
||||
@@ -78,13 +78,23 @@
|
||||
user.visible_message("[user] removes the drapes from [M]'s [parse_zone(selected_zone)].", \
|
||||
"<span class='notice'>You remove the drapes from [M]'s [parse_zone(selected_zone)].</span>")
|
||||
qdel(current_surgery)
|
||||
else if(istype(user.get_inactive_held_item(), /obj/item/cautery) && current_surgery.can_cancel)
|
||||
M.surgeries -= current_surgery
|
||||
user.visible_message("[user] mends the incision and removes the drapes from [M]'s [parse_zone(selected_zone)].", \
|
||||
"<span class='notice'>You mend the incision and remove the drapes from [M]'s [parse_zone(selected_zone)].</span>")
|
||||
qdel(current_surgery)
|
||||
else if(current_surgery.can_cancel)
|
||||
to_chat(user, "<span class='warning'>You need to hold a cautery in inactive hand to stop [M]'s surgery!</span>")
|
||||
if(current_surgery.requires_bodypart_type == BODYPART_ORGANIC)
|
||||
if(istype(user.get_inactive_held_item(), /obj/item/cautery))
|
||||
M.surgeries -= current_surgery
|
||||
user.visible_message("[user] mends the incision and removes the drapes from [M]'s [parse_zone(selected_zone)].", \
|
||||
"<span class='notice'>You mend the incision and remove the drapes from [M]'s [parse_zone(selected_zone)].</span>")
|
||||
qdel(current_surgery)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to hold a cautery in inactive hand to stop [M]'s surgery!</span>")
|
||||
else if(current_surgery.requires_bodypart_type == BODYPART_ROBOTIC)
|
||||
if(istype(user.get_inactive_held_item(), /obj/item/screwdriver))
|
||||
M.surgeries -= current_surgery
|
||||
user.visible_message("[user] screw the shell and removes the drapes from [M]'s [parse_zone(selected_zone)].", \
|
||||
"<span class='notice'>You screw the shell and remove the drapes from [M]'s [parse_zone(selected_zone)].</span>")
|
||||
qdel(current_surgery)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to hold a screwdriver in inactive hand to stop [M]'s surgery!</span>")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -161,4 +171,3 @@
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
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("chest")
|
||||
requires_organic_bodypart = 0
|
||||
|
||||
|
||||
//extract implant
|
||||
@@ -43,4 +42,15 @@
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>")
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/datum/surgery/implant_removal/mechanic
|
||||
name = "implant removal"
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/mechanic_unwrench,
|
||||
/datum/surgery_step/extract_implant,
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close)
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//open shell
|
||||
/datum/surgery_step/mechanic_open
|
||||
name = "unscrew shell"
|
||||
implements = list(
|
||||
/obj/item/screwdriver = 100,
|
||||
/obj/item/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
|
||||
|
||||
/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>")
|
||||
|
||||
/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"
|
||||
implements = list(
|
||||
/obj/item/screwdriver = 100,
|
||||
/obj/item/scalpel = 75,
|
||||
/obj/item/kitchen/knife = 50,
|
||||
/obj/item = 10) // 10% success with any sharp item.
|
||||
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>")
|
||||
|
||||
/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"
|
||||
implements = list(
|
||||
/obj/item/device/multitool = 100,
|
||||
/obj/item/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)
|
||||
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>")
|
||||
|
||||
//unwrench
|
||||
/datum/surgery_step/mechanic_unwrench
|
||||
name = "unwrench bolts"
|
||||
implements = list(
|
||||
/obj/item/wrench = 100,
|
||||
/obj/item/retractor = 10)
|
||||
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>")
|
||||
|
||||
//wrench
|
||||
/datum/surgery_step/mechanic_wrench
|
||||
name = "wrench bolts"
|
||||
implements = list(
|
||||
/obj/item/wrench = 100,
|
||||
/obj/item/retractor = 10)
|
||||
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>")
|
||||
|
||||
//open hatch
|
||||
/datum/surgery_step/open_hatch
|
||||
name = "open the hatch"
|
||||
accept_hand = 1
|
||||
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>")
|
||||
@@ -1,38 +1,79 @@
|
||||
/datum/surgery/organ_manipulation
|
||||
name = "organ manipulation"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise, /datum/surgery_step/manipulate_organs)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("chest", "head")
|
||||
requires_organic_bodypart = FALSE
|
||||
requires_real_bodypart = TRUE
|
||||
requires_real_bodypart = 1
|
||||
steps = list(
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/retract_skin,
|
||||
/datum/surgery_step/saw,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
//there should be bone fixing
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/soft
|
||||
possible_locs = list("groin", "eyes", "mouth", "l_arm", "r_arm")
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise, /datum/surgery_step/manipulate_organs)
|
||||
steps = list(
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/retract_skin,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/alien
|
||||
name = "alien organ manipulation"
|
||||
possible_locs = list("chest", "head", "groin", "eyes", "mouth", "l_arm", "r_arm")
|
||||
species = list(/mob/living/carbon/alien/humanoid)
|
||||
steps = list(/datum/surgery_step/saw, /datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/manipulate_organs)
|
||||
|
||||
steps = list(
|
||||
/datum/surgery_step/saw,
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/retract_skin,
|
||||
/datum/surgery_step/saw,
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/mechanic
|
||||
name = "prosthesis organ manipulation"
|
||||
possible_locs = list("chest", "head")
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/mechanic_unwrench,
|
||||
/datum/surgery_step/prepare_electronics,
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/mechanic/soft
|
||||
possible_locs = list("groin", "eyes", "mouth", "l_arm", "r_arm")
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/prepare_electronics,
|
||||
/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/reagent_containers/food/snacks/organ = 0, /obj/item/organ_storage = 100)
|
||||
var/implements_extract = list(/obj/item/hemostat = 100, /obj/item/crowbar = 55)
|
||||
var/implements_mend = list(/obj/item/cautery = 100, /obj/item/weldingtool = 70, /obj/item/lighter = 45, /obj/item/match = 20)
|
||||
var/current_type
|
||||
var/obj/item/organ/I = null
|
||||
|
||||
/datum/surgery_step/manipulate_organs/New()
|
||||
..()
|
||||
implements = implements + implements_extract + implements_mend
|
||||
implements = implements + implements_extract
|
||||
|
||||
/datum/surgery_step/manipulate_organs/tool_check(mob/user, obj/item/tool)
|
||||
if(istype(tool, /obj/item/weldingtool))
|
||||
@@ -103,23 +144,12 @@
|
||||
else
|
||||
return -1
|
||||
|
||||
else if(implement_type in implements_mend)
|
||||
current_type = "mend"
|
||||
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>")
|
||||
|
||||
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 == "mend")
|
||||
user.visible_message("[user] mends the incision in [target]'s [parse_zone(target_zone)].",
|
||||
"<span class='notice'>You mend the incision in [target]'s [parse_zone(target_zone)].</span>")
|
||||
if(locate(/datum/surgery_step/saw) in surgery.steps)
|
||||
target.heal_bodypart_damage(45,0)
|
||||
return 1
|
||||
else if(current_type == "insert")
|
||||
if(current_type == "insert")
|
||||
if(istype(tool, /obj/item/organ_storage))
|
||||
I = tool.contents[1]
|
||||
tool.icon_state = "evidenceobj"
|
||||
|
||||
@@ -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(/obj/item/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
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
//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,
|
||||
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)
|
||||
time = 54
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
zone = "groin"
|
||||
slot = "appendix"
|
||||
slot = ORGAN_SLOT_APPENDIX
|
||||
var/inflamed = 0
|
||||
|
||||
/obj/item/organ/appendix/update_icon()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "arm-mounted implant"
|
||||
desc = "You shouldn't see this! Adminhelp and report this as an issue on github!"
|
||||
zone = "r_arm"
|
||||
slot = "r_arm_device"
|
||||
icon_state = "implant-toolkit"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
@@ -20,9 +19,18 @@
|
||||
holder = new holder(src)
|
||||
|
||||
update_icon()
|
||||
slot = zone + "_device"
|
||||
SetSlotFromZone()
|
||||
items_list = contents.Copy()
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/SetSlotFromZone()
|
||||
switch(zone)
|
||||
if("l_arm")
|
||||
slot = ORGAN_SLOT_LEFT_ARM_AUG
|
||||
if("r_arm")
|
||||
slot = ORGAN_SLOT_RIGHT_ARM_AUG
|
||||
else
|
||||
CRASH("Invalid zone for [type]")
|
||||
|
||||
/obj/item/organ/cyberimp/arm/update_icon()
|
||||
if(zone == "r_arm")
|
||||
transform = null
|
||||
@@ -40,7 +48,7 @@
|
||||
zone = "l_arm"
|
||||
else
|
||||
zone = "r_arm"
|
||||
slot = zone + "_device"
|
||||
SetSlotFromZone()
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/card/emag))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
||||
var/synthesizing = 0
|
||||
var/poison_amount = 5
|
||||
slot = "stomach"
|
||||
slot = ORGAN_SLOT_STOMACH
|
||||
origin_tech = "materials=2;powerstorage=2;biotech=2"
|
||||
|
||||
/obj/item/organ/cyberimp/chest/nutriment/on_life()
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#AD0000"
|
||||
origin_tech = "materials=5;programming=4;biotech=4"
|
||||
slot = "heartdrive"
|
||||
slot = ORGAN_SLOT_HEART_AID
|
||||
var/revive_cost = 0
|
||||
var/reviving = 0
|
||||
var/cooldown = 0
|
||||
@@ -119,8 +119,8 @@
|
||||
/obj/item/organ/cyberimp/chest/thrusters
|
||||
name = "implantable thrusters set"
|
||||
desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \
|
||||
Unlike regular jetpacks, this device has no stabilization system."
|
||||
slot = "thrusters"
|
||||
Unlike regular jetpack, this device has no stabilization system."
|
||||
slot = ORGAN_SLOT_THRUSTERS
|
||||
icon_state = "imp_jetpack"
|
||||
origin_tech = "materials=4;magnets=4;biotech=4;engineering=5"
|
||||
implant_overlay = null
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "artificial photoreceptors with specialized functionality"
|
||||
icon_state = "eye_implant"
|
||||
implant_overlay = "eye_implant_overlay"
|
||||
slot = "eye_sight"
|
||||
slot = ORGAN_SLOT_EYES
|
||||
zone = "eyes"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/organ/cyberimp/eyes/hud
|
||||
name = "HUD implant"
|
||||
desc = "These cybernetic eyes will display a HUD over everything you see. Maybe."
|
||||
slot = "eye_hud"
|
||||
slot = ORGAN_SLOT_HUD
|
||||
var/HUD_type = 0
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/hud/Insert(var/mob/living/carbon/M, var/special = 0, drop_if_replaced = FALSE)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/active = 0
|
||||
var/list/stored_items = list()
|
||||
implant_color = "#DE7E00"
|
||||
slot = "brain_antidrop"
|
||||
slot = ORGAN_SLOT_BRAIN_ANTIDROP
|
||||
origin_tech = "materials=4;programming=5;biotech=4"
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
name = "CNS Rebooter implant"
|
||||
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned."
|
||||
implant_color = "#FFFF00"
|
||||
slot = "brain_antistun"
|
||||
slot = ORGAN_SLOT_BRAIN_ANTISTUN
|
||||
origin_tech = "materials=5;programming=4;biotech=5"
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_stun/on_life()
|
||||
@@ -133,7 +133,7 @@
|
||||
name = "breathing tube implant"
|
||||
desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked."
|
||||
icon_state = "implant_mask"
|
||||
slot = "breathing_tube"
|
||||
slot = ORGAN_SLOT_BREATHING_TUBE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "ears"
|
||||
desc = "There are three parts to the ear. Inner, middle and outer. Only one of these parts should be normally visible."
|
||||
zone = "head"
|
||||
slot = "ears"
|
||||
slot = ORGAN_SLOT_EARS
|
||||
gender = PLURAL
|
||||
|
||||
// `deaf` measures "ticks" of deafness. While > 0, the person is unable
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "eyeballs"
|
||||
desc = "I see you!"
|
||||
zone = "eyes"
|
||||
slot = "eye_sight"
|
||||
slot = ORGAN_SLOT_EYES
|
||||
gender = PLURAL
|
||||
|
||||
var/sight_flags = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "I feel bad for the heartless bastard who lost this."
|
||||
icon_state = "heart-on"
|
||||
zone = "chest"
|
||||
slot = "heart"
|
||||
slot = ORGAN_SLOT_HEART
|
||||
origin_tech = "biotech=5"
|
||||
// Heart attack code is in code/modules/mob/living/carbon/human/life.dm
|
||||
var/beating = 1
|
||||
@@ -63,10 +63,9 @@
|
||||
H.stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
beat = BEAT_NONE
|
||||
|
||||
if(H.jitteriness)
|
||||
if(!beat || beat == BEAT_SLOW)
|
||||
H.playsound_local(get_turf(H),fastbeat,40,0, channel = CHANNEL_HEARTBEAT)
|
||||
beat = BEAT_FAST
|
||||
if(H.jitteriness && H.health > HEALTH_THRESHOLD_FULLCRIT && (!beat || beat == BEAT_SLOW))
|
||||
H.playsound_local(get_turf(H),fastbeat,40,0, channel = CHANNEL_HEARTBEAT)
|
||||
beat = BEAT_FAST
|
||||
|
||||
/obj/item/organ/heart/cursed
|
||||
name = "cursed heart"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
origin_tech = "biotech=3"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
zone = "chest"
|
||||
slot = "liver"
|
||||
slot = ORGAN_SLOT_LIVER
|
||||
desc = "Pairing suggestion: chianti and fava beans."
|
||||
var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure
|
||||
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
zone = "chest"
|
||||
slot = "lungs"
|
||||
slot = ORGAN_SLOT_LUNGS
|
||||
gender = PLURAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
|
||||
var/list/breath_gases = breath.gases
|
||||
|
||||
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen)
|
||||
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/brown_gas, /datum/gas/pluoxium, /datum/gas/stimulum)
|
||||
|
||||
//Partial pressures in our breath
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])
|
||||
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES]))
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES])
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES])
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES])
|
||||
@@ -252,9 +252,40 @@
|
||||
H.adjustBrainLoss(3)
|
||||
else if(bz_pp > 0.01)
|
||||
H.hallucination += 5//Removed at 2 per tick so this will slowly build up
|
||||
|
||||
|
||||
// Tritium
|
||||
var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES])
|
||||
if (trit_pp > 50)
|
||||
H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up.
|
||||
else
|
||||
H.radiation += trit_pp/10
|
||||
|
||||
//Brown Gas
|
||||
var/brown_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/brown_gas][MOLES])
|
||||
if (prob(brown_pp))
|
||||
to_chat(H, "<span class='alert'>Your mouth feels like it's burning!</span>")
|
||||
if (brown_pp >40)
|
||||
H.emote("gasp")
|
||||
H.adjustFireLoss(10)
|
||||
if (prob(brown_pp/2))
|
||||
to_chat(H, "<span class='alert'>Your throat closes up!</span>")
|
||||
H.silent = max(H.silent, 3)
|
||||
else
|
||||
H.adjustFireLoss(brown_pp/4)
|
||||
gas_breathed = breath_gases[/datum/gas/brown_gas][MOLES]
|
||||
if (gas_breathed > GAS_STIM_MINIMUM)
|
||||
H.reagents.add_reagent("brown_gas",1)
|
||||
|
||||
breath_gases[/datum/gas/brown_gas][MOLES]-=gas_breathed
|
||||
gas_breathed = 0
|
||||
//Stimulum
|
||||
gas_breathed = breath_gases[/datum/gas/stimulum][MOLES]
|
||||
if (gas_breathed > GAS_STIM_MINIMUM)
|
||||
H.reagents.add_reagent("stimulum",1)
|
||||
breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed
|
||||
handle_breath_temperature(breath, H)
|
||||
breath.garbage_collect()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(replaced)
|
||||
replaced.Remove(M, special = 1)
|
||||
if(drop_if_replaced)
|
||||
replaced.forceMove(get_turf(src))
|
||||
replaced.forceMove(get_turf(M))
|
||||
else
|
||||
qdel(replaced)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var/has_liver = (!(NOLIVER in dna.species.species_traits))
|
||||
var/has_stomach = (!(NOSTOMACH in dna.species.species_traits))
|
||||
|
||||
if(has_liver && !getorganslot("liver"))
|
||||
if(has_liver && !getorganslot(ORGAN_SLOT_LIVER))
|
||||
var/obj/item/organ/liver/LI
|
||||
|
||||
if(dna.species.mutantliver)
|
||||
@@ -127,7 +127,7 @@
|
||||
LI = new()
|
||||
LI.Insert(src)
|
||||
|
||||
if(has_stomach && !getorganslot("stomach"))
|
||||
if(has_stomach && !getorganslot(ORGAN_SLOT_STOMACH))
|
||||
var/obj/item/organ/stomach/S
|
||||
|
||||
if(dna.species.mutantstomach)
|
||||
@@ -136,15 +136,15 @@
|
||||
S = new()
|
||||
S.Insert(src)
|
||||
|
||||
if(breathes && !getorganslot("lungs"))
|
||||
if(breathes && !getorganslot(ORGAN_SLOT_LUNGS))
|
||||
var/obj/item/organ/lungs/L = new()
|
||||
L.Insert(src)
|
||||
|
||||
if(blooded && !getorganslot("heart"))
|
||||
if(blooded && !getorganslot(ORGAN_SLOT_HEART))
|
||||
var/obj/item/organ/heart/H = new()
|
||||
H.Insert(src)
|
||||
|
||||
if(!getorganslot("tongue"))
|
||||
if(!getorganslot(ORGAN_SLOT_TONGUE))
|
||||
var/obj/item/organ/tongue/T
|
||||
|
||||
if(dna && dna.species && dna.species.mutanttongue)
|
||||
@@ -155,7 +155,7 @@
|
||||
// if they have no mutant tongues, give them a regular one
|
||||
T.Insert(src)
|
||||
|
||||
if(!getorganslot("eye_sight"))
|
||||
if(!getorganslot(ORGAN_SLOT_EYES))
|
||||
var/obj/item/organ/eyes/E
|
||||
|
||||
if(dna && dna.species && dna.species.mutanteyes)
|
||||
@@ -165,7 +165,7 @@
|
||||
E = new()
|
||||
E.Insert(src)
|
||||
|
||||
if(!getorganslot("ears"))
|
||||
if(!getorganslot(ORGAN_SLOT_EARS))
|
||||
var/obj/item/organ/ears/ears
|
||||
if(dna && dna.species && dna.species.mutantears)
|
||||
ears = new dna.species.mutantears
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
origin_tech = "biotech=4"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
zone = "chest"
|
||||
slot = "stomach"
|
||||
slot = ORGAN_SLOT_STOMACH
|
||||
attack_verb = list("gored", "squished", "slapped", "digested")
|
||||
desc = "Onaka ga suite imasu."
|
||||
var/disgust_metabolism = 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "tail"
|
||||
desc = "What did you cut this off of?"
|
||||
zone = "groin"
|
||||
slot = "tail"
|
||||
slot = ORGAN_SLOT_TAIL
|
||||
|
||||
/obj/item/organ/tail/cat
|
||||
name = "cat tail"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A fleshy muscle mostly used for lying."
|
||||
icon_state = "tonguenormal"
|
||||
zone = "mouth"
|
||||
slot = "tongue"
|
||||
slot = ORGAN_SLOT_TONGUE
|
||||
attack_verb = list("licked", "slobbered", "slapped", "frenched", "tongued")
|
||||
var/list/languages_possible
|
||||
var/say_mod = null
|
||||
@@ -83,7 +83,7 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
var/obj/item/organ/tongue/T = H.getorganslot("tongue")
|
||||
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T || T.type != type)
|
||||
continue
|
||||
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name = "vocal cords"
|
||||
icon_state = "appendix"
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
slot = ORGAN_SLOT_VOICE
|
||||
gender = PLURAL
|
||||
var/list/spans = null
|
||||
|
||||
@@ -24,15 +24,13 @@
|
||||
name = "adamantine resonator"
|
||||
desc = "Fragments of adamantine exist in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders."
|
||||
zone = "head"
|
||||
slot = "adamantine_resonator"
|
||||
slot = ORGAN_SLOT_ADAMANTINE_RESONATOR
|
||||
icon_state = "adamantine_resonator"
|
||||
|
||||
/obj/item/organ/vocal_cords/adamantine
|
||||
name = "adamantine vocal cords"
|
||||
desc = "When adamantine resonates, it causes all nearby pieces of adamantine to resonate as well. Adamantine golems use this to broadcast messages to nearby golems."
|
||||
actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords)
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
icon_state = "adamantine_cords"
|
||||
|
||||
/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger()
|
||||
@@ -48,7 +46,7 @@
|
||||
for(var/m in GLOB.player_list)
|
||||
if(iscarbon(m))
|
||||
var/mob/living/carbon/C = m
|
||||
if(C.getorganslot("adamantine_resonator"))
|
||||
if(C.getorganslot(ORGAN_SLOT_ADAMANTINE_RESONATOR))
|
||||
to_chat(C, msg)
|
||||
if(isobserver(m))
|
||||
var/link = FOLLOW_LINK(m, owner)
|
||||
@@ -59,8 +57,6 @@
|
||||
name = "divine vocal cords"
|
||||
desc = "They carry the voice of an ancient god."
|
||||
icon_state = "voice_of_god"
|
||||
zone = "mouth"
|
||||
slot = "vocal_cords"
|
||||
actions_types = list(/datum/action/item_action/organ_action/colossus)
|
||||
var/next_command = 0
|
||||
var/cooldown_mod = 1
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("r_arm", "l_arm", "l_leg", "r_leg", "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))
|
||||
@@ -84,4 +85,3 @@
|
||||
var/obj/item/melee/arm_blade/new_arm = new(target,TRUE,TRUE)
|
||||
target_zone == "r_arm" ? target.put_in_r_hand(new_arm) : target.put_in_l_hand(new_arm)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/can_cancel = 1 //Can cancel this surgery after step 1 with cautery
|
||||
var/list/species = list(/mob/living/carbon/human) //Acceptable Species
|
||||
var/location = "chest" //Surgery location
|
||||
var/requires_organic_bodypart = 1 //Prevents you from performing an operation on robotic limbs
|
||||
var/requires_bodypart_type = BODYPART_ORGANIC //Prevents you from performing an operation on robotic limbs
|
||||
var/list/possible_locs = list() //Multiple locations
|
||||
var/ignore_clothes = 0 //This surgery ignores clothes
|
||||
var/mob/living/carbon/target //Operation target mob
|
||||
@@ -53,6 +53,13 @@
|
||||
var/step_type = steps[status]
|
||||
return new step_type
|
||||
|
||||
/datum/surgery/proc/get_surgery_next_step()
|
||||
if(status < steps.len)
|
||||
var/step_type = steps[status + 1]
|
||||
return new step_type
|
||||
else
|
||||
return null
|
||||
|
||||
/datum/surgery/proc/complete()
|
||||
SSblackbox.add_details("surgeries_completed", "[type]")
|
||||
qdel(src)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
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/time = 10 //how long does the step take?
|
||||
var/repeatable = 0
|
||||
|
||||
|
||||
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
@@ -31,8 +32,19 @@
|
||||
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.
|
||||
|
||||
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
|
||||
else
|
||||
surgery.status--
|
||||
|
||||
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -63,7 +75,7 @@
|
||||
if(failure(user, target, target_zone, tool, surgery))
|
||||
advance = 1
|
||||
|
||||
if(advance)
|
||||
if(advance && !repeatable)
|
||||
surgery.status++
|
||||
if(surgery.status > surgery.steps.len)
|
||||
surgery.complete()
|
||||
|
||||
Reference in New Issue
Block a user