Skip to content

Internationalization test#3

Closed
DaleStan wants to merge 66 commits intomasterfrom
internationalization-test
Closed

Internationalization test#3
DaleStan wants to merge 66 commits intomasterfrom
internationalization-test

Conversation

@DaleStan
Copy link
Owner

@DaleStan DaleStan commented May 5, 2025

A list of nice-to-have things:

  • A changelog entry.
  • The link from the PR to the issue that it fixes.
  • A description of what testing was done.

DaleStan and others added 30 commits March 21, 2025 14:18
This increases the number of errors that can be reported simultaneously.
The new Theory will also automatically test any new ProductionTableContent classes.
This now includes serialization as dictionary keys, as has always been supported for FactorioObjects.
…ss#448)

The initial driver for this was removing the warning that "The `==`
operator will silently revert to reference equality if both sides of are
the interface type." This is no longer a concern, as reference equality
will now do the right thing.

As I switched from `ICustomJsonDeserializer` to
`QualityObjectSerializer`, I also decided it was a good idea to produce
more documentation of how the serialization system worked and what
related test failures likely meant.
This fixes shpaass#446 and adds a few tests to prevent its re-occurrence,

This also fixes loading errors when the latest autosave is corrupt
(truncated, in my experience), by falling back to the original file, but
there are no unit tests for that.
As reported a couple times on Discord, the page list is broken on .NET
9. This fixes that, by removing and preventing the divide-by-zero that
(eventually) causes the issue.

![image](https://github.com/user-attachments/assets/dfae122c-fc56-43a3-a980-cd8cf6547f53)

This happened because .NET 9 changed (fixed) the float->int conversion
behavior on x86:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/jit/9.0/fp-to-integer
This applies especially to asteroid chunks: inserters are limited to a
maximum of 1 stack of items, regardless of their actual hand size.

With this change, the value on the left (0.42 inserters) will be shown
regardless of the inserter capacity, since asteroid chunks have a stack
size of 1. In general, the calculations are now done based on either the
hand size or the stack size, whichever is smaller.


![image](https://github.com/user-attachments/assets/5471e864-3999-4c1c-bfdb-963d1b7aa5c5)
Prod bonuses are usually limited to +300%, regardless of how much recipe
prod has been researched or how many prod modules are used. This limits
the bonus to +300%, or the max configured by the mod. It also adds a
warning when the maximum is exceeded.

This may help people notice their error when they have a +50% bonus from
research and enter 50 as the research level.
…hpaass#462)

When using both mods, ["rocket-part-productivity-_N_"].effects contains
two instances of { change = 0.1, recipe = "maraxsis-rocket-part", type =
"change-recipe-productivity" }. Personally, I think this is a bug in one
or both mods. That said, Factorio loads and obeys both +10% effects, so
now Yafc does too.
Write rocketCapacity to items so we never need to calculate it again in the UI.
This should fix shpaass#454; if the version specified in mod-list.json is not
found, we (like Factorio) will now load the newest version instead of
failing.
…ummary. (shpaass#466)

This appears to fix shpaass#459, but I can't really explain why
`!flow.ContainsKey` is the correct test.

It gets the correct values for unlinked products, requested products,
and requested products with overproduction; tested with Moss from Moss
Redesign.
Based on the discussion in shpaass#445 and the suggestion by @DaleStan, this at
least partial solves the problem. Figured i might as well Pr it.

Not sure if this warrants a change log entry, made one anyway.
Crowdin is a platform to make translations easier.
Dalestan brought my attention to it, so I'm adding it
to see how it goes.
@DaleStan DaleStan marked this pull request as ready for review May 5, 2025 19:48
@DaleStan DaleStan closed this May 12, 2025
@DaleStan DaleStan deleted the internationalization-test branch May 12, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants