[MISSED MIRROR] Volume pump refactor (#76260) (#22535)

Volume pump refactor (#76260)

## About The Pull Request

A new pull request that DOESN'T make Lemon and Ghil kill me. _[I had
made a previous PR about the same original commits that was going to
make Volume Pumps leave a lot more gas in pipenets then people would
want.]_
Removed Hardcoded values from Volume_Pump.dm and moved them to __DEFINES
Updated documentation on Volume pumps because it was copied from
Pressure Pump. Volume pumps attempt to move a certain volume and ignore
pressure limits until exceeding them. This can lead to pressures well
above the limit, so there is no ‘perfecting’ of pressures, as previously
detailed by documentation.

Edited to be more specific.

## Why It's Good For The Game

Less Hardcoded values.
Documentation more readily reflects the realities of the game.

## Changelog

🆑
code: replaced hardcoded values in volume_pump.dm with __DEFINES vars
doc: Volume Pump's basic introduction was copied and pasted from the
Pressure Pump documentation, and made mention of trying to 'perfect the
pressure'. Volume pump doesn't care about pressure until it exceeds it,
so there is no 'perfecting' going on.
/🆑

---------

Co-authored-by: EliteCreature <EliteCreature@gmail.com>
Co-authored-by: Riley Redd <riley@pcs-ms.com>
This commit is contained in:
Bloop
2023-07-18 17:46:23 -04:00
committed by GitHub
co-authored by EliteCreature Riley Redd
parent edf52faefc
commit ee38211143
2 changed files with 12 additions and 6 deletions
@@ -1,7 +1,7 @@
// Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
// Every cycle, the pump uses the air in air_in to try and move a specific volume of gas into air_out.
//
// node1, air1, network1 correspond to input
// node2, air2, network2 correspond to output
// node1, air1, network1 corresponds to input
// node2, air2, network2 corresponds to output
//
// Thus, the two variables affect pump operation are set in New():
// air1.volume
@@ -72,10 +72,10 @@
var/input_starting_pressure = air1.return_pressure()
var/output_starting_pressure = air2.return_pressure()
if((input_starting_pressure < 0.01) || ((output_starting_pressure > 9000)) && !overclocked)
if((input_starting_pressure < VOLUME_PUMP_MINIMUM_OUTPUT_PRESSURE) || ((output_starting_pressure > VOLUME_PUMP_MAX_OUTPUT_PRESSURE)) && !overclocked)
return
if(overclocked && (output_starting_pressure-input_starting_pressure > 1000))//Overclocked pumps can only force gas a certain amount.
if(overclocked && (output_starting_pressure-input_starting_pressure > VOLUME_PUMP_OVERPRESSURE_ALLOWANCE))//Overclocked pumps can only force gas a certain amount.
return