Surgery done.

This commit is contained in:
Chinsky
2012-10-14 20:31:07 +04:00
parent c3b53af100
commit 9befbd6aa9
2 changed files with 44 additions and 33 deletions
+5 -5
View File
@@ -181,11 +181,11 @@
return
if (can_operate(M)) //Checks if mob is lying down on table for surgery
if(istype(M,/mob/living/carbon))
if (user.a_intent == "help")
if (user.a_intent == "help" || (user.a_intent != "harm" && is_surgery_tool(src)))
if(surgery_steps == null) build_surgery_steps_list()
for(var/datum/surgery_step/S in surgery_steps) //check if tool is right
if(istype(src, S.required_tool) || \
(S.allowed_tools && src.type in S.allowed_tools )) //or close enough
for(var/datum/surgery_step/S in surgery_steps)
//check if tool is right or close enough
if(istype(src, S.required_tool) || (S.allowed_tools && src.type in S.allowed_tools ))
if(S.can_use(user, M, user.zone_sel.selecting, src)) //is this step possible?
S.begin_step(user, M, user.zone_sel.selecting, src)
if(do_mob(user, M, rand(S.min_duration, S.max_duration)))
@@ -193,7 +193,7 @@
else
S.fail_step(user, M, user.zone_sel.selecting, src)
return //don't want to do weapony things after surgery
if (is_surgery_tool(src) && user.a_intent != "harm")
if (is_surgery_tool(src))
return
var/messagesource = M