This commit is contained in:
Aurorablade
2016-02-06 18:42:26 -05:00
parent 12b3ccb2e2
commit e1899e4af9
8 changed files with 51 additions and 32 deletions
@@ -57,7 +57,7 @@
else
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
/obj/item/organ/internal/brain/remove(var/mob/living/user)
/obj/item/organ/internal/brain/remove(var/mob/living/user,var/special)
if(!owner) return ..() // Probably a redundant removal; just bail
@@ -349,6 +349,12 @@
step_away(src,M)
return
else
if(stat == DEAD && surgeries.len)
if(M.a_intent == I_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(M, src))
return 1
/*
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
@@ -482,6 +488,11 @@
return
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
if(stat == DEAD && surgeries.len)
if(user.a_intent == I_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
if (user in Friends)
++Friends[user]
+5 -4
View File
@@ -8,7 +8,7 @@
H = M
affecting = H.get_organ(check_zone(selected_zone))
if(isslime(M) ||isalien(M) ||can_operate(H)) //if they're prone or a slime
if(can_operate(M)) //if they're prone or a slime
var/datum/surgery/current_surgery
for(var/datum/surgery/S in M.surgeries)
@@ -64,9 +64,10 @@
M.surgeries -= current_surgery
user.visible_message("[user] mends the incision on [M]'s [parse_zone(selected_zone)] with the [I] .", \
"<span class='notice'>You mend the incision on [M]'s [parse_zone(selected_zone)].</span>")
affecting.open = 0
affecting.germ_level = 0
affecting.status &= ~ORGAN_BLEEDING
if(affecting)
affecting.open = 0
affecting.germ_level = 0
affecting.status &= ~ORGAN_BLEEDING
qdel(current_surgery)
else if(current_surgery.can_cancel)
user << "<span class='warning'>You need to hold a cautery in inactive hand to stop [M]'s surgery!</span>"
+3 -3
View File
@@ -14,7 +14,7 @@
var/mob/living/carbon/human/H = target
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(affected.is_stump())
if(affected)
return 0
return 1
@@ -29,7 +29,7 @@
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 && (affected.status && ORGAN_DESTROYED))
if(!affected)
return 1
return 0
@@ -43,7 +43,7 @@
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 && (affected.status && ORGAN_DESTROYED))
if(!affected)
return 1
return 0
+25 -17
View File
@@ -19,7 +19,7 @@
possible_locs = list("chest", "head", "groin", "eyes", "mouth")
allowed_mob = list(/mob/living/carbon/alien/humanoid)
disallowed_mob = list(/mob/living/carbon/human)
steps = list(/datum/surgery_step/saw_carapace,/datum/surgery_step/cut_carapace, /datum/surgery_step/retract_carapace, /datum/surgery_step/open_encased/saw, /datum/surgery_step/internal/manipulate_organs)
steps = list(/datum/surgery_step/saw_carapace,/datum/surgery_step/cut_carapace, /datum/surgery_step/retract_carapace,/datum/surgery_step/internal/manipulate_organs)
/datum/surgery/organ_manipulation/can_start(mob/user, mob/living/carbon/target)
@@ -134,10 +134,13 @@
/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery)
I = null
affected = target.get_organ(target_zone)
var/mob/living/carbon/human/H
if(istype(target,/mob/living/carbon/human))
H = target
affected = H.get_organ(target_zone)
if(is_int_organ(tool))
current_type = "insert"
I = tool
@@ -152,15 +155,18 @@
if(target.get_int_organ(I))
user << "<span class='warning'> \The [target] already has [I].</span>"
return -1
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \
"You start transplanting \the [tool] into [target]'s [affected.name].")
target.custom_pain("Someone's rooting around in your [affected.name]!",1)
if(affected)
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \
"You start transplanting \the [tool] into [target]'s [affected.name].")
H.custom_pain("Someone's rooting around in your [affected.name]!",1)
else
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [parse_zone(target_zone)].", \
"You start transplanting \the [tool] into [target]'s [parse_zone(target_zone)].")
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.encased)
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]."
@@ -169,7 +175,8 @@
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)
if(affected)
H.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)
@@ -188,7 +195,8 @@
if(!I) return -1
user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \
"You start to separate [target]'s [I] with \the [tool] for removal." )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
if(affected)
H.custom_pain("The pain in your [affected.name] is living hell!",1)
else
return -1
@@ -219,7 +227,7 @@
user << "No organs appear to be damaged."
return -1
target.custom_pain("The pain in your [affected.name] is living hell!",1)
H.custom_pain("The pain in your [affected.name] is living hell!",1)
else if(istype(tool, /obj/item/weapon/reagent_containers/food/snacks/organ))
user << "<span class='warning'>[tool] was biten by someone! It's too damaged to use!</span>"
@@ -256,9 +264,12 @@
user.drop_item()
I.insert(target)
spread_germs_to_organ(I, user)
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'> You have transplanted \the [tool] into [target]'s [affected.name].</span>")
if(affected)
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'> You have transplanted \the [tool] into [target]'s [affected.name].</span>")
else
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'> You have transplanted \the [tool] into [target]'s [parse_zone(target_zone)].</span>")
I.status &= ~ORGAN_CUT_AWAY
else if(current_type == "extract")
@@ -276,7 +287,6 @@
"<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>")
else if(current_type == "finish")
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(affected.encased)
var/msg = "<span class='notice'> [user] bends [target]'s [affected.encased] back into place with \the [tool].</span>"
var/self_msg = "<span class='notice'> You bend [target]'s [affected.encased] back into place with \the [tool].</span>"
@@ -296,7 +306,6 @@
if(current_type == "mend")
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
@@ -327,7 +336,6 @@
else if(current_type == "extract")
if(I && I.owner == target)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(BRUISE, 20)
+1 -1
View File
@@ -12,7 +12,7 @@
return istype(target, /mob/living/carbon/slime/)
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return target.stat == 2
return target.stat == DEAD
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(
+5 -4
View File
@@ -159,10 +159,11 @@
// does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too
/datum/surgery_step/proc/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)
if (can_infect && affected)
spread_germs_to_organ(affected, user)
if (ishuman(user) && prob(60))
if(ishuman(target))
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (can_infect && affected)
spread_germs_to_organ(affected, user)
if (ishuman(user) && !(istype(target,/mob/living/carbon/alien)) && prob(60))
var/mob/living/carbon/human/H = user
if (blood_level)
H.bloody_hands(target,0)