Skip to content

Commit

Permalink
[MIRROR] Add prior material amount check to turbine part upgrade [MDB…
Browse files Browse the repository at this point in the history
… IGNORE] (#658)

* Add prior material amount check to turbine part upgrade (#79742)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: mogeoko <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2023
1 parent b9fca31 commit 288b266
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/power/turbine/turbine_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 288b266

Please sign in to comment.