From 29fbb8fc17455d73983e3b5024c633d1de0c9e77 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 17 Jun 2018 23:15:25 +0100 Subject: [PATCH] Some more messing around with testing fsm --- factorioSoftmodManager.db | Bin 45056 -> 73728 bytes .../ExpGamingCore.Commands@4.0.0.json | 21 + jsonDownloads/ExpGamingCore.Gui@4.0.0.json | 24 ++ .../ExpGamingCore.Ranking@4.0.0.json | 24 ++ jsonDownloads/ExpGamingCore.Server@4.0.0.json | 26 ++ jsonDownloads/ExpGamingCore.Sync@4.0.0.json | 25 ++ jsonDownloads/ExpGamingCore@4.0.0.json | 139 ++++++ jsonDownloads/ExpGamingLib@4.0.0.json | 19 + jsonDownloads/ExpGamingScenario@0.16.51.json | 13 + .../FactorioModGui@1.0.0.json | 7 +- jsonDownloads/FactorioStdLib.Color@0.8.0.json | 15 + jsonDownloads/FactorioStdLib.Game@0.8.0.json | 15 + .../FactorioStdLib.String@0.8.0.json | 15 + jsonDownloads/FactorioStdLib.Table@0.8.0.json | 15 + jsonDownloads/FactorioStdLib.Time@0.8.0.json | 15 + jsonDownloads/FactorioStdLib@0.8.0.json | 93 ++++ modules/ExpGamingCore/Commands/softmod.json | 21 + modules/ExpGamingCore/Gui/softmod.json | 24 ++ modules/ExpGamingCore/Ranking/softmod.json | 24 ++ modules/ExpGamingCore/Server/softmod.json | 26 ++ modules/ExpGamingCore/Sync/softmod.json | 25 ++ modules/ExpGamingCore/softmod.json | 3 +- modules/ExpGamingLib/softmod.json | 8 +- modules/FactorioModGui/control.lua | 8 - modules/FactorioStdLib/Color/control.lua | 232 ---------- modules/FactorioStdLib/Game/control.lua | 110 ----- modules/FactorioStdLib/LICENSE | 15 - modules/FactorioStdLib/String/control.lua | 86 ---- modules/FactorioStdLib/Table/control.lua | 397 ------------------ modules/FactorioStdLib/Time/control.lua | 33 -- modules/FactorioStdLib/softmod.json | 49 ++- modules/index.lua | 6 - 32 files changed, 634 insertions(+), 899 deletions(-) create mode 100644 jsonDownloads/ExpGamingCore.Commands@4.0.0.json create mode 100644 jsonDownloads/ExpGamingCore.Gui@4.0.0.json create mode 100644 jsonDownloads/ExpGamingCore.Ranking@4.0.0.json create mode 100644 jsonDownloads/ExpGamingCore.Server@4.0.0.json create mode 100644 jsonDownloads/ExpGamingCore.Sync@4.0.0.json create mode 100644 jsonDownloads/ExpGamingCore@4.0.0.json create mode 100644 jsonDownloads/ExpGamingLib@4.0.0.json create mode 100644 jsonDownloads/ExpGamingScenario@0.16.51.json rename modules/FactorioModGui/softmod.json => jsonDownloads/FactorioModGui@1.0.0.json (80%) create mode 100644 jsonDownloads/FactorioStdLib.Color@0.8.0.json create mode 100644 jsonDownloads/FactorioStdLib.Game@0.8.0.json create mode 100644 jsonDownloads/FactorioStdLib.String@0.8.0.json create mode 100644 jsonDownloads/FactorioStdLib.Table@0.8.0.json create mode 100644 jsonDownloads/FactorioStdLib.Time@0.8.0.json create mode 100644 jsonDownloads/FactorioStdLib@0.8.0.json create mode 100644 modules/ExpGamingCore/Commands/softmod.json create mode 100644 modules/ExpGamingCore/Gui/softmod.json create mode 100644 modules/ExpGamingCore/Ranking/softmod.json create mode 100644 modules/ExpGamingCore/Server/softmod.json create mode 100644 modules/ExpGamingCore/Sync/softmod.json delete mode 100644 modules/FactorioModGui/control.lua delete mode 100644 modules/FactorioStdLib/Color/control.lua delete mode 100644 modules/FactorioStdLib/Game/control.lua delete mode 100644 modules/FactorioStdLib/LICENSE delete mode 100644 modules/FactorioStdLib/String/control.lua delete mode 100644 modules/FactorioStdLib/Table/control.lua delete mode 100644 modules/FactorioStdLib/Time/control.lua diff --git a/factorioSoftmodManager.db b/factorioSoftmodManager.db index 2ef3b4b7bcf6c4a4a13e086ac9836c853520f9da..57c65d0f10046d9d3cddf8f349dea4163fc40797 100644 GIT binary patch literal 73728 zcmeHQ&2t;al?OyeA|1+dQnlt`FI{k{ER{qINSZVWCsGiKRuGdkLsHsky^=Y=G{BJt zGw^(nVqA9BQUsjXSJ%d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b050 --- /dev/null +++ b/jsonDownloads/ExpGamingCore.Commands@4.0.0.json @@ -0,0 +1,21 @@ +{ + "name": "Commands", + "module": "commands", + "description": "A better command handler than the base game.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Commands" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Commands.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0" + } +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingCore.Gui@4.0.0.json b/jsonDownloads/ExpGamingCore.Gui@4.0.0.json new file mode 100644 index 00000000..3b35c04b --- /dev/null +++ b/jsonDownloads/ExpGamingCore.Gui@4.0.0.json @@ -0,0 +1,24 @@ +{ + "name": "Gui", + "module": "Gui", + "description": "Adds a objective version to custom guis.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Gui", + "ExpGui" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Gui.zip", + "dependencies": { + "FactorioModGui": "^1.0.0", + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Server": "?^4.0.0" + } +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingCore.Ranking@4.0.0.json b/jsonDownloads/ExpGamingCore.Ranking@4.0.0.json new file mode 100644 index 00000000..5f499ee5 --- /dev/null +++ b/jsonDownloads/ExpGamingCore.Ranking@4.0.0.json @@ -0,0 +1,24 @@ +{ + "name": "Ranking", + "module": "Ranking", + "description": "A full ranking system for factorio.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Ranking", + "Ranks", + "Permissions", + "Roles" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Ranking.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Server": "?^4.0.0" + } +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingCore.Server@4.0.0.json b/jsonDownloads/ExpGamingCore.Server@4.0.0.json new file mode 100644 index 00000000..1fd40d43 --- /dev/null +++ b/jsonDownloads/ExpGamingCore.Server@4.0.0.json @@ -0,0 +1,26 @@ +{ + "name": "Server", + "module": "Server", + "description": "Adds a thread system and event listening and a admin bypass (recommend to disable /c and use optional /interface)", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Server", + "Thread", + "Interface", + "Events" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Server.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.String": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Commands": "?^4.0.0" + } +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingCore.Sync@4.0.0.json b/jsonDownloads/ExpGamingCore.Sync@4.0.0.json new file mode 100644 index 00000000..3220ea30 --- /dev/null +++ b/jsonDownloads/ExpGamingCore.Sync@4.0.0.json @@ -0,0 +1,25 @@ +{ + "name": "Sync", + "module": "Sync", + "description": "Allows syncing with an outside server and info panle.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Info", + "Sync", + "External", + "Discord" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Sync.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Gui": "?^4.0.0" + } +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingCore@4.0.0.json b/jsonDownloads/ExpGamingCore@4.0.0.json new file mode 100644 index 00000000..489d4c58 --- /dev/null +++ b/jsonDownloads/ExpGamingCore@4.0.0.json @@ -0,0 +1,139 @@ +{ + "name": "ExpGamingCore", + "version": "4.0.0", + "module": "Collection", + "description": "Explosive Gaming Core Files", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.zip", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core" + ], + "author": "Cooldude2606", + "contact": "Discord: Cooldude2606#5241", + "license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE", + "submodules": { + "Commands": { + "name": "Commands", + "module": "commands", + "description": "A better command handler than the base game.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Commands" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Commands.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0" + } + }, + "Gui": { + "name": "Gui", + "module": "Gui", + "description": "Adds a objective version to custom guis.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Gui", + "ExpGui" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Gui.zip", + "dependencies": { + "FactorioModGui": "^1.0.0", + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Server": "?^4.0.0" + } + }, + "Ranking": { + "name": "Ranking", + "module": "Ranking", + "description": "A full ranking system for factorio.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Ranking", + "Ranks", + "Permissions", + "Roles" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Ranking.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Server": "?^4.0.0" + } + }, + "Server": { + "name": "Server", + "module": "Server", + "description": "Adds a thread system and event listening and a admin bypass (recommend to disable /c and use optional /interface)", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Server", + "Thread", + "Interface", + "Events" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Server.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.String": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Commands": "?^4.0.0" + } + }, + "Sync": { + "name": "Sync", + "module": "Sync", + "description": "Allows syncing with an outside server and info panle.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Info", + "Sync", + "External", + "Discord" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Sync.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Gui": "?^4.0.0" + } + } + }, + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingLib@4.0.0.json b/jsonDownloads/ExpGamingLib@4.0.0.json new file mode 100644 index 00000000..ccfaef9e --- /dev/null +++ b/jsonDownloads/ExpGamingLib@4.0.0.json @@ -0,0 +1,19 @@ +{ + "name": "ExpGamingLib", + "module": "GlobalLib", + "description": "Adds some common functions used though out all ExpGaming modules", + "keywords": [ + "ExpGaming", + "Lib" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingLib.zip", + "dependencies": { + "FactorioStdLib.Game": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0" + }, + "author": "Cooldude2606", + "contact": "Discord: Cooldude2606#5241", + "license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE" +} \ No newline at end of file diff --git a/jsonDownloads/ExpGamingScenario@0.16.51.json b/jsonDownloads/ExpGamingScenario@0.16.51.json new file mode 100644 index 00000000..bea27079 --- /dev/null +++ b/jsonDownloads/ExpGamingScenario@0.16.51.json @@ -0,0 +1,13 @@ +{ + "name": "ExpGamingScenario", + "version": "0.16.51", + "module": "Scenario", + "description": "Explosive gaming's factorio secenario ran on every public server", + "modules": { + "ExpGamingCore": "^4.0.0", + "ExpGamingLib": "^4.0.0", + "FactorioModGui": "^1.0.0", + "FactorioStdLib": "^0.8.0" + }, + "dependencies": {} +} \ No newline at end of file diff --git a/modules/FactorioModGui/softmod.json b/jsonDownloads/FactorioModGui@1.0.0.json similarity index 80% rename from modules/FactorioModGui/softmod.json rename to jsonDownloads/FactorioModGui@1.0.0.json index b42b7844..a5d52238 100644 --- a/modules/FactorioModGui/softmod.json +++ b/jsonDownloads/FactorioModGui@1.0.0.json @@ -2,7 +2,12 @@ "name": "FactorioModGui", "module": "mod_gui", "description": "A way to standadise the way mods hanndle their guis.", - "keywords": ["Factorio","Gui","Non-Download","Included"], + "keywords": [ + "Factorio", + "Gui", + "Non-Download", + "Included" + ], "version": "1.0.0", "location": "url", "dependencies": {}, diff --git a/jsonDownloads/FactorioStdLib.Color@0.8.0.json b/jsonDownloads/FactorioStdLib.Color@0.8.0.json new file mode 100644 index 00000000..bdf1c0aa --- /dev/null +++ b/jsonDownloads/FactorioStdLib.Color@0.8.0.json @@ -0,0 +1,15 @@ +{ + "name": "Color", + "module": "Color", + "description": "A defines module for retrieving colors by name.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Color", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/FactorioStdLib.Game@0.8.0.json b/jsonDownloads/FactorioStdLib.Game@0.8.0.json new file mode 100644 index 00000000..cfb47f58 --- /dev/null +++ b/jsonDownloads/FactorioStdLib.Game@0.8.0.json @@ -0,0 +1,15 @@ +{ + "name": "Game", + "module": "Game", + "description": "The game module.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Game", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/FactorioStdLib.String@0.8.0.json b/jsonDownloads/FactorioStdLib.String@0.8.0.json new file mode 100644 index 00000000..a6098aba --- /dev/null +++ b/jsonDownloads/FactorioStdLib.String@0.8.0.json @@ -0,0 +1,15 @@ +{ + "name": "String", + "module": "string", + "description": "Extends Lua 5.2 string.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "String", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/FactorioStdLib.Table@0.8.0.json b/jsonDownloads/FactorioStdLib.Table@0.8.0.json new file mode 100644 index 00000000..305f60fd --- /dev/null +++ b/jsonDownloads/FactorioStdLib.Table@0.8.0.json @@ -0,0 +1,15 @@ +{ + "name": "Table", + "module": "table", + "description": "Extends Lua 5.2 table.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Table", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/FactorioStdLib.Time@0.8.0.json b/jsonDownloads/FactorioStdLib.Time@0.8.0.json new file mode 100644 index 00000000..cc19ce8b --- /dev/null +++ b/jsonDownloads/FactorioStdLib.Time@0.8.0.json @@ -0,0 +1,15 @@ +{ + "name": "Time", + "module": "Time", + "description": "A defines module for retrieving the number of ticks in 1 unit of time.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Time", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} +} \ No newline at end of file diff --git a/jsonDownloads/FactorioStdLib@0.8.0.json b/jsonDownloads/FactorioStdLib@0.8.0.json new file mode 100644 index 00000000..cfbee2c4 --- /dev/null +++ b/jsonDownloads/FactorioStdLib@0.8.0.json @@ -0,0 +1,93 @@ +{ + "name": "FactorioStdLib", + "module": "Collection", + "description": "Factorio Standard Library Projects", + "keywords": [ + "Standard Library", + "Lib", + "StdLib" + ], + "version": "0.8.0", + "location": "url", + "submodules": { + "Color": { + "name": "Color", + "module": "Color", + "description": "A defines module for retrieving colors by name.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Color", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} + }, + "Game": { + "name": "Game", + "module": "Game", + "description": "The game module.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Game", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} + }, + "String": { + "name": "String", + "module": "string", + "description": "Extends Lua 5.2 string.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "String", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} + }, + "Table": { + "name": "Table", + "module": "table", + "description": "Extends Lua 5.2 table.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Table", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} + }, + "Time": { + "name": "Time", + "module": "Time", + "description": "A defines module for retrieving the number of ticks in 1 unit of time.", + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Time", + "Extends" + ], + "version": "0.8.0", + "location": "url", + "dependencies": {} + } + }, + "author": "Afforess", + "contact": "https://github.com/Afforess/Factorio-Stdlib/issues", + "license": "https://github.com/Afforess/Factorio-Stdlib/blob/master/LICENSE", + "dependencies": {} +} \ No newline at end of file diff --git a/modules/ExpGamingCore/Commands/softmod.json b/modules/ExpGamingCore/Commands/softmod.json new file mode 100644 index 00000000..5f90b050 --- /dev/null +++ b/modules/ExpGamingCore/Commands/softmod.json @@ -0,0 +1,21 @@ +{ + "name": "Commands", + "module": "commands", + "description": "A better command handler than the base game.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Commands" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Commands.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0" + } +} \ No newline at end of file diff --git a/modules/ExpGamingCore/Gui/softmod.json b/modules/ExpGamingCore/Gui/softmod.json new file mode 100644 index 00000000..3b35c04b --- /dev/null +++ b/modules/ExpGamingCore/Gui/softmod.json @@ -0,0 +1,24 @@ +{ + "name": "Gui", + "module": "Gui", + "description": "Adds a objective version to custom guis.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Gui", + "ExpGui" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Gui.zip", + "dependencies": { + "FactorioModGui": "^1.0.0", + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Server": "?^4.0.0" + } +} \ No newline at end of file diff --git a/modules/ExpGamingCore/Ranking/softmod.json b/modules/ExpGamingCore/Ranking/softmod.json new file mode 100644 index 00000000..5f499ee5 --- /dev/null +++ b/modules/ExpGamingCore/Ranking/softmod.json @@ -0,0 +1,24 @@ +{ + "name": "Ranking", + "module": "Ranking", + "description": "A full ranking system for factorio.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Ranking", + "Ranks", + "Permissions", + "Roles" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Ranking.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Server": "?^4.0.0" + } +} \ No newline at end of file diff --git a/modules/ExpGamingCore/Server/softmod.json b/modules/ExpGamingCore/Server/softmod.json new file mode 100644 index 00000000..1fd40d43 --- /dev/null +++ b/modules/ExpGamingCore/Server/softmod.json @@ -0,0 +1,26 @@ +{ + "name": "Server", + "module": "Server", + "description": "Adds a thread system and event listening and a admin bypass (recommend to disable /c and use optional /interface)", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Server", + "Thread", + "Interface", + "Events" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Server.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Table": "^0.8.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.String": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Commands": "?^4.0.0" + } +} \ No newline at end of file diff --git a/modules/ExpGamingCore/Sync/softmod.json b/modules/ExpGamingCore/Sync/softmod.json new file mode 100644 index 00000000..3220ea30 --- /dev/null +++ b/modules/ExpGamingCore/Sync/softmod.json @@ -0,0 +1,25 @@ +{ + "name": "Sync", + "module": "Sync", + "description": "Allows syncing with an outside server and info panle.", + "keywords": [ + "Library", + "Lib", + "ExpGaming", + "Core", + "Info", + "Sync", + "External", + "Discord" + ], + "version": "4.0.0", + "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingCore.Sync.zip", + "dependencies": { + "ExpGamingLib": "^4.0.0", + "FactorioStdLib.Color": "^0.8.0", + "FactorioStdLib.Game": "^0.8.0", + "FactorioStdLib.Table": "^0.8.0", + "ExpGamingCore.Ranking": "?^4.0.0", + "ExpGamingCore.Gui": "?^4.0.0" + } +} \ No newline at end of file diff --git a/modules/ExpGamingCore/softmod.json b/modules/ExpGamingCore/softmod.json index a0d96d89..489d4c58 100644 --- a/modules/ExpGamingCore/softmod.json +++ b/modules/ExpGamingCore/softmod.json @@ -134,5 +134,6 @@ "ExpGamingCore.Gui": "?^4.0.0" } } - } + }, + "dependencies": {} } \ No newline at end of file diff --git a/modules/ExpGamingLib/softmod.json b/modules/ExpGamingLib/softmod.json index e062ca96..ccfaef9e 100644 --- a/modules/ExpGamingLib/softmod.json +++ b/modules/ExpGamingLib/softmod.json @@ -2,7 +2,10 @@ "name": "ExpGamingLib", "module": "GlobalLib", "description": "Adds some common functions used though out all ExpGaming modules", - "keywords": ["ExpGaming","Lib"], + "keywords": [ + "ExpGaming", + "Lib" + ], "version": "4.0.0", "location": "https://github.com/explosivegaming/scenario/releases/download/v4.0-core/ExpGamingLib.zip", "dependencies": { @@ -13,5 +16,4 @@ "author": "Cooldude2606", "contact": "Discord: Cooldude2606#5241", "license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE" -} - \ No newline at end of file +} \ No newline at end of file diff --git a/modules/FactorioModGui/control.lua b/modules/FactorioModGui/control.lua deleted file mode 100644 index 1f3bbf83..00000000 --- a/modules/FactorioModGui/control.lua +++ /dev/null @@ -1,8 +0,0 @@ --- not_luadoc=true ---- Redirect to factorio mod-gui --- @module Factorio Mod Gui --- @alias mod_gui --- @author Factorio Dev Team - --- redirect to normal require of mod gui -return require("mod-gui") \ No newline at end of file diff --git a/modules/FactorioStdLib/Color/control.lua b/modules/FactorioStdLib/Color/control.lua deleted file mode 100644 index 9ccedbc5..00000000 --- a/modules/FactorioStdLib/Color/control.lua +++ /dev/null @@ -1,232 +0,0 @@ ---- A defines module for retrieving colors by name. --- Extends the Factorio defines table. --- @module StdLib.Color --- @alias defines.color - --- defines table is automatically required in all mod loading stages. --- luacheck: ignore 122/defines --- Ignore assigning to read only defines table. defines table is not ready only, however --- marking it this way allows warnings to be generated when trying to assign values - -defines = defines or {} --luacheck: ignore defines (This is used for testing locally) - ---- A table of colors allowing retrieval by color name. --- @table defines.color --- @field white {r=1.00,g=1.00,b=1.00} --- @field black {r=0.00,g=0.00,b=0.00} --- @field darkgrey {r=0.25,g=0.25,b=0.25} --- @field grey {r=0.50,g=0.50,b=0.50} --- @field lightgrey {r=0.75,g=0.75,b=0.75} --- @field red {r=1.00,g=0.00,b=0.00} --- @field darkred {r=0.50,g=0.00,b=0.00} --- @field lightred {r=1.00,g=0.50,b=0.50} --- @field green {r=0.00,g=1.00,b=0.00} --- @field darkgreen {r=0.00,g=0.50,b=0.00} --- @field lightgreen {r=0.50,g=1.00,b=0.50} --- @field blue {r=0.00,g=0.00,b=1.00} --- @field darkblue {r=0.00,g=0.00,b=0.50} --- @field lightblue {r=0.50,g=0.50,b=1.00} --- @field orange {r=1.00,g=0.55,b=0.10} --- @field yellow {r=1.00,g=1.00,b=0.00} --- @field pink {r=1.00,g=0.00,b=1.00} --- @field purple {r=0.60,g=0.10,b=0.60} --- @field brown {r=0.60,g=0.40,b=0.10} -defines.color = { - white={r=1.00,g=1.00,b=1.00}, - black={r=0.00,g=0.00,b=0.00}, - darkgrey={r=0.25,g=0.25,b=0.25}, - grey={r=0.50,g=0.50,b=0.50}, - lightgrey={r=0.75,g=0.75,b=0.75}, - red={r=1.00,g=0.00,b=0.00}, - darkred={r=0.50,g=0.00,b=0.00}, - lightred={r=1.00,g=0.50,b=0.50}, - green={r=0.00,g=1.00,b=0.00}, - darkgreen={r=0.00,g=0.50,b=0.00}, - lightgreen={r=0.50,g=1.00,b=0.50}, - blue={r=0.00,g=0.00,b=1.00}, - darkblue={r=0.00,g=0.00,b=0.50}, - lightblue={r=0.50,g=0.50,b=1.00}, - orange={r=1.00,g=0.55,b=0.10}, - yellow={r=1.00,g=1.00,b=0.00}, - pink={r=1.00,g=0.00,b=1.00}, - purple={r=0.60,g=0.10,b=0.60}, - brown={r=0.60,g=0.40,b=0.10} -} -local colors = defines.color - ---- Returns white for dark colors or black for lighter colors. --- @table defines.anticolor -defines.anticolor = { - green = colors.black, -- defines.color.black - grey = colors.black, -- defines.color.black - lightblue = colors.black, -- defines.color.black - lightgreen = colors.black, -- defines.color.black - lightgrey = colors.black, -- defines.color.black - lightred = colors.black, -- defines.color.black - orange = colors.black, -- defines.color.black - white = colors.black, -- defines.color.black - yellow = colors.black, -- defines.color.black - black = colors.white, -- defines.color.white - blue = colors.white, -- defines.color.white - brown = colors.white, -- defines.color.white - darkblue = colors.white, -- defines.color.white - darkgreen = colors.white, -- defines.color.white - darkgrey = colors.white, -- defines.color.white - darkred = colors.white, -- defines.color.white - pink = colors.white, -- defines.color.white - purple = colors.white, -- defines.color.white - red = colors.white -- defines.color.white -} - ---- Returns a lighter color of a named color --- @table defines.lightcolor -defines.lightcolor = { - white = colors.lightgrey, -- defines.color.lightgrey - grey = colors.darkgrey, -- defines.color.darkgrey - lightgrey = colors.grey, -- defines.color.grey - red = colors.lightred, -- defines.color.lightred - green = colors.lightgreen, -- defines.color.lightgreen - blue = colors.lightblue, -- defines.color.lightblue - yellow = colors.orange, -- defines.color.orange - pink = colors.purple -- defines.color.purple -} - --- added by cooldude260 - ---- Returns a lighter color of a named color. --- @table defines.textcolor --- @field info {r=0.21,g=0.95,b=1.00} --- @field bg {r=0.00,g=0.00,b=0.00} --- @field low {r=0.18,g=0.77,b=0.18} --- @field med {r=1.00,g=0.89,b=0.26} --- @field high {r=1.00,g=0.33,b=0.00} --- @field crit {r=1.00,g=0.00,b=0.00} -defines.textcolor = { - info={r=0.21,g=0.95,b=1.00}, - bg={r=0.00,g=0.00,b=0.00}, - low={r=0.18,g=0.77,b=0.18}, - med={r=1.00,g=0.89,b=0.26}, - high={r=1.00,g=0.33,b=0.00}, - crit={r=1.00,g=0.00,b=0.00} -} - --- metatable remade by cooldude -local _mt = { - __index=function(tbl,key) - return rawget(tbl,tostring(key):lower()) or rawget(defines.color,'white') - end, - __pairs=function(tbl) - return function() - local v - k, v = next(tbl, k) - return k, (v and {r = v['r'], g = v['g'], b = v['b'], a = v['a']}) or nil - end, tbl, nil - end, - __eq=function(tbl1,tbl2) - return tbl1.r == tbl2.r and tbl1.g == tbl2.g and tbl1.b == tbl2.b and tbl1.a == tbl2.a - end -} - -setmetatable(defines.color, _mt) -setmetatable(defines.anticolor, _mt) -setmetatable(defines.textcolor, _mt) -setmetatable(defines.lightcolor, _mt) - -local Color = {} --luacheck: allow defined top - ---- Set a value for the alpha channel in the given color table. --- `color.a` represents the alpha channel in the given color table. ---
    ---
  • If ***alpha*** is given, set `color.a` to it. ---
  • If ***alpha*** is not given, and if the given color table does not have a value for `color.a`, set `color.a` to 1. ---
  • If ***alpha*** is not given, and if the given color table already has a value for `color.a`, then leave `color.a` alone. ---
--- @tparam[opt=white] defines.color|Concepts.Color color the color to configure --- @tparam[opt=1] float alpha the alpha value (*[0 - 1]*) to set for the given color --- @treturn a color table that has the specified value for the alpha channel -function Color.set(color, alpha) - color = color or defines.color.white - Color.to_table(color) - color.a = alpha or color.a or 1 - return color -end - ---- Converts a color in the array format to a color in the table format. --- @tparam table c_arr the color to convert --- @treturn a converted color — { r = c\_arr[1], g = c\_arr[2], b = c\_arr[3], a = c\_arr[4] } -function Color.to_table(c_arr) - if #c_arr > 0 then - return {r = c_arr[1], g = c_arr[2], b = c_arr[3], a = c_arr[4]} - end - return c_arr -end - ---- Converts a color in the rgb format to a color table --- @tparam[opt=0] int r 0-255 red --- @tparam[opt=0] int g 0-255 green --- @tparam[opt=0] int b 0-255 blue --- @tparam[opt=255] int a 0-255 alpha --- @treturn Concepts.Color -function Color.from_rgb(r, g, b, a) - r = r or 0 - g = g or 0 - b = b or 0 - a = a or 255 - return {r = r/255, g = g/255, b = b/255, a = a/255} -end - ---- Get a color table with a hexadecimal string. --- Optionally provide the value for the alpha channel. --- @tparam string hex hexadecimal color string (#ffffff, not #fff) --- @tparam[opt=1] float alpha the alpha value to set; such that ***[ 0 ⋜ value ⋜ 1 ]*** --- @treturn a color table with RGB converted from Hex and with alpha -function Color.from_hex(hex, alpha) - if not _G.Game then error('StdLib/Game not loaded') end - _G.Game.fail_if_missing(hex, "missing color hex value") - if hex:find("#") then hex = hex:sub(2) end - if not(#hex == 6) then error("invalid color hex value: "..hex) end - local number = tonumber(hex, 16) - return { - r = bit32.extract(number, 16, 8) / 255, - g = bit32.extract(number, 8, 8) / 255, - b = bit32.extract(number, 0, 8) / 255, - a = alpha or 1 - } -end - ---added by cooldude2606 - ---- Converts a color in the color table format to rgb --- @tparam table color the color to convert --- @treturn table the color as rgb -function Color.to_rgb(color) - local r = color.r or 0 - local g = color.g or 0 - local b = color.b or 0 - local a = color.a or 0.5 - return {r = r*255, g = g*255, b = b*255, a = a*255} -end - ---added by cooldude2606 - ---- Converts a color in the color table format to hex --- @tparam table color the color to convert --- @treturn string the color as hex -function Color.to_hex(color) - local hexadecimal = '0x' - for key, value in pairs{math.floor(color.r*255),math.floor(color.g*255),math.floor(color.b*255)} do - local hex = '' - while(value > 0)do - local index = math.fmod(value, 16) + 1 - value = math.floor(value / 16) - hex = string.sub('0123456789ABCDEF', index, index) .. hex - end - if string.len(hex) == 0 then hex = '00' - elseif string.len(hex) == 1 then hex = '0' .. hex - end - hexadecimal = hexadecimal .. hex - end - return hexadecimal -end - -return Color diff --git a/modules/FactorioStdLib/Game/control.lua b/modules/FactorioStdLib/Game/control.lua deleted file mode 100644 index 219b88f7..00000000 --- a/modules/FactorioStdLib/Game/control.lua +++ /dev/null @@ -1,110 +0,0 @@ ---- The game module. --- @module StdLib.Game - -local Game = { --luacheck: allow defined top - VALID_FILTER = function(v) - return v and v.valid - end, - _protect = function(module_name) - return { - __newindex = function() error("Attempt to mutatate read-only "..module_name.." Module") end, - __metatable = true - } - end, - _concat = function(lhs, rhs) - --Sanatize to remove address - return tostring(lhs):gsub("(%w+)%: %x+", "%1: (ADDR)") .. tostring(rhs):gsub("(%w+)%: %x+", "%1: (ADDR)") - end, - _rawstring = function (t) - local m = getmetatable(t) - local f = m.__tostring - m.__tostring = nil - local s = tostring(t) - m.__tostring = f - return s - end -} - --- No Doc --- This is a helper global and functions until .16 --- to set the name of your mod in control.lua set _stdlib_mod_name = 'name of your mod' --- luacheck: ignore _stdlib_mod_name -function Game.get_mod_name() - local ok, mod_name = pcall(function() return script.mod_name end) - return ok and mod_name or _stdlib_mod_name or "stdlib" -end - ---- Print msg if specified var evaluates to false. --- @tparam Mixed var variable to evaluate --- @tparam[opt="missing value"] string msg message -function Game.fail_if_missing(var, msg) - if not var then - error(msg or "Missing value", 3) - end - return false -end - ---- Return a valid player object from event, index, string, or userdata --- @tparam string|number|LuaPlayer|event mixed --- @treturn LuaPlayer a valid player or nil -function Game.get_player(mixed) - if type(mixed) == "table" then - if mixed.__self then - return mixed and mixed.valid and mixed - elseif mixed.player_index then - local player = game.players[mixed.player_index] - return player and player.valid and player - end - elseif mixed then - local player = game.players[mixed] - if type(mixed) == "string" and tonumber(mixed) then - for _, p in pairs(game.players) do - if p.name == mixed then - player = p - break - end - end - end - return player and player.valid and player - end -end - ---- Return a valid force object from event, string, or userdata --- @tparam string|LuaForce|event mixed --- @treturn LuaForce a valid force or nil -function Game.get_force(mixed) - if type(mixed) == "table" then - if mixed.__self then - return mixed and mixed.valid and mixed - elseif mixed.force then - return Game.get_force(mixed.force) - end - elseif type(mixed) == "string" then - local force = game.forces[mixed] - return (force and force.valid) and force - end -end - ---- Messages all players currently connected to the game. ---> Offline players are not counted as having received the message. --- If no players exist msg is stored in the `global._print_queue` table. --- @tparam string msg the message to send to players --- @tparam[opt] ?|nil|boolean condition the condition to be true for a player to be messaged --- @treturn uint the number of players who received the message. -function Game.print_all(msg, condition) - local num = 0 - if #game.players > 0 then - for _, player in pairs(game.players) do - if condition == nil or select(2, pcall(condition, player)) then - player.print(msg) - num = num + 1 - end - end - return num - else - global._print_queue = global._print_queue or {} - global._print_queue[#global._print_queue + 1] = msg - end -end - -return Game diff --git a/modules/FactorioStdLib/LICENSE b/modules/FactorioStdLib/LICENSE deleted file mode 100644 index 3f57599c..00000000 --- a/modules/FactorioStdLib/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -This is the license of Factorio-Stdlib: https://github.com/Afforess/Factorio-Stdlib/blob/master/LICENSE - -Copyright (c) 2016, Afforess - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/modules/FactorioStdLib/String/control.lua b/modules/FactorioStdLib/String/control.lua deleted file mode 100644 index 24ff26ad..00000000 --- a/modules/FactorioStdLib/String/control.lua +++ /dev/null @@ -1,86 +0,0 @@ ---- Extends Lua 5.2 string. --- @module StdLib.String --- @alias string - --- luacheck: globals string (Allow mutating string) - ---- Returns a copy of the string with any leading or trailing whitespace from the string removed. --- @tparam string s the string to remove leading or trailing whitespace from --- @treturn string a copy of the string without leading or trailing whitespace -function string.trim(s) - return (s:gsub("^%s*(.-)%s*$", "%1")) -end - ---- Tests if a string starts with a given substring. --- @tparam string s the string to check for the start substring --- @tparam string start the substring to test for --- @treturn boolean true if the start substring was found in the string -function string.starts_with(s, start) - return string.find(s, start, 1, true) == 1 -end - ---- Tests if a string ends with a given substring. --- @tparam string s the string to check for the end substring --- @tparam string ends the substring to test for --- @treturn boolean true if the end substring was found in the string -function string.ends_with(s, ends) - return #s >= #ends and string.find(s, ends, #s - #ends + 1, true) and true or false -end - ---- Tests if a string contains a given substring. --- @tparam string s the string to check for the substring --- @tparam string contains the substring to test for --- @treturn boolean true if the substring was found in the string -function string.contains(s, contains) - return s and string.find(s, contains) ~= nil -end - ---- Tests whether a string is empty. --- @tparam string s the string to test --- @treturn boolean true if the string is empty -function string.is_empty(s) - return s == nil or s == '' -end - ---- Splits a string into an array. --- *Note:* Empty split substrings are not included in the resulting table. ---

For example, `string.split("foo.bar...", ".", false)` results in the table `{"foo", "bar"}`. --- @tparam string s the string to split --- @tparam[opt="."] string sep the separator to use. --- @tparam[opt=false] boolean pattern whether to interpret the separator as a lua pattern or plaintext for the string split --- @treturn {string,...} an array of strings -function string.split(s, sep, pattern) - sep = sep or "." - sep = sep ~= "" and sep or "." - sep = not pattern and string.gsub(sep, "([^%w])", "%%%1") or sep - - local fields = {} - local start_idx, end_idx = string.find(s, sep) - local last_find = 1 - while start_idx do - local substr = string.sub(s, last_find, start_idx - 1) - if string.len(substr) > 0 then - table.insert(fields, string.sub(s, last_find, start_idx - 1)) - end - last_find = end_idx + 1 - start_idx, end_idx = string.find(s, sep, end_idx + 1) - end - local substr = string.sub(s, last_find) - if string.len(substr) > 0 then - table.insert(fields, string.sub(s, last_find)) - end - return fields -end - --- added by cooldude2606 ---- Returns a string as a hex format (also a string) --- @usage a = 'foo' --- string.to_hex(a) -- return '666f6f' --- @tparam string str the string to encode --- @treturn string the hex format of the string -function string.to_hex(str) - if not is_type(str,'string') then return '' end - return str:gsub('.',function (c) - return string.format('%02X',string.byte(c)) - end) -end \ No newline at end of file diff --git a/modules/FactorioStdLib/Table/control.lua b/modules/FactorioStdLib/Table/control.lua deleted file mode 100644 index c79655a2..00000000 --- a/modules/FactorioStdLib/Table/control.lua +++ /dev/null @@ -1,397 +0,0 @@ ---- Extends Lua 5.2 table. --- @module StdLib.Table --- @alias table - --- luacheck: globals table (Allow mutating global table) - ---- Given a mapping function, creates a transformed copy of the table ---- by calling the function for each element in the table, and using ---- the result as the new value for the key. Passes the index as second argument to the function. ---- @usage a= { 1, 2, 3, 4, 5} ----table.map(a, function(v) return v * 10 end) --produces: { 10, 20, 30, 40, 50 } ---- @usage a = {1, 2, 3, 4, 5} ----table.map(a, function(v, k, x) return v * k + x end, 100) --produces { 101, 104, 109, 116, 125} --- @tparam table tbl the table to be mapped to the transform --- @tparam function func the function to transform values --- @param[opt] ... additional arguments passed to the function --- @treturn table a new table containing the keys and mapped values -function table.map(tbl, func, ...) - local newtbl = {} - for i, v in pairs(tbl) do - newtbl[i] = func(v, i, ...) - end - return newtbl -end - ---- Given a filter function, creates a filtered copy of the table ---- by calling the function for each element in the table, and ---- filtering out any key-value pairs for non-true results. Passes the index as second argument to the function. ---- @usage a= { 1, 2, 3, 4, 5} ----table.filter(a, function(v) return v % 2 == 0 end) --produces: { 2, 4 } ---- @usage a = {1, 2, 3, 4, 5} ----table.filter(a, function(v, k, x) return k % 2 == 1 end) --produces: { 1, 3, 5 } --- @tparam table tbl the table to be filtered --- @tparam function func the function to filter values --- @param[opt] ... additional arguments passed to the function --- @treturn table a new table containing the filtered key-value pairs -function table.filter(tbl, func, ...) - local newtbl = {} - local insert = #tbl > 0 - for k, v in pairs(tbl) do - if func(v, k, ...) then - if insert then table.insert(newtbl, v) - else newtbl[k] = v end - end - end - return newtbl -end - ---- Given a candidate search function, iterates over the table, calling the function ---- for each element in the table, and returns the first element the search function returned true. ---- Passes the index as second argument to the function. ---- @usage a= { 1, 2, 3, 4, 5} ----table.find(a, function(v) return v % 2 == 0 end) --produces: 2 ---- @usage a = {1, 2, 3, 4, 5} ----table.find(a, function(v, k, x) return k % 2 == 1 end) --produces: 1 --- @tparam table tbl the table to be searched --- @tparam function func the function to use to search for any matching element --- @param[opt] ... additional arguments passed to the function --- @treturn ?|nil|Mixed the first found value, or nil if none was found -function table.find(tbl, func, ...) - for k, v in pairs(tbl) do - if func(v, k, ...) then - return v, k - end - end - return nil -end - ---- Given a candidate search function, iterates over the table, calling the function --- for each element in the table, and returns true if search function returned true. --- Passes the index as second argument to the function. --- @usage a= { 1, 2, 3, 4, 5} table.any(a, function(v) return v % 2 == 0 end) --produces: true --- @usage a = {1, 2, 3, 4, 5} table.any(a, function(v, k, x) return k % 2 == 1 end) --produces: true --- @tparam table tbl the table to be searched --- @tparam function func the function to use to search for any matching element --- @param[opt] ... additional arguments passed to the function --- @treturn boolean true if an element was found, false if none was found -function table.any(tbl, func, ...) - return table.find(tbl, func, ...) ~= nil -end - ---- Given a function, apply it to each element in the table. --- Passes the index as the second argument to the function. ---

Iteration is aborted if the applied function returns true for any element during iteration. --- @usage --- a = {10, 20, 30, 40} --- table.each(a, function(v) game.print(v) end) --prints 10, 20, 30, 40, 50 --- @tparam table tbl the table to be iterated --- @tparam function func the function to apply to elements --- @param[opt] ... additional arguments passed to the function --- @treturn table the table where the given function has been applied to its elements -function table.each(tbl, func, ...) - for k, v in pairs(tbl) do - if func(v, k, ...) then - break - end - end - return tbl -end - ---- Returns a new array that is a one-dimensional recursive flattening of the given array. --- For every element that is an array, extract its elements into the new array. ---

The optional level argument determines the level of recursion to flatten. ---> This function flattens an integer-indexed array, but not an associative array. --- @tparam array tbl the array to be flattened --- @tparam[opt] uint level recursive levels, or no limit to recursion if not supplied --- @treturn array a new array that represents the flattened contents of the given array -function table.flatten(tbl, level) - local flattened = {} - table.each(tbl, - function(value) - if type(value) == "table" and #value > 0 then - if level then - if level > 0 then - table.merge(flattened, table.flatten(value, level - 1), true) - else - table.insert(flattened, value) - end - else - table.merge(flattened, table.flatten(value), true) - end - else - table.insert(flattened, value) - end - end - ) - return flattened -end - ---- Given an array, returns the first element or nil if no element exists. --- @tparam array tbl the array --- @treturn ?|nil|Mixed the first element -function table.first(tbl) - return tbl[1] -end - ---- Given an array, returns the last element or nil if no elements exist. --- @tparam array tbl the array --- @treturn ?|nil|Mixed the last element or nil -function table.last(tbl) - local size = #tbl - if size == 0 then return nil end - return tbl[size] -end - ---- Given an array of only numeric values, returns the minimum or nil if no element exists. --- @tparam {number,...} tbl the array with only numeric values --- @treturn ?|nil|number the minimum value -function table.min(tbl) - if #tbl == 0 then return nil end - - local min = tbl[1] - for _, num in pairs(tbl) do - min = num < min and num or min - end - return min -end - ----Given an array of only numeric values, returns the maximum or nil if no element exists. --- @tparam {number,...} tbl the array with only numeric values --- @treturn ?|nil|number the maximum value -function table.max(tbl) - if #tbl == 0 then return nil end - - local max = tbl[1] - for _, num in pairs(tbl) do - max = num > max and num or max - end - return max -end - ---- Given an array of only numeric values, return the sum of all values, or 0 for empty arrays. --- @tparam {number,...} tbl the array with only numeric values --- @treturn number the sum of the numbers or zero if the given array was empty -function table.sum(tbl) - local sum = 0 - for _, num in pairs(tbl) do - sum = sum + num - end - return sum -end - ---- Given an array of only numeric values, returns the average or nil if no element exists. --- @tparam {number,...} tbl the array with only numeric values --- @treturn ?|nil|number the average value -function table.avg(tbl) - local cnt = #tbl - return cnt ~= 0 and table.sum(tbl) / cnt or nil -end - ---- Merges two tables — values from first get overwritten by the second. ---- @usage --- function some_func(x, y, args) --- args = table.merge({option1=false}, args) --- if opts.option1 == true then return x else return y end --- end --- some_func(1,2) -- returns 2 --- some_func(1,2,{option1=true}) -- returns 1 --- @tparam table tblA first table --- @tparam table tblB second table --- @tparam[opt=false] boolean array_merge set to true to merge the tables as an array or false for an associative array --- @treturn array|table an array or an associated array where tblA and tblB have been merged -function table.merge(tblA, tblB, array_merge) - if not tblB then - return tblA - end - if array_merge then - for _, v in pairs(tblB) do - table.insert(tblA, v) - end - - else - for k, v in pairs(tblB) do - tblA[k] = v - end - end - return tblA -end - --- copied from factorio/data/core/luablib/util.lua - ---- Creates a deep copy of table without copying Factorio objects. --- @usage local copy = table.deepcopy[data.raw.["stone-furnace"]["stone-furnace"]] -- returns a copy of the stone furnace entity --- @tparam table object the table to copy --- @treturn table a copy of the table -function table.deepcopy(object) - local lookup_table = {} - local function _copy(this_object) - if type(this_object) ~= "table" then - return this_object - elseif this_object.__self then - return this_object - elseif lookup_table[this_object] then - return lookup_table[this_object] - end - local new_table = {} - lookup_table[this_object] = new_table - for index, value in pairs(this_object) do - new_table[_copy(index)] = _copy(value) - end - return setmetatable(new_table, getmetatable(this_object)) - end - return _copy(object) -end - ---- Returns a copy of all of the values in the table. --- @tparam table tbl the table to copy the keys from, or an empty table if tbl is nil --- @tparam[opt] boolean sorted whether to sort the keys (slower) or keep the random order from pairs() --- @tparam[opt] boolean as_string whether to try and parse the values as strings, or leave them as their existing type --- @treturn array an array with a copy of all the values in the table -function table.values(tbl, sorted, as_string) - if not tbl then return {} end - local valueset = {} - local n = 0 - if as_string then --checking as_string /before/ looping is faster - for _, v in pairs(tbl) do - n = n + 1 - valueset[n] = tostring(v) - end - else - for _, v in pairs(tbl) do - n = n + 1 - valueset[n] = v - end - end - if sorted then - table.sort(valueset, - function(x, y) --sorts tables with mixed index types. - local tx = type(x) == 'number' - local ty = type(y) == 'number' - if tx == ty then - return x < y and true or false --similar type can be compared - elseif tx == true then - return true --only x is a number and goes first - else - return false --only y is a number and goes first - end - end - ) - end - return valueset -end - ---- Returns a copy of all of the keys in the table. --- @tparam table tbl the table to copy the keys from, or an empty table if tbl is nil --- @tparam[opt] boolean sorted whether to sort the keys (slower) or keep the random order from pairs() --- @tparam[opt] boolean as_string whether to try and parse the keys as strings, or leave them as their existing type --- @treturn array an array with a copy of all the keys in the table -function table.keys(tbl, sorted, as_string) - if not tbl then return {} end - local keyset = {} - local n = 0 - if as_string then --checking as_string /before/ looping is faster - for k, _ in pairs(tbl) do - n = n + 1 - keyset[n] = tostring(k) - end - else - for k, _ in pairs(tbl) do - n = n + 1 - keyset[n] = k - end - end - if sorted then - table.sort(keyset, - function(x, y) --sorts tables with mixed index types. - local tx = type(x) == 'number' - local ty = type(y) == 'number' - if tx == ty then - return x < y and true or false --similar type can be compared - elseif tx == true then - return true --only x is a number and goes first - else - return false --only y is a number and goes first - end - end - ) - end - return keyset -end - ---- Removes keys from a table by setting the values associated with the keys to nil. --- @usage local a = {1, 2, 3, 4} ---table.remove_keys(a, {1,3}) --returns {nil, 2, nil, 4} --- @usage local b = {k1 = 1, k2 = 'foo', old_key = 'bar'} ---table.remove_keys(b, {'old_key'}) --returns {k1 = 1, k2 = 'foo'} --- @tparam table tbl the table to remove the keys from --- @tparam {Mixed,...} keys an array of keys that exist in the given table --- @treturn table tbl without the specified keys -function table.remove_keys(tbl, keys) - for i = 1, #keys do - tbl[keys[i]] = nil - end - return tbl -end - ---- Returns the number of keys in a table, if func is passed only count keys when the function is true. --- @tparam table tbl to count keys --- @tparam[opt] function func to incremement counter --- @param[optchain] ... additional arguments passed to the function --- @treturn number The number of keys matching the function or the number of all keys if func isn't passed --- @treturn number The total number of keys --- @usage local a = { 1, 2, 3, 4, 5} --- table.count_keys(a) -- produces: 5, 5 --- @usage local a = {1, 2, 3, 4, 5} --- table.count_keys(a, function(v, k) return k % 2 == 1 end) -- produces: 3, 5 -function table.count_keys(tbl, func, ...) - if type(tbl) ~= 'table' then return 0, 0 end - local count, total = 0, 0 - for k, v in pairs(tbl) do - total = total + 1 - if func then - if func(v, k, ...) then - count = count + 1 - end - else - count = count + 1 - end - end - return count, total -end - ---- Returns an inverted (***{[value] = key,...}***) copy of the given table. If the values are not unique, the assigned key depends on the order of pairs(). --- @usage local a = {k1 = 'foo', k2 = 'bar'} ---table.invert(a) --returns {'foo' = k1, 'bar' = k2} --- @usage local b = {k1 = 'foo', k2 = 'bar', k3 = 'bar'} ---table.invert(b) --returns {'foo' = k1, 'bar' = ?} --- @tparam table tbl the table to invert --- @treturn table a new table with inverted mapping -function table.invert(tbl) - local inverted = {} - for k, v in pairs(tbl) do - inverted[v] = k - end - return inverted -end - ---- Return the size of a table using built in table_size function --- @function size --- @tparam table table to use --- @treturn int size of the table -table.size = table_size - ---- For all string or number values in an array map them to a key = true table --- @usage local a = {"v1", "v2"} --- table.array_to_dict_bool(a) -- return {["v1"] = true, ["v2"]= true} --- @tparam table tbl the table to convert --- @treturn table the converted table -function table.arr_to_bool(tbl) - local newtbl = {} - for _, v in pairs(tbl) do - if type(v) == "string" or type(v) == "number" then - newtbl[v] = true - end - end - return newtbl -end \ No newline at end of file diff --git a/modules/FactorioStdLib/Time/control.lua b/modules/FactorioStdLib/Time/control.lua deleted file mode 100644 index 23554339..00000000 --- a/modules/FactorioStdLib/Time/control.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- A defines module for retrieving the number of ticks in 1 unit of time. --- Extends the Factorio defines table. --- @module StdLib.Time --- @alias defines.time - --- defines table is automatically required in all mod loading stages. --- luacheck: ignore 122/defines --- Ignore assigning to read only defines table. defines table is not read only, however --- marking it this way allows warnings to be generated when trying to assign values. - -defines = defines or {} --luacheck: ignore defines (This is used for testing locally) - -local SECOND = 60 -local MINUTE = SECOND * 60 -local HOUR = MINUTE * 60 -local DAY = HOUR * 24 -local WEEK = DAY * 7 -local MONTH = DAY * 30 -local YEAR = DAY * 365 - ---- Returns the number of ticks in a second, minute, hour, day, week, month, or year. --- @usage local ten_seconds = defines.time.second * 10 -defines.time = { - second = SECOND, -- the number of Factorio ticks in a second - minute = MINUTE, -- the number of Factorio ticks in a second - hour = HOUR, -- the number of Factorio ticks in an hour - day = DAY, -- the number of Factorio ticks in an day - week = WEEK, -- the number of Factorio ticks in a week - month = MONTH, -- the number of Factorio ticks in a month (30 days) - year = YEAR, -- the number of Factorio ticks in a year (365 days) -} - -return setmetatable({},{__index=defines.time}) \ No newline at end of file diff --git a/modules/FactorioStdLib/softmod.json b/modules/FactorioStdLib/softmod.json index af05ed21..cfbee2c4 100644 --- a/modules/FactorioStdLib/softmod.json +++ b/modules/FactorioStdLib/softmod.json @@ -2,7 +2,11 @@ "name": "FactorioStdLib", "module": "Collection", "description": "Factorio Standard Library Projects", - "keywords": ["Standard Library","Lib","StdLib"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib" + ], "version": "0.8.0", "location": "url", "submodules": { @@ -10,7 +14,13 @@ "name": "Color", "module": "Color", "description": "A defines module for retrieving colors by name.", - "keywords": ["Standard Library","Lib","StdLib","Color","Extends"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Color", + "Extends" + ], "version": "0.8.0", "location": "url", "dependencies": {} @@ -19,7 +29,13 @@ "name": "Game", "module": "Game", "description": "The game module.", - "keywords": ["Standard Library","Lib","StdLib","Game","Extends"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Game", + "Extends" + ], "version": "0.8.0", "location": "url", "dependencies": {} @@ -28,7 +44,13 @@ "name": "String", "module": "string", "description": "Extends Lua 5.2 string.", - "keywords": ["Standard Library","Lib","StdLib","String","Extends"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "String", + "Extends" + ], "version": "0.8.0", "location": "url", "dependencies": {} @@ -37,7 +59,13 @@ "name": "Table", "module": "table", "description": "Extends Lua 5.2 table.", - "keywords": ["Standard Library","Lib","StdLib","Table","Extends"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Table", + "Extends" + ], "version": "0.8.0", "location": "url", "dependencies": {} @@ -46,7 +74,13 @@ "name": "Time", "module": "Time", "description": "A defines module for retrieving the number of ticks in 1 unit of time.", - "keywords": ["Standard Library","Lib","StdLib","Time","Extends"], + "keywords": [ + "Standard Library", + "Lib", + "StdLib", + "Time", + "Extends" + ], "version": "0.8.0", "location": "url", "dependencies": {} @@ -54,5 +88,6 @@ }, "author": "Afforess", "contact": "https://github.com/Afforess/Factorio-Stdlib/issues", - "license": "https://github.com/Afforess/Factorio-Stdlib/blob/master/LICENSE" + "license": "https://github.com/Afforess/Factorio-Stdlib/blob/master/LICENSE", + "dependencies": {} } \ No newline at end of file diff --git a/modules/index.lua b/modules/index.lua index c5d24126..46350d70 100644 --- a/modules/index.lua +++ b/modules/index.lua @@ -7,10 +7,4 @@ return { ['Ranking']='./modules/ExpGamingCore/Ranking', ['Server']='./modules/ExpGamingCore/Server', ['Sync']='./modules/ExpGamingCore/Sync', - ['mod_gui']='./modules/FactorioModGui', - ['Color']='./modules/FactorioStdLib/Color', - ['Game']='./modules/FactorioStdLib/Game', - ['string']='./modules/FactorioStdLib/String', - ['table']='./modules/FactorioStdLib/Table', - ['Time']='./modules/FactorioStdLib/Time', } \ No newline at end of file