fix, yadda yadda
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/datum/surgery/organ_manipulation
|
||||
name = "organ manipulation"
|
||||
name = "Organ manipulation"
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
|
||||
requires_real_bodypart = 1
|
||||
@@ -13,7 +13,6 @@
|
||||
//there should be bone fixing
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/soft
|
||||
possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
steps = list(
|
||||
@@ -24,9 +23,8 @@
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/alien
|
||||
name = "alien organ manipulation"
|
||||
name = "Alien organ manipulation"
|
||||
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
species = list(/mob/living/carbon/alien/humanoid)
|
||||
steps = list(
|
||||
@@ -37,9 +35,8 @@
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/mechanic
|
||||
name = "prosthesis organ manipulation"
|
||||
name = "Prosthesis organ manipulation"
|
||||
possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
@@ -51,7 +48,6 @@
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close
|
||||
)
|
||||
|
||||
/datum/surgery/organ_manipulation/mechanic/soft
|
||||
possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
steps = list(
|
||||
@@ -61,7 +57,6 @@
|
||||
/datum/surgery_step/manipulate_organs,
|
||||
/datum/surgery_step/mechanic_close
|
||||
)
|
||||
|
||||
/datum/surgery_step/manipulate_organs
|
||||
time = 64
|
||||
name = "manipulate organs"
|
||||
@@ -70,11 +65,9 @@
|
||||
var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55)
|
||||
var/current_type
|
||||
var/obj/item/organ/I = null
|
||||
|
||||
/datum/surgery_step/manipulate_organs/New()
|
||||
..()
|
||||
implements = implements + implements_extract
|
||||
|
||||
/datum/surgery_step/manipulate_organs/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
I = null
|
||||
if(istype(tool, /obj/item/organ_storage))
|
||||
@@ -92,9 +85,9 @@
|
||||
if(target_zone != I.zone || target.getorganslot(I.slot))
|
||||
to_chat(user, "<span class='notice'>There is no room for [I] in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return -1
|
||||
|
||||
user.visible_message("[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].",
|
||||
"<span class='notice'>You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...</span>")
|
||||
display_results(user, target, "<span class='notice'>You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...</span>",
|
||||
"[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].",
|
||||
"[user] begins to insert something into [target]'s [parse_zone(target_zone)].")
|
||||
|
||||
else if(implement_type in implements_extract)
|
||||
current_type = "extract"
|
||||
@@ -107,21 +100,20 @@
|
||||
O.on_find(user)
|
||||
organs -= O
|
||||
organs[O.name] = O
|
||||
|
||||
I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
|
||||
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
|
||||
I = organs[I]
|
||||
if(!I)
|
||||
return -1
|
||||
user.visible_message("[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].",
|
||||
"<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>")
|
||||
display_results(user, target, "<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>",
|
||||
"[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].",
|
||||
"[user] begins to extract something from [target]'s [parse_zone(target_zone)].")
|
||||
else
|
||||
return -1
|
||||
|
||||
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 == "insert")
|
||||
if(istype(tool, /obj/item/organ_storage))
|
||||
@@ -134,17 +126,20 @@
|
||||
I = tool
|
||||
user.temporarilyRemoveItemFromInventory(I, TRUE)
|
||||
I.Insert(target)
|
||||
user.visible_message("[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
|
||||
"<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>")
|
||||
display_results(user, target, "<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>",
|
||||
"[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
|
||||
"[user] inserts something into [target]'s [parse_zone(target_zone)]!")
|
||||
|
||||
else if(current_type == "extract")
|
||||
if(I && I.owner == target)
|
||||
user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
|
||||
"<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>")
|
||||
display_results(user, target, "<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>",
|
||||
"[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
|
||||
"[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!")
|
||||
log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
|
||||
I.Remove(target)
|
||||
I.forceMove(get_turf(target))
|
||||
else
|
||||
user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
|
||||
"<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user