Skip to content

Commit

Permalink
Fixes return values of some chem UI actions. (#191)
Browse files Browse the repository at this point in the history
* [NO GBP] Fixes return values of some chem UI actions. (#80648)

## About The Pull Request
- The chem heater now returns `TRUE` when its buffer dispense volume is
changed thus showing the new value immediately without a 1 second delay
- The debug chem synthesizer also now returns `TRUE` when its amount &
purity values are changed thus showing their new values immediately
without a 1 second delay

## Changelog
:cl:
fix: chem heater now shows the new value of its buffer dispense volume
immediately when it gets changed.
fix: debug chem synthesizer now shows the new values of amount & purity
immediately when it gets changed.
/:cl:

* [NO GBP] Fixes return values of some chem UI actions.

---------

Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: NovaBot <[email protected]>
  • Loading branch information
3 people authored and Iajret committed Jan 3, 2024
1 parent 898867f commit 94e823d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/machinery/chem_heater.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
return FALSE

dispense_volume = target
return FALSE
return TRUE

/**
* Injects either acid/base buffer into the beaker
Expand Down
28 changes: 20 additions & 8 deletions code/modules/reagents/chemistry/machinery/chem_synthesizer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,28 @@
return TRUE

if("amount")
var/input = text2num(params["amount"])
if(input)
amount = input
return FALSE
var/input = params["amount"]
if(isnull(input))
return FALSE

input = text2num(input)
if(isnull(input))
return FALSE

amount = input
return TRUE

if("purity")
var/input = text2num(params["amount"])
if(input)
purity = input
return FALSE
var/input = params["amount"]
if(isnull(input))
return FALSE

input = text2num(input)
if(isnull(input))
return FALSE

purity = input
return TRUE

update_appearance()

Expand Down

0 comments on commit 94e823d

Please sign in to comment.