Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gas sharing transfer enough gas in order to attempt to equalize in one step #14539

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/modules/atmospherics/FEA_gas_mixture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ What are the archived variables for?
/datum/gas_mixture/proc/check_gas_mixture(datum/gas_mixture/sharer)
if (!sharer)
return SELF_CHECK_FAIL
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = (GAS - sharer.GAS)/5;
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = (GAS + sharer.GAS) / 2 - sharer.GAS;
APPLY_TO_ARCHIVED_GASES(_DELTA_GAS)
#undef _DELTA_GAS

Expand All @@ -295,7 +295,7 @@ What are the archived variables for?
/// * Checks if the turf is valid for air group processing.
/// * Returns: FALSE if self-check failed or TRUE if check passes
/datum/gas_mixture/proc/check_turf(turf/model)
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = (ARCHIVED(GAS) - model.GAS)/5;
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = (ARCHIVED(GAS) + model.GAS) / 2 - model.GAS;
APPLY_TO_GASES(_DELTA_GAS)
#undef _DELTA_GAS

Expand All @@ -315,7 +315,7 @@ What are the archived variables for?
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
if(!sharer)
return
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = QUANTIZE(src.ARCHIVED(GAS) - sharer.ARCHIVED(GAS))/5;
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = QUANTIZE((src.ARCHIVED(GAS) + sharer.ARCHIVED(GAS)) / 2 - sharer.ARCHIVED(GAS));
APPLY_TO_GASES(_DELTA_GAS)
#undef _DELTA_GAS

Expand Down Expand Up @@ -370,7 +370,7 @@ What are the archived variables for?
/// * Similar to [/datum/gas_mixture/proc/share], except the model is not modified.
/// * Return: Moles of gas exchanged.
/datum/gas_mixture/proc/mimic(turf/model, border_multiplier = 1)
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = QUANTIZE(((src.ARCHIVED(GAS) - model.GAS)/5)*border_multiplier/src.group_multiplier);
#define _DELTA_GAS(GAS, ...) var/delta_##GAS = QUANTIZE(((src.ARCHIVED(GAS) + model.GAS) / 2 - model.GAS)*border_multiplier/src.group_multiplier);
APPLY_TO_GASES(_DELTA_GAS)
#undef _DELTA_GAS

Expand Down