Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions code/game/machinery/electrolyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@
if(!removed)
return

var/proportion = min(removed.get_moles(/datum/gas/water_vapor), (1.5 * delta_time * workingPower))//Works to max 12 moles at a time.
removed.adjust_moles(/datum/gas/water_vapor, -(proportion * 2 * workingPower))
removed.adjust_moles(/datum/gas/oxygen, (proportion * workingPower))
removed.adjust_moles(/datum/gas/hydrogen, (proportion * 2 * workingPower))
var/proportion = min(removed.get_moles(/datum/gas/water_vapor), (3 * delta_time * workingPower)) //Works to max 12 moles at a time.
removed.adjust_moles(/datum/gas/water_vapor, -proportion)
removed.adjust_moles(/datum/gas/oxygen, proportion / 2)
removed.adjust_moles(/datum/gas/hydrogen, proportion)
env.merge(removed) //put back the new gases in the turf
air_update_turf()

var/working = TRUE

if(stat & NOPOWER)
if (!cell.use((5 * proportion * workingPower) / (efficiency + workingPower)))
if (!cell.use((5 * proportion) / (efficiency + workingPower)))
//automatically turn off machine when cell depletes
on = FALSE
update_icon()
working = FALSE
else
active_power_usage = (5 * proportion * workingPower) / (efficiency + workingPower)
active_power_usage = (5 * proportion) / (efficiency + workingPower)
cell.give(charge_rate)

if(!working)
Expand Down