From 288b266ba8979d44efd855d9f43c7101c11f125d Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+AnArgonianLizardThatStealsPRs@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:38:57 +0300 Subject: [PATCH] [MIRROR] Add prior material amount check to turbine part upgrade [MDB IGNORE] (#658) * Add prior material amount check to turbine part upgrade (#79742) --------- Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: mogeoko <109075486+mogeoko@users.noreply.github.com> --- code/modules/power/turbine/turbine_parts.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/power/turbine/turbine_parts.dm b/code/modules/power/turbine/turbine_parts.dm index d53d92190e1..4215fccf39f 100644 --- a/code/modules/power/turbine/turbine_parts.dm +++ b/code/modules/power/turbine/turbine_parts.dm @@ -64,7 +64,7 @@ if(!istype(attacking_item, second_tier_material)) return var/obj/item/stack/sheet/second_tier = attacking_item - if(second_tier.use(second_tier_material_amount) && do_after(user, 1 SECONDS, src)) + if(do_after(user, 1 SECONDS, src) && second_tier.use(second_tier_material_amount)) current_tier = 2 part_efficiency += part_efficiency_increase_amount max_rpm *= max_rpm_tier_multiplier @@ -74,7 +74,7 @@ if(!istype(attacking_item, third_tier_material)) return var/obj/item/stack/sheet/third_tier = attacking_item - if(third_tier.use(third_tier_material_amount) && do_after(user, 2 SECONDS, src)) + if(do_after(user, 2 SECONDS, src) && third_tier.use(third_tier_material_amount)) current_tier = 3 part_efficiency += part_efficiency_increase_amount max_rpm *= max_rpm_tier_multiplier @@ -84,7 +84,7 @@ if(!istype(attacking_item, fourth_tier_material)) return var/obj/item/stack/sheet/fourth_tier = attacking_item - if(fourth_tier.use(fourth_tier_material_amount) && do_after(user, 3 SECONDS, src)) + if(do_after(user, 3 SECONDS, src) && fourth_tier.use(fourth_tier_material_amount)) current_tier = 4 part_efficiency += part_efficiency_increase_amount max_rpm *= max_rpm_tier_multiplier