diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index af5c62e188f..35e50ff8b77 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -46,7 +46,8 @@
/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life()
..()
- if(owner.eye_blind || owner.eye_blurry || (owner.disabilities & BLIND) || (owner.disabilities & NEARSIGHTED))
+ var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes)
+ if(owner.eye_blind || owner.eye_blurry || (owner.disabilities & BLIND) || (owner.disabilities & NEARSIGHTED) || (E.damage > 0))
owner.reagents.add_reagent("oculine", 1)
/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat()
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 70960fda86d..86fc5a7efd3 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -259,8 +259,8 @@
else if(!client)
msg += "[t_He] [t_has] suddenly fallen asleep.\n"
- if(!src.get_int_organ(/obj/item/organ/internal/brain))
- msg += "It appears that their brain is missing...\n"
+ if(!src.get_int_organ(/obj/item/organ/internal/brain) && !species.name == "Diona")
+ msg += "It appears that [t_his] brain is missing...\n"
var/list/wound_flavor_text = list()
var/list/is_destroyed = list()
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index c79eb3309f5..79b5908ae8a 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -135,9 +135,6 @@
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
- if(!ticker) return //FUCKING MONKIES!
-
-
for(var/obj/item/organ/organ in H.contents)
if((organ in H.organs))
qdel(organ)
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index e1c05cc7210..8102635157e 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -248,7 +248,7 @@ var/global/list/damage_icon_parts = list()
qdel(stand_icon)
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
var/icon_key = ""
- var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
+ var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
if(eyes)
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm
index d29b0b0dc9c..fb329a5deab 100644
--- a/code/modules/surgery/generic.dm
+++ b/code/modules/surgery/generic.dm
@@ -321,7 +321,7 @@
user.visible_message("\blue [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \
"\blue You amputate [target]'s [affected.name] with \the [tool].")
- add_logs(target,user, "surgically removed [affected.name] from", addition="INTENT: [uppertext(user.a_intent)]")
+ add_logs(user,target, "surgically removed [affected.name] from", addition="INTENT: [uppertext(user.a_intent)]")
affected.droplimb(1,DROPLIMB_EDGE)
return 1
diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm
index 53eab87bd96..916bc985f06 100644
--- a/code/modules/surgery/helpers.dm
+++ b/code/modules/surgery/helpers.dm
@@ -1,5 +1,4 @@
/proc/attempt_initiate_surgery(obj/item/I, mob/living/M, mob/user, var/override )
- world << "[istype(M)]"
if(istype(M))
var/mob/living/carbon/human/H
var/obj/item/organ/external/affecting
@@ -28,7 +27,7 @@
if(!S.can_start(user, M))
continue
- for(var/path in S.allowed_species)
+ for(var/path in S.allowed_mob)
if(istype(M, path))
available_surgeries[S.name] = S
break
diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm
index b7f98c0cbb6..754d4134ac4 100644
--- a/code/modules/surgery/implant.dm
+++ b/code/modules/surgery/implant.dm
@@ -7,9 +7,16 @@
/datum/surgery/cavity_implant
name = "cavity implant"
- steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/generic/cauterize/)
+ steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,
+ /datum/surgery_step/open_encased/retract, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/open_encased/close,/datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
- possible_locs = list("chest","head","groin")
+ possible_locs = list("chest","head")
+
+/datum/surgery/cavity_implant/soft
+ name = "cavity implant"
+ steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/generic/cauterize)
+
+ possible_locs = list("groin")
/datum/surgery_step/cavity
priority = 1
diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm
index 41098580c48..3ea7fc49acd 100644
--- a/code/modules/surgery/limb_reattach.dm
+++ b/code/modules/surgery/limb_reattach.dm
@@ -13,9 +13,9 @@
if(ishuman(target))
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
- if(affected.cannot_amputate)
+ if(!affected)
return 0
- if(affected.status && ORGAN_DESTROYED)
+ if(affected && (affected.status && ORGAN_DESTROYED))
return 0
return 1
@@ -31,12 +31,13 @@
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
- if(affected.status && ORGAN_DESTROYED)
+ if(!affected)
+ return 1
+ if(affected && (affected.status && ORGAN_DESTROYED))
return 1
return 0
-cannot_amputate
/datum/surgery/robo_attach
name = "robotic limb attachment"
steps = list(/datum/surgery_step/limb/mechanize)
@@ -47,7 +48,10 @@ cannot_amputate
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
- if(affected.status && ORGAN_DESTROYED)
+
+ if(!affected)
+ return 1
+ if(affected && (affected.status && ORGAN_DESTROYED))
return 1
return 0
@@ -85,12 +89,14 @@ cannot_amputate
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
+ return 1
/datum/surgery_step/limb/attach/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("[user]'s hand slips, damaging [target]'s [E.amputation_point]!", \
"Your hand slips, damaging [target]'s [E.amputation_point]!")
target.apply_damage(10, BRUTE, null, sharp=1)
+ return 0
/datum/surgery_step/limb/connect
allowed_tools = list(
@@ -123,12 +129,14 @@ cannot_amputate
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
+ return 1
/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("[user]'s hand slips, damaging [target]'s [E.amputation_point]!", \
"Your hand slips, damaging [target]'s [E.amputation_point]!")
target.apply_damage(10, BRUTE, null, sharp=1)
+ return 0
/datum/surgery_step/limb/mechanize
allowed_tools = list(/obj/item/robot_parts = 100)
@@ -136,7 +144,7 @@ cannot_amputate
min_duration = 80
max_duration = 100
-/datum/surgery_step/limb/connect/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/datum/surgery_step/limb/mechanize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
@@ -144,11 +152,11 @@ cannot_amputate
return 0
return isnull(target.get_organ(target_zone))
-/datum/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/datum/surgery_step/limb/mechanize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching \the [tool] to [target].", \
"You start attaching \the [tool] to [target].")
-/datum/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/datum/surgery_step/limb/mechanize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
user.visible_message("[user] has attached \the [tool] to [target].", \
"You have attached \the [tool] to [target].")
@@ -172,7 +180,10 @@ cannot_amputate
qdel(tool)
-/datum/surgery_step/limb/connect/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return 1
+
+/datum/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user]'s hand slips, damaging [target]'s flesh!", \
"Your hand slips, damaging [target]'s flesh!")
target.apply_damage(10, BRUTE, null, sharp=1)
+ return 0
diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm
index b358e1f8b25..8a32ed9baf5 100644
--- a/code/modules/surgery/organs/augments_eyes.dm
+++ b/code/modules/surgery/organs/augments_eyes.dm
@@ -74,7 +74,7 @@
/obj/item/organ/internal/cyberimp/eyes/xray
name = "X-ray implant"
desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile."
- eye_colour = rgb(0, 0, 0)
+ eye_colour = list(0, 0, 0)
implant_color = "#000000"
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
@@ -82,7 +82,7 @@
/obj/item/organ/internal/cyberimp/eyes/thermals
name = "Thermals implant"
desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included."
- eye_colour = rgb(255, 204, 0)
+ eye_colour = list(255, 204, 0)
implant_color = "#FFCC00"
vision_flags = SEE_MOBS
flash_protect = -1
@@ -113,7 +113,7 @@
/obj/item/organ/internal/cyberimp/eyes/hud/medical
name = "Medical HUD implant"
desc = "These cybernetic eye implants will display a medical HUD over everything you see."
- eye_colour = rgb(15,15,0)
+ eye_colour = list(15,15,0)
implant_color = "#00FFFF"
origin_tech = "materials=4;programming=3;biotech=4"
aug_message = "You suddenly see health bars floating above people's heads..."
@@ -122,7 +122,7 @@
/obj/item/organ/internal/cyberimp/eyes/hud/security
name = "Security HUD implant"
desc = "These cybernetic eye implants will display a security HUD over everything you see."
- eye_colour = rgb(208,0,0)
+ eye_colour = list(208,0,0)
implant_color = "#CC0000"
origin_tech = "materials=4;programming=4;biotech=3;combat=1"
aug_message = "Job indicator icons pop up in your vision. That is not a certified surgeon..."
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 40d76176d4f..7f5c0e2b152 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -132,6 +132,8 @@
//Insert something neat here.
///obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = 0)
+// owner.losebreath += 10
+ //insert oxy damage extream here.
// ..()
@@ -140,7 +142,6 @@
if(!owner)
return
-
if (germ_level > INFECTION_LEVEL_ONE)
if(prob(5))
owner.emote("cough") //respitory tract infection
@@ -320,8 +321,7 @@
/obj/item/organ/internal/shadowtumor/process()
if(isturf(loc))
var/turf/T = loc
- var/light_count = T.get_lumcount()
- world << "[light_count]"
+ var/light_count = T.get_lumcount()*10
if(light_count > 4 && health > 0) //Die in the light
health--
else if(light_count < 2 && health < 3) //Heal in the dark
@@ -341,6 +341,7 @@
parent_organ = "head"
slot = "brain_tumor"
health = 3
+ var/lasthonk = 0
/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = 0)
@@ -351,4 +352,33 @@
/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0)
M.mutations.Remove(CLUMSY)
M.mutations.Remove(COMICBLOCK)
- //genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
\ No newline at end of file
+ //genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
+
+/obj/item/organ/internal/honktumor/process()
+
+ if(!owner)
+ return
+
+ if(lasthonk > world.time + 60|| lasthonk == 0)
+ lasthonk = world.time
+ owner << "HONK"
+ owner.sleeping = 0
+ owner.stuttering = 20
+ owner.ear_deaf = 30
+ owner.Weaken(3)
+ owner << 'sound/items/AirHorn.ogg'
+ if(prob(30))
+ owner.Stun(10)
+ owner.Paralyse(4)
+ else
+ owner.Jitter(500)
+
+ if(istype(owner, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = owner
+ if(isobj(H.shoes))
+ var/thingy = H.shoes
+ H.unEquip(H.shoes)
+ walk_away(thingy,H,15,2)
+ spawn(20)
+ if(thingy)
+ walk(thingy,0)
diff --git a/code/modules/surgery/organs/subtypes/xenos.dm b/code/modules/surgery/organs/subtypes/xenos.dm
index 4cbad16a7f3..985d2b9d533 100644
--- a/code/modules/surgery/organs/subtypes/xenos.dm
+++ b/code/modules/surgery/organs/subtypes/xenos.dm
@@ -16,11 +16,11 @@
/obj/item/organ/internal/xenos/insert(mob/living/carbon/M, special = 0)
..()
for(var/mob/living/carbon/alien/humanoid/verb/P in alien_powers)
- verbs += P
+ M.verbs += P //at least until xeno powers are vamped to TG
/obj/item/organ/internal/xenos/remove(mob/living/carbon/M, special = 0)
for(var/mob/living/carbon/alien/humanoid/verb/P in alien_powers)
- verbs -= P
+ M.verbs -= P
..()
@@ -144,8 +144,8 @@
/obj/item/organ/internal/xenos/resinspinner
name = "xeno resin organ"//...there tiger....
- parent_organ = "head"
- icon_state = "stomach-x"
+ parent_organ = "mouth"
+ icon_state = "liver-x"
slot = "resinspinner"
origin_tech = "biotech=5;materials=4"
alien_powers = list(/mob/living/carbon/alien/humanoid/proc/resin)
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 8a4c79b5f40..939e10e7bf8 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -1,25 +1,27 @@
/datum/surgery/organ_manipulation
name = "organ manipulation"
steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,
- /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone)
- possible_locs = list("chest")
+ /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
+ possible_locs = list("chest","head")
requires_organic_bodypart = 0
-
-/datum/surgery/organ_manipulation/head //for adding a mendskull step...
- name = "organ manipulation"
- steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,
- /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone, /datum/surgery_step/mend_skull ,/datum/surgery_step/finish_bone)
- possible_locs = list("head")
+ disallowed_mob = (/mob/living/carbon/human/machine)
/datum/surgery/organ_manipulation/soft
possible_locs = list("groin", "eyes", "mouth")
- steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs)
+ steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize)
+
+/datum/surgery/organ_manipulation/boneless
+ possible_locs = list("chest","head","groin", "eyes", "mouth")
+ steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize)
+ allowed_mob = list(/mob/living/carbon/human/diona,/mob/living/carbon/human/slime)
+ disallowed_mob = list(/mob/living/carbon/human)
/datum/surgery/organ_manipulation/alien
name = "alien organ manipulation"
possible_locs = list("chest", "head", "groin", "eyes", "mouth")
- allowed_species = list(/mob/living/carbon/alien/humanoid)
- steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/internal/manipulate_organs)
+ allowed_mob = list(/mob/living/carbon/alien/humanoid)
+ disallowed_mob = list(/mob/living/carbon/human)
+ steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize)
@@ -94,9 +96,10 @@
//////////////////////////////////////////////////////////////////
// ALIEN EMBRYO SURGERY //
//////////////////////////////////////////////////////////////////
-/datum/surgery/remove_xeno_baby
- steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,/datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/remove_embryo)
- possible_locs = list("chest")
+///datum/surgery/remove_xeno_baby
+// steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,/datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/remove_embryo)
+// possible_locs = list("chest")
+// disallowed_mob = (/mob/living/carbon/human/machine)
/datum/surgery_step/internal/remove_embryo//might can just do this in organ mainpulation..but this is TARGETED for..
@@ -165,8 +168,9 @@
allowed_tools = list(/obj/item/organ/internal = 100, /obj/item/weapon/reagent_containers/food/snacks/organ = 0)
var/implements_extract = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/crowbar = 55)
- var/implements_mend = list(/obj/item/stack/medical/advanced/bruise_pack = 100,/obj/item/stack/nanopaste = 100,/obj/item/stack/medical/bruise_pack = 20
- )
+ var/implements_mend = list(/obj/item/stack/medical/advanced/bruise_pack = 100,/obj/item/stack/nanopaste = 100,/obj/item/stack/medical/bruise_pack = 20)
+ //Finish is just so you can close up after you do other things.
+ var/implements_finsh = list(/obj/item/weapon/retractor = 100 ,/obj/item/weapon/crowbar = 75)
var/current_type
var/obj/item/organ/internal/I = null
var/obj/item/organ/external/affected = null
@@ -175,7 +179,7 @@
/datum/surgery_step/internal/manipulate_organs/New()
..()
- allowed_tools = allowed_tools + implements_extract + implements_mend
+ allowed_tools = allowed_tools + implements_extract + implements_mend + implements_finsh
@@ -184,8 +188,6 @@
I = null
affected = target.get_organ(target_zone)
- world << "[implement_type]"
- world << "[is_int_organ(implement_type)]"
if(is_int_organ(tool))
current_type = "insert"
I = tool
@@ -205,6 +207,19 @@
"You start transplanting \the [tool] into [target]'s [affected.name].")
target.custom_pain("Someone's rooting around in your [affected.name]!",1)
+ else if(implement_type in implements_finsh)
+ //same as surgery step /datum/surgery_step/open_encased/close/
+ current_type = "finish"
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ if(affected == "head" || affected == "upper body")
+ var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]."
+ var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+ else
+ var/msg = "[user] starts pulling [target]'s skin back into place with \the [tool]."
+ var/self_msg = "You start pulling [target]'s skin back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+ target.custom_pain("Something hurts horribly in your [affected.name]!",1)
else if(implement_type in implements_extract)
current_type = "extract"
var/list/organs = target.get_organs_zone(target_zone)
@@ -253,7 +268,7 @@
"You start treating damage to [target]'s [I.name] with [tool_name]." )
user << "No organs appear to be damaged."
- return
+ return -1
target.custom_pain("The pain in your [affected.name] is living hell!",1)
else if(istype(tool, /obj/item/weapon/reagent_containers/food/snacks/organ))
@@ -283,7 +298,7 @@
user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \
"\blue You treat damage to [target]'s [I.name] with [tool_name]." )
I.damage = 0
- return 1
+ //return 1
else if(current_type == "insert")
I = tool
user.drop_item()
@@ -307,8 +322,26 @@
else
user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"You can't extract anything from [target]'s [parse_zone(target_zone)]!")
+ else if(current_type == "finish")
+
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ if(target_zone == "head" || target_zone == "upper body")
+ var/msg = "\blue [user] bends [target]'s [affected.encased] back into place with \the [tool]."
+ var/self_msg = "\blue You bend [target]'s [affected.encased] back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+ affected.open = 2.5
+ else
+ var/msg = "[user] pulls [target]'s skin back into place with \the [tool]."
+ var/self_msg = "You pull [target]'s skin back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+
+ return 1
+
+
return 0
+//todo set up fail steps
+
//////////////////////////////////////////////////////////////////
// CHEST INTERNAL ORGAN SURGERY //
diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm
index 37de91743e2..6df377b56d1 100644
--- a/code/modules/surgery/robotics.dm
+++ b/code/modules/surgery/robotics.dm
@@ -8,16 +8,16 @@
steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/external/repair_brute,/datum/surgery_step/robotics/external/repair_burn,/datum/surgery_step/robotics/external/close_hatch)
possible_locs = list("chest","head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin")
requires_organic_bodypart = 0
- allowed_species = list(/mob/living/carbon/human/machine)
- disallowed_species = list(/mob/living/carbon/human)
+ allowed_mob = list(/mob/living/carbon/human/machine)
+ disallowed_mob = list(/mob/living/carbon/human)
/datum/surgery/cybernetic_repair/internal
name = "Internal Cybernetic Mainpulation"
steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/manipulate_robotic_organs)
possible_locs = list("chest","head","groin")
requires_organic_bodypart = 0
- allowed_species = list(/mob/living/carbon/human/machine)
- disallowed_species = list(/mob/living/carbon/human)
+ allowed_mob = list(/mob/living/carbon/human/machine)
+ disallowed_mob = list(/mob/living/carbon/human)
//to do, moar surgerys or condense down ala mainpulate organs.
@@ -58,27 +58,29 @@
min_duration = 90
max_duration = 110
- can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- if(..())
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- return affected && affected.open == 0 && target_zone != "mouth"
-
- begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+/datum/surgery_step/robotics/external/unscrew_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
- "You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
- ..()
+ return affected && affected.open == 0 && target_zone != "mouth"
- end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
- "\blue You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",)
- affected.open = 1
+/datum/surgery_step/robotics/external/unscrew_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
+ "You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
+ ..()
- fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \
- "\red Your [tool] slips, failing to unscrew [target]'s [affected.name].")
+/datum/surgery_step/robotics/external/unscrew_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\blue [user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
+ "\blue You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",)
+ affected.open = 1
+ return 1
+
+/datum/surgery_step/robotics/external/unscrew_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \
+ "\red Your [tool] slips, failing to unscrew [target]'s [affected.name].")
+ return 0
/datum/surgery_step/robotics/external/open_hatch
allowed_tools = list(
@@ -90,27 +92,29 @@
min_duration = 30
max_duration = 40
- can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- if(..())
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- return affected && affected.open == 1
-
- begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+/datum/surgery_step/robotics/external/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
- "You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
- ..()
+ return affected && affected.open == 1
- end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
- "\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." )
- affected.open = 2
+/datum/surgery_step/robotics/external/open_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
+ "You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
+ ..()
- fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].",
- "\red Your [tool] slips, failing to open the hatch on [target]'s [affected.name].")
+/datum/surgery_step/robotics/external/open_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\blue [user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
+ "\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." )
+ affected.open = 2
+ return 1
+
+/datum/surgery_step/robotics/external/open_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].",
+ "\red Your [tool] slips, failing to open the hatch on [target]'s [affected.name].")
+ return 0
/datum/surgery_step/robotics/external/close_hatch
allowed_tools = list(
@@ -122,28 +126,30 @@
min_duration = 70
max_duration = 100
- can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- if(..())
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- return affected && affected.open && target_zone != "mouth"
-
- begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+/datum/surgery_step/robotics/external/close_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
- "You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
- ..()
+ return affected && affected.open && target_zone != "mouth"
- end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \
- "\blue You close and secure the hatch on [target]'s [affected.name] with \the [tool].")
- affected.open = 0
- affected.germ_level = 0
+/datum/surgery_step/robotics/external/close_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
+ "You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
+ ..()
- fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].",
- "\red Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].")
+/datum/surgery_step/robotics/external/close_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\blue [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \
+ "\blue You close and secure the hatch on [target]'s [affected.name] with \the [tool].")
+ affected.open = 0
+ affected.germ_level = 0
+ return 1
+
+/datum/surgery_step/robotics/external/close_hatch/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].",
+ "\red Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].")
+ return 0
/datum/surgery_step/robotics/external/repair_brute
allowed_tools = list(
@@ -154,36 +160,38 @@
min_duration = 50
max_duration = 60
- can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- if(..())
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- if(istype(tool,/obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/welder = tool
- if(!welder.isOn() || !welder.remove_fuel(1,user))
- return 0
- return affected && affected.open == 2 && (affected.brute_dam > 0 || affected.disfigured)&& target_zone != "mouth"
-
- begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+/datum/surgery_step/robotics/external/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
- "You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
- ..()
+ if(istype(tool,/obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/welder = tool
+ if(!welder.isOn() || !welder.remove_fuel(1,user))
+ return 0
+ return affected && affected.open == 2 && (affected.brute_dam > 0 || affected.disfigured)&& target_zone != "mouth"
- end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \
- "\blue You finish patching damage to [target]'s [affected.name] with \the [tool].")
- affected.heal_damage(rand(30,50),0,1,1)
- if(affected.disfigured)
- affected.disfigured = 0
- affected.update_icon()
- target.regenerate_icons()
+/datum/surgery_step/robotics/external/repair_brute/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
+ "You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
+ ..()
- fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].",
- "\red Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].")
- target.apply_damage(rand(5,10), BURN, affected)
+/datum/surgery_step/robotics/external/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\blue [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \
+ "\blue You finish patching damage to [target]'s [affected.name] with \the [tool].")
+ affected.heal_damage(rand(30,50),0,1,1)
+ if(affected.disfigured)
+ affected.disfigured = 0
+ affected.update_icon()
+ target.regenerate_icons()
+ return 1
+
+/datum/surgery_step/robotics/external/repair_brute/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].",
+ "\red Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].")
+ target.apply_damage(rand(5,10), BURN, affected)
+ return 0
/datum/surgery_step/robotics/external/repair_burn
allowed_tools = list(
@@ -193,37 +201,39 @@
min_duration = 50
max_duration = 60
- can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- if(..())
- var/obj/item/stack/cable_coil/C = tool
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- var/limb_can_operate = (affected && affected.open == 2 && affected.burn_dam > 0 && target_zone != "mouth")
- if(limb_can_operate)
- if(istype(C))
- if(!C.get_amount() >= 3)
- user << "You need three or more cable pieces to repair this damage."
- return 2
- C.use(3)
- return 1
- return 0
-
- begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+/datum/surgery_step/robotics/external/repair_burn/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ if(..())
+ var/obj/item/stack/cable_coil/C = tool
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \
- "You begin to splice new cabling into [target]'s [affected.name].")
- ..()
+ var/limb_can_operate = (affected && affected.open == 2 && affected.burn_dam > 0 && target_zone != "mouth")
+ if(limb_can_operate)
+ if(istype(C))
+ if(!C.get_amount() >= 3)
+ user << "You need three or more cable pieces to repair this damage."
+ return 2
+ C.use(3)
+ return 1
+ return 0
- end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] finishes splicing cable into [target]'s [affected.name].", \
- "\blue You finishes splicing new cable into [target]'s [affected.name].")
- affected.heal_damage(0,rand(30,50),1,1)
+/datum/surgery_step/robotics/external/repair_burn/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \
+ "You begin to splice new cabling into [target]'s [affected.name].")
+ ..()
- fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
- var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\red [user] causes a short circuit in [target]'s [affected.name]!",
- "\red You cause a short circuit in [target]'s [affected.name]!")
- target.apply_damage(rand(5,10), BURN, affected)
+/datum/surgery_step/robotics/external/repair_burn/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\blue [user] finishes splicing cable into [target]'s [affected.name].", \
+ "\blue You finishes splicing new cable into [target]'s [affected.name].")
+ affected.heal_damage(0,rand(30,50),1,1)
+ return 1
+
+/datum/surgery_step/robotics/external/repair_burn/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user] causes a short circuit in [target]'s [affected.name]!",
+ "\red You cause a short circuit in [target]'s [affected.name]!")
+ target.apply_damage(rand(5,10), BURN, affected)
+ return 0
///////condenseing remove/extract/repair here. /////////////
/datum/surgery_step/robotics/manipulate_robotic_organs
diff --git a/code/modules/surgery/slime.dm b/code/modules/surgery/slime.dm
index 9a478484864..a2b6dc521c6 100644
--- a/code/modules/surgery/slime.dm
+++ b/code/modules/surgery/slime.dm
@@ -4,7 +4,7 @@
/datum/surgery/core_removal
name = "core removal"
steps = list(/datum/surgery_step/slime/cut_flesh, /datum/surgery_step/slime/cut_innards, /datum/surgery_step/slime/saw_core)
- allowed_species = list( /mob/living/carbon/slime)
+ allowed_mob = list( /mob/living/carbon/slime)
/datum/surgery_step/slime
diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm
index 3f7da2d800f..4b10ee37fd2 100644
--- a/code/modules/surgery/surgery.dm
+++ b/code/modules/surgery/surgery.dm
@@ -19,8 +19,8 @@
var/list/possible_locs = list() //Multiple locations -- c0
var/obj/item/organ/organ_ref //Operable body part
var/current_organ = "organ"
- var/list/allowed_species = list(/mob/living/carbon/human)
- var/list/disallowed_species = null
+ var/list/allowed_mob = list(/mob/living/carbon/human)
+ var/list/disallowed_mob = null
/datum/surgery/proc/can_start(mob/user, mob/living/carbon/target)
// if 0 surgery wont show up in list
@@ -69,8 +69,9 @@
//How much blood this step can get on surgeon. 1 - hands, 2 - full body.
var/blood_level = 0
- var/list/allowed_species = null
- var/list/disallowed_species = null
+ var/list/allowed_mob = list()
+ var/list/disallowed_mob = list()
+
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/success = 0
@@ -136,13 +137,13 @@
if(!hasorgans(target))
return 0
- if(allowed_species)
- for(var/species in allowed_species)
+ if(allowed_mob)//can i just remove this and/or change it?
+ for(var/species in allowed_mob)
if(target.species.name == species)
return 1
- if(disallowed_species)
- for(var/species in disallowed_species)
+ if(disallowed_mob)
+ for(var/species in disallowed_mob)
if(target.species.name == species)
return 0