Makes adjust_moles clamp to valid values
This commit is contained in:
@@ -160,7 +160,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
|
||||
/datum/gas_mixture/proc/clear()
|
||||
|
||||
/datum/gas_mixture/proc/adjust_moles(gas_type, amt = 0)
|
||||
set_moles(gas_type, get_moles(gas_type) + amt)
|
||||
set_moles(gas_type, clamp(get_moles(gas_type) + amt,0,INFINITY))
|
||||
|
||||
/datum/gas_mixture/proc/return_volume() //liters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user