mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-18 11:44:05 +01:00
Merge pull request #3485 from Neerti/5/31/2017_make_surgery_slightly_better_again
Surgery Modifications
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
climbable = 1
|
||||
layer = 2.8
|
||||
throwpass = 1
|
||||
surgery_odds = 66
|
||||
var/flipped = 0
|
||||
var/maxhealth = 10
|
||||
var/health = 10
|
||||
|
||||
Reference in New Issue
Block a user