Fix crash when technologiy level stored on the master is greater than
the max_level for the technology in Factorio. This can happen with mods
that for example reduce the max_level from inifity to a finite level.
Fix research_sync sending out contribution events for the previous level
of a researched technology and sending finished events for the wrong
level when synchronizing technologies. Both of these issues are related
to failing to accunt for the unlocked level being one less than the
level stored when the researched property is false.
Fix log spam when the dole distribution method is used on
subspace_storage plugin. This was caused by a bogus if condition being
translated into a sensible but wrong one.
Fix integration tests using the default certificate paths instead of
having them located in the dedicated test database directory. Also
increment key size to the minimum allowed of 1024.
Add config entry for the number of bits to use in the auto generate TLS
certificate for the master server and reduce it to 512 for the
integration test. This reduces the time needed to generate the
certificate in the integration test.
Ensure that the replay is disabled after the game is patched by calling
game.disable_replay(). It's not possible to replay a patched save, and
it also stores every command sent into save, causing it to quickly grow
into an unplayably large size.
Gate the onMetrics plugin hook behind a boolean that's set only after
the Factorio server has fully started, and reset when it stops. This
prevents errors due to plugins trying to get metrics while the server
is creating a new save or stopped.
Ensure that notifyExit is called if errors occur during startInstance
and createSave request, and rework startInstance save logic to create
a new savegame if no save is present and allow specifying the save to
load.
Pull the exit handler into its own method that's invoked if the startup
fails before the Factorio server is created. Also move the metrics
clearing to the exit notification method to ensure it's also invoked.
Add option to bump patch number and override factorio_version in the
generated mod and update the serialize library to support the inventory
bar access methods of both 0.17 and 0.18.
Add web_root option to the master server and use it create URLs for
resources hosted by it. This permits hosting the master server web
interface behind reverse proxy under a dedicated path.
Add section to contributing guidelines detailing that single quoted
strings should not be used. The use of it has only resulted in the
addition of more inconsistency to the codebase.