Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/datum/surgery_step
|
||||
var/name
|
||||
var/list/implements = list() //format is path = probability of success. alternatively
|
||||
var/implement_type = null //the current type of implement used. This has to be stored, as the actual typepath of the tool may not match the list type.
|
||||
var/accept_hand = 0 //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item.
|
||||
var/accept_any_item = 0 //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand.
|
||||
var/time = 10 //how long does the step take?
|
||||
var/name
|
||||
|
||||
|
||||
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
@@ -30,7 +30,7 @@
|
||||
else
|
||||
user << "<span class='warning'>You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!</span>"
|
||||
return 1 //returns 1 so we don't stab the guy in the dick or wherever.
|
||||
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
|
||||
if(isrobot(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -38,24 +38,19 @@
|
||||
/datum/surgery_step/proc/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
surgery.step_in_progress = 1
|
||||
|
||||
var/speed_mod = 1
|
||||
|
||||
if(preop(user, target, target_zone, tool, surgery) == -1)
|
||||
surgery.step_in_progress = 0
|
||||
return
|
||||
|
||||
if(tool)
|
||||
speed_mod = tool.toolspeed
|
||||
|
||||
if(do_after(user, time * speed_mod, target = target))
|
||||
if(do_after(user, time, target = target))
|
||||
var/advance = 0
|
||||
var/prob_chance = 100
|
||||
|
||||
if(implement_type) //this means it isn't a require hand or any item step.
|
||||
prob_chance = implements[implement_type]
|
||||
prob_chance *= surgery.get_propability_multiplier()
|
||||
prob_chance *= get_location_modifier(target)
|
||||
|
||||
if(prob(prob_chance) || iscyborg(user))
|
||||
if(prob(prob_chance) || isrobot(user))
|
||||
if(success(user, target, target_zone, tool, surgery))
|
||||
advance = 1
|
||||
else
|
||||
@@ -65,7 +60,7 @@
|
||||
if(advance)
|
||||
surgery.status++
|
||||
if(surgery.status > surgery.steps.len)
|
||||
surgery.complete()
|
||||
surgery.complete(target)
|
||||
|
||||
surgery.step_in_progress = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user