Remove the obsolete and broken statistics gather from the clusterioMod
plugin. The statisticsExporter plugin already exports all of the
statistics (and more) that was exported here.
This is a port of 3e7d4a8.
Remove the unimplemented "binary" option from all plugin config files.
Setting this option to something other than "nodePackage" would
supposedly run a binary and feed it with the stdout of the factorio
proccess, but that was never implemented.
Rework client.js to support running multiple instances at once and be
managed remotely and implement the neccessary communication
infrastructure for this.
Due to circular dependencies on the implementation of this the master
branch is significantly broken after this.
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.
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 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.
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.
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.
Set the progress for the next level of an infinite research when
unlocking it via a script. This is necessary when the research is
actively being researched as Factorio will carry over the progress for
the current level into the next one when set via a script.
It's possible for the new progress to be non-zero if the next level was
on the research queue.
This is a port of 62f3a99.
Fix naive checks for properties being set of the form obj[key] into the
proper form Object.hasOwnProperty.call(obj, key). The reason for this
is that if the key has a value of a built-in property like 'constructor'
then a check of the form obj[key] will always return true even if that
property hasn't been set on the object.
This is a port of 6a6274e.
Move the ejs templates to the default Express.js views/ folder and
change their extension to .ejs. Reconfigure Express.js to look for
templates in the views folders as well as the plugins folder. This
enables plugins to render templates using paths of following format
"pluginName/path/to/page-or-view".
Add missing.js test files that requires any files that currently does
not have any unit tests defined for them. This should hopefully make it
so that when unit tests are added for parts of these files the coverage
will increase instead of decreasing.
Note that this does not include CLI Tools/ as those are not testable.
Remove getCommand, getInstanceName, getSafeLua, and
checkHotpatchInstallation definitions from plugins and use the
implementation in lib/clusterTools for these functions instead.
Remove lib/manager/configManager.js and the config management command
line interface as well as the serverManager's web interface for config
management. The configuration rewrite will work differently and is not
compatible with configManager.js.
Merge the masterIP and masterPort configuration entries into a single
masterURL entry. Fixes the problem with connecting to an HTTPS version
of the master server and also makes it easier to host the master server
behind a reverse proxy.
This breaks all known code interfacing Clusterio.
Change the ugly global slaves object to be a member of the db object and
implement the items database as a separate integrety verifying class in
lib/database.
#add tailing of files to prevent lost data between factorio and clusterio
#move socketio connect to the bottom after the plugins are loaded
to prevent plugins not getting the connection event
#add some more transfer compression in different places