Merge pull request #3485 from Neerti/5/31/2017_make_surgery_slightly_better_again

Surgery Modifications
This commit is contained in:
Anewbe
2017-06-01 14:42:38 -05:00
committed by GitHub
6 changed files with 46 additions and 14 deletions
+2 -2
View File
@@ -526,9 +526,9 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
return ..()
var/use_amt = min(src.amount, ceil(S.burn_dam/3), 5)
var/use_amt = min(src.amount, ceil(S.burn_dam/5), 5)
if(can_use(use_amt))
if(S.robo_repair(3*use_amt, BURN, "some damaged wiring", src, user))
if(S.robo_repair(5*use_amt, BURN, "some damaged wiring", src, user))
src.use(use_amt)
else
+26 -7
View File
@@ -1,5 +1,8 @@
/* SURGERY STEPS */
/obj/
var/surgery_odds = 0 // Used for tables/etc which can have surgery done of them.
/datum/surgery_step
var/priority = 0 //steps with higher priority would be attempted first
@@ -111,13 +114,29 @@
return 1
M.op_stage.in_progress += zone
S.begin_step(user, M, zone, src) //start on it
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
if(prob(S.tool_quality(src)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
S.end_step(user, M, zone, src) //finish successfully
else if ((src in user.contents) && user.Adjacent(M)) //or
S.fail_step(user, M, zone, src) //malpractice~
else // This failing silently was a pain.
user << "<span class='warning'>You must remain close to your patient to conduct surgery.</span>"
var/success = TRUE
// Bad tools make it less likely to succeed.
if(!prob(S.tool_quality(src)))
success = FALSE
// Bad or no surface may mean failure as well.
var/obj/surface = M.get_surgery_surface()
if(!surface || !prob(surface.surgery_odds))
success = FALSE
// Not staying still fails you too.
if(success)
if(!do_mob(user, M, rand(S.min_duration, S.max_duration)))
success = FALSE
else
to_chat(user, "<span class='warning'>You must remain close to your patient to conduct surgery.</span>")
if(success)
S.end_step(user, M, zone, src)
else
S.fail_step(user, M, zone, src)
M.op_stage.in_progress -= zone // Clear the in-progress flag.
if (ishuman(M))
var/mob/living/carbon/human/H = M
+1
View File
@@ -8,6 +8,7 @@
climbable = 1
layer = 2.8
throwpass = 1
surgery_odds = 66
var/flipped = 0
var/maxhealth = 10
var/health = 10