Remove the reference to the out of repo Windows install script and list
updated commands to install Clusterio stable in the readme itself.
This is a port of e1771ec.
Fix the inventoryImports client side code never receiving the script
output by specifying fileReadDelay and thereby getting the old
behaviour. This broke with the introduction of the tail mode script
output mode which requires a newline to be written at the end of
the output.
This is a port of d810b56.
Fix the inventory imports command trying to count up the removed quick
bar slots as well as using player_main instead of character_main.
Add warning that the lua commands file containing the unminified vesion
of the command has not been kept up to date. There are multiple changes
that has been done previously so these have already diverged.
This is a port of 10414eb.
The default limit of 100kb to JSON payloads of bodyParser can be
exceeded when running modded games with researchSync. Increase the
limit to 10mb as a bandaid to fix this issue.
This is a port of 25eb5e5.
Set uploadModsToMaster to false in config.json.dist. This feature is
not necessary as the integrated mod portal in Factorio provides a better
method to synchronize mods.
This is a port of 3c5b108.
If the RCON client is currently in the process of connecting to the
Factorio server then wait for it to complete the connection to avoid it
emmiting out an error connecting in FactorioServer.stop().
Move item database, tests, endpoint definitions for /api/place,
/api/remove, /api/inventory, /api/inventoryAsObject, and the web
interface view for the storage page into the clusterioMod plugin.
Remove the .js suffix from help texts of node invocations as well as
actual invocations as this is not necessary. Removing it opens up the
possibility of restructuring the code into a directory with the same
name.
Remove the unused and badly behaved getCommand and getLua functions from
clusterTools. The main issue with these is that encourage the use of
large commands that have negative impact on the performance of the
servers, as such large commands have to be transmitted to all players
that are connected. These functions also have poor handling of lua
comments and will fail on strings containing for example "--".
Remove Hotpatch and implement a save patcher in its place. The save
patcher takes a normal Factorio save and adds modules to it that's
loaded by a generated control.lua file. This greatly reduces the
difficulty of adding an existing game to Clusterio and using scenario
code in plugins.
The mechanism for selecting what code to patch into the saves from
plugins is temorary and expected to change with #220.
Add a hashStream method to lib/hash that does the same as hashFile only
with a stream instead of a file path and implement tests for both of
these methods.
Add entry to changelog detailing the change to null by default entries
for the ports and password in the instance config, and update the
comment in it to reflect the recent changes.
Move getFactorioLocale to the new lib/factorio namespace and refactor it
to use async functions instead of callbacks. Split tests into
integration with factorio and testing of the function itself.
Also removes the cacheing from the function itself as this breaks the
isolated testing of it.
Break out the server process management to a new FactorioServer class in
lib/factorio. This class takes responsibility for managing a factorio
server, communicating with it and handling the stopping of it. It also
replaces the previous effort to do this in lib/factorioServer.
This change also updates the version of rcon-client, and since the
author of it has updated it to use UTF-8 the fork is no longer
necessary. It also removes the messageInterface implementation
in favor of just calling the rcon-client library directly since
this has rate limiting logic built in.
The lib/factorio library is intended to abstract all the interfacing
that happens with Factorio.
Create a random instance ID using Math.random instead of deriving it
from the RCON password with a hombrew hash algorithm. Remove
stringUtils as it's no longer needed.
Simplify getNewestFile by converting it to an async function, use the
fs-extra promise based fs functions and remove the files argument as
well as the callback.
Refactors the tests as well to use the test/temp folder.
Add symlinkMods function which takes an instance and a shared mods
folder as input and updates or creates the instance mods folder from it
by symlinking the mods in the shared mods folder to the instance mods
folder.
On Windows this uses hard links as the symlinks require elevated
privileges.
Change back the instructions in README.md to install the master branch
of clusterio and add warnings for this in the relevant locations
directing users to the stable branch for instructions on how to install
the stable version.
Reorder the install pm2 step to be after the npm install step in the
instructions. This is necessary to avoid npm creating some files in the
home directory owned as root and then failing the npm install step
because of this.
This is a port of c25bf23.
Check that the relevant research is present in the research mapping
before accessing it in recount_cluster_research_progress.
This is a port of 0cdb5d0.
Fix the next level of an infinite research getting updated with the
progress of the previous level from other nodes in the cluster by
filtering out infinite researches with a lower level than the local
level.
This is a port of 075d54f.