Commit Graph
40 Commits
Author SHA1 Message Date
Hornwitser 2d3307c045 Remove unused binary option from plugin configs
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.
2019-11-30 00:08:10 +01:00
Hornwitser 7a2abaa5db Daemonize slave
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.
2019-11-23 15:16:47 +01:00
Hornwitser 31ab3a09f6 Port add fileReadDelay to inventoryImports config
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.
2019-11-15 15:39:43 +01:00
Hornwitser 7c79ea44b6 Port fix inventoryImports command
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.
2019-11-15 15:39:20 +01:00
Hornwitser ff3fc3b94b Remove .js suffix in require paths
Remove the .js suffix in require paths to make requires consistent
across the project.
2019-10-28 19:45:34 +01:00
Hornwitser 1fd8ae954b Add missing files to coverage report
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.
2019-09-18 15:25:19 +02:00
Hornwitser a63c341209 Move unit tests to test/ folder
Move unit tests for client, master, and the lib to test/ and move plugin
unit tests to <plugin dir>/test.
2019-09-14 14:49:52 +02:00
Hornwitser 98900e72dc Merge masterIP and masterPort into masterURL
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.
2019-09-09 12:44:09 +02:00
Hornwitser 3b08b73c37 Remove unused function parseJsString
Remove unused and dangerous parseJsString function from
inventoryImports.
2019-08-24 11:55:19 +02:00
Hornwitser 5a9e2a8825 Fix inventoryImports/interfacingFunctions test
Fix test in inventoryImports/interfacingFunctions breaking due to
masterAuthSecret not being defined in the config.
2019-08-24 11:25:40 +02:00
Hornwitser a39a17b220 Throw Error objects in inventoryImports/interfacingFunctions
Change throwing of strings objcts to throw proper Error objects.
2019-08-24 11:25:40 +02:00
Hornwitser 0d4ad2f075 Fix global leaks detected by mocha
Fix globals leaked in stringUtils, isJson and static/nav.html.
2019-08-24 11:02:50 +02:00
Hornwitser f76c84c3f1 Move node_modules/_app/ into lib/ as a package (#190)
Move the contents of node_modules/_app into lib/ as there shouldn't be
any content in node_modules.  This directory is automatically managed
and pruned by npm.

Add lib/ as a local package in package.json, this allows scripts
everywhere to require it's content as "lib/path" instead of relying on
local paths.  This shadows the StdLib Node.js Bindings package, but I
could care less.

Change all requires with lib as a local path and _app to use just lib.
2019-08-04 15:52:36 +02:00
veladon 3ae55cbd27 Updated defines.inventory.player_<x> to defines.inventory.character_<x> as per 0.17.35 change to rename character entity type from "player" to "character". 2019-05-13 20:41:15 +01:00
Daniel Vestøl 9461978a6e Reduced log spam 2018-07-30 13:30:03 +02:00
Godmave 7784fecb12 #add inventory items up instead of overwriting them 2018-07-21 00:21:27 +02:00
Danielv123 a26189947d Token auth in inventoryImports 2018-04-25 12:50:33 +02:00
Danielv123 8f2d22cbd8 Only wrote files on the server, might resolve some crashes 2018-04-21 08:05:40 +02:00
Danielv123 2c2bbb71b4 inventoryImports: Fixed chat errors when players are dead 2018-04-15 12:02:46 +02:00
Danielv123 f131a83103 moved isFactorioCommand, more tests, researchSync stability 2018-04-13 12:32:09 +02:00
Danielv123 44b68c92d5 Big changes to plugin system, fixed inventoryImports 2017-12-10 11:27:02 +01:00
Danielv123 ffe2df55c4 #61 added webpage to master, some more plugin work 2017-11-29 09:02:11 +01:00
Danielv123 e2a795528f Change name from slaveID to instanceID for consistency accross endpoints 2017-11-21 21:39:41 +01:00
Danielv123 dcd46acdf2 resolves #57, issue was related to the way DDRs dole factor works.
I hope it works at least.
2017-09-12 09:13:52 +02:00
Danielv123 5de0b6319c Error message when started without instanceName
And some test coverage
2017-06-20 20:05:54 +02:00
Danielv123 e6da33582c Cleanup, more coverage 2017-06-17 17:40:46 +02:00
Danielv123 d2f122936e Tests for handleInventory(), 93% avg coverage 2017-06-17 17:24:24 +02:00
Danielv123 2a1badf7cb Lots of tests 2017-06-15 17:14:29 +02:00
Danielv123 8ee3109fbc NPM5.0.1, housekeeping 2017-06-15 17:14:01 +02:00
Danielv123 fdf8a4b4b1 Housekeeping 2017-06-14 21:52:38 +02:00
Danielv123 c4ead8c699 Working inventory imports resolves #50 2017-06-14 21:46:30 +02:00
Danielv123 c24cb51f13 . 2017-06-09 06:58:06 +02:00
Danielv123 0ada84e153 #50 nearing completion, needs taping together and testing
Includes great unit test coverage (npm run cover reports ~85%)
2017-06-07 20:40:03 +02:00
Danielv123 00dd22e59f Slight improvements to existing tests 2017-06-07 20:33:20 +02:00
Danielv123 dbf209de61 Tests, 90% coverage 2017-06-06 11:12:05 +02:00
Danielv123 a7fcde60b8 Reporting for multiple players 2017-06-06 10:45:44 +02:00
Danielv123 6466e12504 working on multi player reports 2017-06-05 12:52:40 +02:00
Danielv123 53cd6c846a inventoryImport now reads inventory successfully 2017-06-03 15:07:26 +02:00
Danielv123 18a40ca806 More lua experimenting 2017-06-02 22:29:28 +02:00
Danielv123 103f01b6a2 inventory reports, work on #50 2017-06-01 13:25:59 +02:00