-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Use archived gas mixture in gas exchange comparison #32088
Conversation
it was DIRECTIONAL?? |
comment on the function should change since it takes tileatmosphere instead of gasmixture now |
your cl is broken, should have 🆑 symbol |
Thanks for the investigation and fix. From a code perspective, I think it would be cleaner, easier to understand, and more testable if you left the old That would permit you to remove the |
Do you happen to have a minimal map that demonstrates the issue and how the changes fix it? |
i'm pretty sure this bug causes burns in closed room to just completely break and have one tile hitting tempcap and an adjacent tile being at like 100C, this is not exaggerated, this probably wasn't reported yet because i am lazy and because nobody else does closed burns of the required kind |
i reported it ages ago |
Mind giving me a minimum reproducible map file for me to test this fix? |
it doesnt need a map just fill a 3x3 or larger chamber with burn mix, ignite the center and watch the center burn and sides stay at 20C until the reaction ends via fuel or tempcap (needs diffusing more fuel from adjacent tiles) |
I tested this and this patch does not appear to fix @deltanedas 's problem. I would be curious what problem this patch actually fixes and if there's a minimal map that demonstrates this patch fixing that issue. |
I'd like to add that this patch nevertheless seems correct and we should probably merge it with the suggested changes. I just want to make sure we all understand what is actually being fixed and have a way to validate that. |
The reason I had suggested this change was to prevent unnecessary code duplication between the two methods. Now I see why this is: |
It seems to me that the most reasonable way to handle this would be to replace |
Would you mind taking a look at the updated diff and double checking that this still fixes the linked bug? |
Yes, you're passing in and handling the archived data, so that diff should resolve the issue. |
Thanks! |
Assume we have a turf surrounded by 4 mixes that differ from it by idk 10% On /tg/ this biased gas flow to the north east, because that's the order we fill out atmos_adjacent_turfs as a list. |
what delta described can also happen the other way, chamber center stays 800C but sides go tempcap |
) The comparison for doing gas exchange used current and not archived moles. This could lead to update order-dependent gas spreading effects. To fix this, convert TileAtmosphere's MolesArchived and TemperatureArchived to a AirArchived, and use that in the comparison method. --------- Co-authored-by: PraxisMapper <[email protected]> Co-authored-by: Kevin Zheng <[email protected]>
About the PR
CompareExchange() now allows using archives gases instead of current ones.
Why / Balance
Fixes #32053
Technical details
A flag was added to CompareExchange to let it pick the current air or the archived air value for comparisons. The 2 calls to it were updated to match the new function signature. The function's 2 main arguments were also changed to the parent of both the current and archived air values.
Media
No visible changes
Requirements
Breaking changes
TileAtmosphere
,TemperatureArchived
andMolesArchived
have been rolled intoAirArchived
. UseAirArchived.Temperature
andAirArchived.Moles
to access these fields, respectively.Changelog
🆑