Skip to content

Commit

Permalink
[MIRROR] [NO GBP] Power outage operation fixes for chem master (#2846)
Browse files Browse the repository at this point in the history
* [NO GBP] Power outage operation fixes for chem master (#82591)

## About The Pull Request
- If the chem master runs out of power mid printing, it will properly
stop the printing process and its animation
- When transferring reagents it correctly checks if we have enough power
without forcing it

## Changelog
:cl:
fix: chem master properly shuts down if it loses power mid printing and
won't transfer reagents for the same
/:cl:

* [NO GBP] Power outage operation fixes for chem master

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: SyncIt21 <[email protected]>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent f7f1175 commit fab1c13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/modules/reagents/chemistry/machinery/chem_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
return FALSE

//use energy
if(!use_energy(active_power_usage))
if(!use_energy(active_power_usage, force = FALSE))
return FALSE

//do the operation
Expand Down Expand Up @@ -518,7 +518,9 @@
return

//use power
if(!use_energy(active_power_usage))
if(!use_energy(active_power_usage, force = FALSE))
is_printing = FALSE
update_appearance(UPDATE_OVERLAYS)
return

//print the stuff
Expand Down

0 comments on commit fab1c13

Please sign in to comment.