mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Refactor Get Pain (#22847)
This PR refactors get_pain() to be essentially performance free. Previously it was a member of the top 5 most expensive procs. I had to touch a metric shitton of files to make this happen. Notably get_pain() was also 1/3rd of the entire processing cost for Mobs - Life
This commit is contained in:
@@ -202,7 +202,7 @@
|
||||
var/obj/item/weldingtool/welder = tool
|
||||
if(!welder.isOn() || welder.get_fuel() < 2)
|
||||
return FALSE
|
||||
return affected && affected.open == ORGAN_ENCASED_RETRACTED && affected.brute_dam > 0 && target_zone != BP_MOUTH
|
||||
return affected && affected.open == ORGAN_ENCASED_RETRACTED && LIMB_GET_BRUTE_DAMAGE(affected) > 0 && target_zone != BP_MOUTH
|
||||
|
||||
/singleton/surgery_step/robotics/repair_brute/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
var/obj/item/stack/cable_coil/C = tool
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
var/limb_can_operate = (affected && affected.open == ORGAN_ENCASED_RETRACTED && affected.burn_dam > 0 && target_zone != BP_MOUTH)
|
||||
var/limb_can_operate = (affected && affected.open == ORGAN_ENCASED_RETRACTED && LIMB_GET_BURN_DAMAGE(affected) > 0 && target_zone != BP_MOUTH)
|
||||
if(limb_can_operate)
|
||||
if(istype(C))
|
||||
if(!C.get_amount() >= 6)
|
||||
|
||||
Reference in New Issue
Block a user