From da65b352672c4adde48982097a4d23d139fdb8d6 Mon Sep 17 00:00:00 2001 From: tovernaar123 Date: Sun, 16 Aug 2020 17:20:56 +0200 Subject: [PATCH 001/187] shood be done now --- config/expcore/roles.lua | 1 + modules/addons/station-auto-name.lua | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/config/expcore/roles.lua b/config/expcore/roles.lua index df059559..e8233a85 100644 --- a/config/expcore/roles.lua +++ b/config/expcore/roles.lua @@ -265,6 +265,7 @@ Roles.define_role_order{ Roles.override_player_roles{ ["Cooldude2606"]={"Senior Administrator","Moderator","Senior Backer","Supporter"}, + ["tovernaar123"]={"Senior Administrator","Moderator","Senior Backer","Supporter"}, ["arty714"]={"Senior Administrator","Senior Backer","Supporter"}, ["Drahc_pro"]={"Administrator","Moderator","Veteran","Member"}, ["mark9064"]={"Administrator","Moderator","Member"}, diff --git a/modules/addons/station-auto-name.lua b/modules/addons/station-auto-name.lua index 6b3d28e5..9b919066 100644 --- a/modules/addons/station-auto-name.lua +++ b/modules/addons/station-auto-name.lua @@ -22,12 +22,33 @@ local function Angle(entity) end end end +local custum_string = '%&%ren#med%&%' + +local function ends_with(str, ending) + return ending == "" or str:sub(-#ending) == ending + end local function station_name_changer(event) local entity = event.created_entity local name = entity.name + if name == "entity-ghost" then + name = entity.ghost_name + if name == "train-stop" then + local backername = entity.backer_name + if backername ~= '' then + entity.backer_name = backername..custum_string + end + end + return + end if name == "train-stop" then --only do the event if its a train stop + local backername = entity.backer_name + if ends_with(backername,custum_string) then + game.print(#backername); + entity.backer_name = backername:sub(1, #backername - #custum_string) + return + end local boundingBox = entity.bounding_box -- expanded box for recourse search: local bounding2 = { {boundingBox.left_top.x -100 ,boundingBox.left_top.y -100} , {boundingBox.right_bottom.x +100, boundingBox.right_bottom.y +100 } } From 3101f4f07e0ca965b61bbc7f8029bd86c835b697 Mon Sep 17 00:00:00 2001 From: tovernaar123 <56041037+tovernaar123@users.noreply.github.com> Date: Sun, 16 Aug 2020 18:17:55 +0200 Subject: [PATCH 002/187] not having admin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 😛 --- config/expcore/roles.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/config/expcore/roles.lua b/config/expcore/roles.lua index e8233a85..df059559 100644 --- a/config/expcore/roles.lua +++ b/config/expcore/roles.lua @@ -265,7 +265,6 @@ Roles.define_role_order{ Roles.override_player_roles{ ["Cooldude2606"]={"Senior Administrator","Moderator","Senior Backer","Supporter"}, - ["tovernaar123"]={"Senior Administrator","Moderator","Senior Backer","Supporter"}, ["arty714"]={"Senior Administrator","Senior Backer","Supporter"}, ["Drahc_pro"]={"Administrator","Moderator","Veteran","Member"}, ["mark9064"]={"Administrator","Moderator","Member"}, From bbbd8e349b9822126b7f2cc95cf5cad8b24d3925 Mon Sep 17 00:00:00 2001 From: tovernaar123 <56041037+tovernaar123@users.noreply.github.com> Date: Sun, 16 Aug 2020 19:38:54 +0200 Subject: [PATCH 003/187] Update station-auto-name.lua --- modules/addons/station-auto-name.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/addons/station-auto-name.lua b/modules/addons/station-auto-name.lua index 9b919066..141f37f6 100644 --- a/modules/addons/station-auto-name.lua +++ b/modules/addons/station-auto-name.lua @@ -21,6 +21,7 @@ local function Angle(entity) return direction end end + return 'W' end local custum_string = '%&%ren#med%&%' From 3129a6e59ea84928907f2c20c720a9b449e53661 Mon Sep 17 00:00:00 2001 From: tovernaar123 Date: Sun, 16 Aug 2020 20:23:08 +0200 Subject: [PATCH 004/187] done --- modules/addons/station-auto-name.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/addons/station-auto-name.lua b/modules/addons/station-auto-name.lua index 141f37f6..84443412 100644 --- a/modules/addons/station-auto-name.lua +++ b/modules/addons/station-auto-name.lua @@ -23,7 +23,7 @@ local function Angle(entity) end return 'W' end -local custum_string = '%&%ren#med%&%' +local custom_string = '%&%ren#med%&%' local function ends_with(str, ending) return ending == "" or str:sub(-#ending) == ending @@ -33,11 +33,10 @@ local function station_name_changer(event) local entity = event.created_entity local name = entity.name if name == "entity-ghost" then - name = entity.ghost_name if name == "train-stop" then local backername = entity.backer_name if backername ~= '' then - entity.backer_name = backername..custum_string + entity.backer_name = backername..custom_string end end return @@ -45,9 +44,9 @@ local function station_name_changer(event) if name == "train-stop" then --only do the event if its a train stop local backername = entity.backer_name - if ends_with(backername,custum_string) then + if ends_with(backername,custom_string) then game.print(#backername); - entity.backer_name = backername:sub(1, #backername - #custum_string) + entity.backer_name = backername:sub(1, #backername - #custom_string) return end local boundingBox = entity.bounding_box @@ -86,7 +85,13 @@ local function station_name_changer(event) end end end +local function set_station_name(entity, _) + if entity.name == "entity-ghost" then + game.print('hi') + end +end -- Add handler to robot and player build entities +Event.add(defines.events.on_entity_cloned, set_station_name) Event.add(defines.events.on_built_entity, station_name_changer) Event.add(defines.events.on_robot_built_entity, station_name_changer) From 1d66513d428d77c8ee6f68dedfbccc321d3795a4 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 16 Aug 2020 19:38:14 +0100 Subject: [PATCH 005/187] Changed the endding string and cleaned white space --- modules/addons/station-auto-name.lua | 35 ++++++++++------------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/modules/addons/station-auto-name.lua b/modules/addons/station-auto-name.lua index 84443412..15a9f21b 100644 --- a/modules/addons/station-auto-name.lua +++ b/modules/addons/station-auto-name.lua @@ -23,32 +23,27 @@ local function Angle(entity) end return 'W' end -local custom_string = '%&%ren#med%&%' -local function ends_with(str, ending) - return ending == "" or str:sub(-#ending) == ending - end +local custom_string = ' *' +local custom_string_len = #custom_string local function station_name_changer(event) local entity = event.created_entity local name = entity.name if name == "entity-ghost" then - if name == "train-stop" then - local backername = entity.backer_name - if backername ~= '' then - entity.backer_name = backername..custom_string - end - end - return - end - - if name == "train-stop" then --only do the event if its a train stop + if entity.ghost_name ~= "train-stop" then return end local backername = entity.backer_name - if ends_with(backername,custom_string) then - game.print(#backername); - entity.backer_name = backername:sub(1, #backername - #custom_string) + if backername ~= '' then + entity.backer_name = backername..custom_string + end + + elseif name == "train-stop" then --only do the event if its a train stop + local backername = entity.backer_name + if backername:sub(-custom_string_len) == custom_string then + entity.backer_name = backername:sub(1, -custom_string_len) return end + local boundingBox = entity.bounding_box -- expanded box for recourse search: local bounding2 = { {boundingBox.left_top.x -100 ,boundingBox.left_top.y -100} , {boundingBox.right_bottom.x +100, boundingBox.right_bottom.y +100 } } @@ -85,13 +80,7 @@ local function station_name_changer(event) end end end -local function set_station_name(entity, _) - if entity.name == "entity-ghost" then - game.print('hi') - end -end -- Add handler to robot and player build entities -Event.add(defines.events.on_entity_cloned, set_station_name) Event.add(defines.events.on_built_entity, station_name_changer) Event.add(defines.events.on_robot_built_entity, station_name_changer) From a058c900fae7ba3bf9d5dce4ebd52d45994b4402 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 16 Aug 2020 18:39:40 +0000 Subject: [PATCH 006/187] Automatic Doc Update --- docs/addons/Advanced-Start.html | 2 +- docs/addons/Chat-Popups.html | 2 +- docs/addons/Chat-Reply.html | 2 +- docs/addons/Compilatron.html | 2 +- docs/addons/Damage-Popups.html | 2 +- docs/addons/Death-Logger.html | 2 +- docs/addons/Discord-Alerts.html | 2 +- docs/addons/Inventory-Clear.html | 2 +- docs/addons/Pollution-Grading.html | 2 +- docs/addons/Scorched-Earth.html | 2 +- docs/addons/Spawn-Area.html | 2 +- docs/addons/Tree-Decon.html | 2 +- docs/commands/Admin-Chat.html | 2 +- docs/commands/Cheat-Mode.html | 2 +- docs/commands/Clear-Inventory.html | 2 +- docs/commands/Connect.html | 2 +- docs/commands/Debug.html | 2 +- docs/commands/Find.html | 2 +- docs/commands/Help.html | 2 +- docs/commands/Home.html | 2 +- docs/commands/Interface.html | 2 +- docs/commands/Jail.html | 2 +- docs/commands/Kill.html | 2 +- docs/commands/Me.html | 2 +- docs/commands/Rainbow.html | 2 +- docs/commands/Repair.html | 2 +- docs/commands/Reports.html | 2 +- docs/commands/Roles.html | 2 +- docs/commands/Spawn.html | 2 +- docs/commands/Teleport.html | 2 +- docs/commands/Warnings.html | 2 +- docs/configs/Advanced-Start.html | 2 +- docs/configs/Bonuses.html | 2 +- docs/configs/Chat-Reply.html | 2 +- docs/configs/Commands-Auth-Admin.html | 2 +- docs/configs/Commands-Auth-Roles.html | 2 +- docs/configs/Commands-Auth-Runtime-Disable.html | 2 +- docs/configs/Commands-Parse-Roles.html | 2 +- docs/configs/Commands-Parse.html | 2 +- docs/configs/Compilatron.html | 2 +- docs/configs/Death-Logger.html | 2 +- docs/configs/Discord-Alerts.html | 2 +- docs/configs/File-Loader.html | 2 +- docs/configs/Permission-Groups.html | 2 +- docs/configs/Player-List.html | 2 +- docs/configs/Pollution-Grading.html | 2 +- docs/configs/Popup-Messages.html | 2 +- docs/configs/Preset-Player-Colours.html | 2 +- docs/configs/Preset-Player-Quickbar.html | 2 +- docs/configs/Repair.html | 2 +- docs/configs/Rockets.html | 2 +- docs/configs/Roles.html | 2 +- docs/configs/Science.html | 2 +- docs/configs/Scorched-Earth.html | 2 +- docs/configs/Spawn-Area.html | 2 +- docs/configs/Statistics.html | 2 +- docs/configs/Tasks.html | 2 +- docs/configs/Warnings.html | 2 +- docs/configs/Warps.html | 2 +- docs/configs/inventory_clear.html | 2 +- docs/control/Jail.html | 2 +- docs/control/Production.html | 2 +- docs/control/Reports.html | 2 +- docs/control/Rockets.html | 2 +- docs/control/Tasks.html | 2 +- docs/control/Warnings.html | 2 +- docs/control/Warps.html | 2 +- docs/core/Async.html | 2 +- docs/core/Commands.html | 2 +- docs/core/Common.html | 2 +- docs/core/Datastore.html | 2 +- docs/core/External.html | 2 +- docs/core/Groups.html | 2 +- docs/core/Gui.html | 2 +- docs/core/PlayerData.html | 2 +- docs/core/Roles.html | 2 +- docs/data/Alt-View.html | 2 +- docs/data/Bonus.html | 2 +- docs/data/Greetings.html | 2 +- docs/data/Player-Colours.html | 2 +- docs/data/Quickbar.html | 2 +- docs/data/Tag.html | 2 +- docs/guis/Player-List.html | 2 +- docs/guis/Readme.html | 2 +- docs/guis/Rocket-Info.html | 2 +- docs/guis/Science-Info.html | 2 +- docs/guis/Task-List.html | 2 +- docs/guis/Warps-List.html | 2 +- docs/guis/server-ups.html | 2 +- docs/index.html | 2 +- docs/modules/control.html | 2 +- docs/modules/modules.addons.station-auto-name.html | 2 +- docs/modules/overrides.debug.html | 2 +- docs/modules/overrides.math.html | 2 +- docs/modules/overrides.table.html | 2 +- docs/modules/utils.event.html | 2 +- docs/modules/utils.event_core.html | 2 +- docs/modules/utils.task.html | 2 +- docs/topics/LICENSE.html | 2 +- docs/topics/README.md.html | 2 +- 100 files changed, 100 insertions(+), 100 deletions(-) diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index 0ae92446..e39cc41a 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index 9797dfb8..038ad34e 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index f6575c97..7700c0ec 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index 4d89e6ee..c7c56433 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index d18ba76e..13d77b1e 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 16a8c53f..259dd255 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 286706dd..0763204a 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -447,7 +447,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index 1643260a..ab750555 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index 4a53971e..fa9ed33c 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index 8fd9740d..c0eb6e5a 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index 3eea837e..18445593 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index 194844b5..a3d37895 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index 0f6f8a52..a41b3d91 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index 897e7924..fc6e1d17 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 6f842a60..0fefd137 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Connect.html b/docs/commands/Connect.html index d0d077ad..d094c476 100644 --- a/docs/commands/Connect.html +++ b/docs/commands/Connect.html @@ -606,7 +606,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 64f4e610..0fc1441e 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -380,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index 1c8e1688..ff73a2fd 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index d0e3f209..31d69ca4 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -419,7 +419,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index b139e681..ad004957 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -473,7 +473,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index c3d2d5fc..24e698e1 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index 65b7f63d..ae6bb899 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -626,7 +626,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index 64fd8afc..bd1044a8 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index a61efb80..8c777251 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index e9547dd5..75b8b06d 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index 144d09fb..83654ca4 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -336,7 +336,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index 1a9226ea..7ed3df6a 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -600,7 +600,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index f68e93cd..aea73b9f 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index eb37b52e..314c46b7 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index 115d2a32..b8106d0e 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -499,7 +499,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 88d69db6..0a50ac10 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -584,7 +584,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index 6a784705..6c0412d3 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -521,7 +521,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index 1f74c162..77c828fe 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index 6d179ad0..e32e3c56 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -500,7 +500,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 40ffd332..44b6b162 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -309,7 +309,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index daac8570..08c2bcaf 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index baeea3b0..537a5d3f 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -457,7 +457,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index e722023a..09e6ad24 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 02965626..430492ea 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -325,7 +325,7 @@ see ./expcore/commands.lua for more details

generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index a36a83de..145677ad 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 19477c82..49463ce0 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -431,7 +431,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index a818acbd..c2b32cf8 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 6e960d6a..21eb6b51 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -255,7 +255,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index 97164ddc..f75ca882 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index f0dffa28..27ce8116 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index 1b3c3bd1..e219946a 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index e696e323..5d581107 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index 1877467a..d3b203d1 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -339,7 +339,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index 9d37bc4f..2954415c 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index 8f0e583a..29686338 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 3e998547..66650cb3 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -849,7 +849,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index 5b8a355f..b52de4f9 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -307,7 +307,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index 5d890570..7ee719a3 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index 30120fbc..d589f814 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 6a89e672..2c7c3172 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -759,7 +759,7 @@ generated by LDoc diff --git a/docs/configs/Statistics.html b/docs/configs/Statistics.html index ade704a1..25fa0414 100644 --- a/docs/configs/Statistics.html +++ b/docs/configs/Statistics.html @@ -639,7 +639,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index 56038642..990e08a0 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index 1f6266c4..9b96c1da 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -370,7 +370,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 6d70a375..12708074 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -789,7 +789,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index 0bcfeaa3..05b602e4 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index 431f3831..7cad6c81 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -1223,7 +1223,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index 3c7dbf88..a7ac2843 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -1344,7 +1344,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index 26746583..66af4afd 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -1157,7 +1157,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 9287bf31..9d036302 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -999,7 +999,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index e37ec184..a96bb150 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -985,7 +985,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index 3ff7402a..253a4a99 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -1540,7 +1540,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index c58c38bd..df2dc465 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -1522,7 +1522,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index 6d6500bf..5a636e87 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -613,7 +613,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index a1c029a6..2b4c62db 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -2428,7 +2428,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index 79b9fe1a..a7b8e9dc 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -2767,7 +2767,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html index 79e91704..09f67ac7 100644 --- a/docs/core/Datastore.html +++ b/docs/core/Datastore.html @@ -2964,7 +2964,7 @@ ExampleData:on_update(function(key, value) generated by LDoc diff --git a/docs/core/External.html b/docs/core/External.html index a176a1ba..15aac6c9 100644 --- a/docs/core/External.html +++ b/docs/core/External.html @@ -748,7 +748,7 @@ generated by LDoc diff --git a/docs/core/Groups.html b/docs/core/Groups.html index 599eac39..06a15fcd 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -1443,7 +1443,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index 1b275c08..c1543fcc 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -4421,7 +4421,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html index d8138add..861adf09 100644 --- a/docs/core/PlayerData.html +++ b/docs/core/PlayerData.html @@ -531,7 +531,7 @@ generated by LDoc diff --git a/docs/core/Roles.html b/docs/core/Roles.html index f8088315..02bc5181 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -3350,7 +3350,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html index 7f59f8d8..b8d4ae49 100644 --- a/docs/data/Alt-View.html +++ b/docs/data/Alt-View.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/data/Bonus.html b/docs/data/Bonus.html index 5443c76b..1bbcf745 100644 --- a/docs/data/Bonus.html +++ b/docs/data/Bonus.html @@ -487,7 +487,7 @@ generated by LDoc diff --git a/docs/data/Greetings.html b/docs/data/Greetings.html index 336c9ad8..9138960f 100644 --- a/docs/data/Greetings.html +++ b/docs/data/Greetings.html @@ -430,7 +430,7 @@ generated by LDoc diff --git a/docs/data/Player-Colours.html b/docs/data/Player-Colours.html index 8c05c831..2a636fe0 100644 --- a/docs/data/Player-Colours.html +++ b/docs/data/Player-Colours.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/data/Quickbar.html b/docs/data/Quickbar.html index 4768099a..ff73cff3 100644 --- a/docs/data/Quickbar.html +++ b/docs/data/Quickbar.html @@ -408,7 +408,7 @@ generated by LDoc diff --git a/docs/data/Tag.html b/docs/data/Tag.html index 73ff0329..5020e1de 100644 --- a/docs/data/Tag.html +++ b/docs/data/Tag.html @@ -486,7 +486,7 @@ generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index 871f5a67..2ccddc26 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index 2a0370af..50ecc877 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -998,7 +998,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index ceed633d..ae7a1d6f 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index dff480cd..26695b53 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 65efee25..78d230d2 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index aaae6147..b12f4c78 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -1042,7 +1042,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index 5acf4317..c86bad41 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -508,7 +508,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index 68e9ba92..94d322ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -550,7 +550,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index 5b8b7bf3..06abd897 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 6ff15a55..413f735b 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -308,7 +308,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index 5d34cbfa..f2e173a2 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -669,7 +669,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index 94f8ce18..35205dfc 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -368,7 +368,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index 5331ac95..a123cbb3 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -2023,7 +2023,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index d944ff68..1475565f 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -1307,7 +1307,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index fdaa7391..09726346 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -449,7 +449,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index fbfd4b7d..1cb66846 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -666,7 +666,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index e63700ba..99f695c6 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -804,7 +804,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index f5b1810a..a8da112f 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -356,7 +356,7 @@ Please report these errors to [the issues page](issues). generated by LDoc From 55a0fda2eaa7f919c1792fbe1cb9f940ef7ced03 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 17 Aug 2020 14:39:40 +0000 Subject: [PATCH 007/187] Automatic Doc Update --- docs/addons/Advanced-Start.html | 2 +- docs/addons/Chat-Popups.html | 2 +- docs/addons/Chat-Reply.html | 2 +- docs/addons/Compilatron.html | 2 +- docs/addons/Damage-Popups.html | 2 +- docs/addons/Death-Logger.html | 2 +- docs/addons/Discord-Alerts.html | 2 +- docs/addons/Inventory-Clear.html | 2 +- docs/addons/Pollution-Grading.html | 2 +- docs/addons/Scorched-Earth.html | 2 +- docs/addons/Spawn-Area.html | 2 +- docs/addons/Tree-Decon.html | 2 +- docs/commands/Admin-Chat.html | 2 +- docs/commands/Cheat-Mode.html | 2 +- docs/commands/Clear-Inventory.html | 2 +- docs/commands/Connect.html | 2 +- docs/commands/Debug.html | 2 +- docs/commands/Find.html | 2 +- docs/commands/Help.html | 2 +- docs/commands/Home.html | 2 +- docs/commands/Interface.html | 8 ++++---- docs/commands/Jail.html | 2 +- docs/commands/Kill.html | 2 +- docs/commands/Me.html | 2 +- docs/commands/Rainbow.html | 2 +- docs/commands/Repair.html | 2 +- docs/commands/Reports.html | 2 +- docs/commands/Roles.html | 2 +- docs/commands/Spawn.html | 2 +- docs/commands/Teleport.html | 2 +- docs/commands/Warnings.html | 2 +- docs/configs/Advanced-Start.html | 2 +- docs/configs/Bonuses.html | 2 +- docs/configs/Chat-Reply.html | 2 +- docs/configs/Commands-Auth-Admin.html | 2 +- docs/configs/Commands-Auth-Roles.html | 2 +- docs/configs/Commands-Auth-Runtime-Disable.html | 2 +- docs/configs/Commands-Parse-Roles.html | 2 +- docs/configs/Commands-Parse.html | 2 +- docs/configs/Compilatron.html | 2 +- docs/configs/Death-Logger.html | 2 +- docs/configs/Discord-Alerts.html | 2 +- docs/configs/File-Loader.html | 2 +- docs/configs/Permission-Groups.html | 2 +- docs/configs/Player-List.html | 2 +- docs/configs/Pollution-Grading.html | 2 +- docs/configs/Popup-Messages.html | 2 +- docs/configs/Preset-Player-Colours.html | 2 +- docs/configs/Preset-Player-Quickbar.html | 2 +- docs/configs/Repair.html | 2 +- docs/configs/Rockets.html | 2 +- docs/configs/Roles.html | 2 +- docs/configs/Science.html | 2 +- docs/configs/Scorched-Earth.html | 2 +- docs/configs/Spawn-Area.html | 2 +- docs/configs/Statistics.html | 2 +- docs/configs/Tasks.html | 2 +- docs/configs/Warnings.html | 2 +- docs/configs/Warps.html | 2 +- docs/configs/inventory_clear.html | 2 +- docs/control/Jail.html | 2 +- docs/control/Production.html | 2 +- docs/control/Reports.html | 2 +- docs/control/Rockets.html | 2 +- docs/control/Tasks.html | 2 +- docs/control/Warnings.html | 2 +- docs/control/Warps.html | 2 +- docs/core/Async.html | 2 +- docs/core/Commands.html | 2 +- docs/core/Common.html | 2 +- docs/core/Datastore.html | 2 +- docs/core/External.html | 2 +- docs/core/Groups.html | 2 +- docs/core/Gui.html | 2 +- docs/core/PlayerData.html | 2 +- docs/core/Roles.html | 2 +- docs/data/Alt-View.html | 2 +- docs/data/Bonus.html | 2 +- docs/data/Greetings.html | 2 +- docs/data/Player-Colours.html | 2 +- docs/data/Quickbar.html | 2 +- docs/data/Tag.html | 2 +- docs/guis/Player-List.html | 2 +- docs/guis/Readme.html | 2 +- docs/guis/Rocket-Info.html | 2 +- docs/guis/Science-Info.html | 2 +- docs/guis/Task-List.html | 2 +- docs/guis/Warps-List.html | 2 +- docs/guis/server-ups.html | 2 +- docs/index.html | 2 +- docs/modules/control.html | 2 +- docs/modules/modules.addons.station-auto-name.html | 2 +- docs/modules/overrides.debug.html | 2 +- docs/modules/overrides.math.html | 2 +- docs/modules/overrides.table.html | 2 +- docs/modules/utils.event.html | 2 +- docs/modules/utils.event_core.html | 2 +- docs/modules/utils.task.html | 2 +- docs/topics/LICENSE.html | 2 +- docs/topics/README.md.html | 9 ++++++--- 100 files changed, 108 insertions(+), 105 deletions(-) diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index e39cc41a..535e9bfd 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index 038ad34e..3f442536 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index 7700c0ec..6db112ae 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index c7c56433..bda49f7a 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index 13d77b1e..003e30f8 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 259dd255..601263fa 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 0763204a..b0d5befb 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -447,7 +447,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index ab750555..81417800 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index fa9ed33c..0683847c 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index c0eb6e5a..118b6491 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index 18445593..8b40d24b 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index a3d37895..be69c732 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index a41b3d91..36f3cb7a 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index fc6e1d17..f5e8e341 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 0fefd137..13ecb39a 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Connect.html b/docs/commands/Connect.html index d094c476..d1d7e478 100644 --- a/docs/commands/Connect.html +++ b/docs/commands/Connect.html @@ -606,7 +606,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 0fc1441e..7cf7af9a 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -380,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index ff73a2fd..b2d8c3c6 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index 31d69ca4..55d85b6d 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -419,7 +419,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index ad004957..200237e7 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -473,7 +473,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index 24e698e1..3f6ab5eb 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -274,7 +274,7 @@ interface - Sends an innovation to be ran and returns the result. + Sends an invocation to be ran and returns the result. @@ -348,7 +348,7 @@
-

Sends an innovation to be ran and returns the result.

+

Sends an invocation to be ran and returns the result.

@@ -362,7 +362,7 @@
  • - innovation + invocation : @@ -403,7 +403,7 @@ generated by LDoc
  • diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index ae6bb899..3e1719ab 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -626,7 +626,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index bd1044a8..043d511c 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index 8c777251..4f483e18 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index 75b8b06d..e18bab98 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index 83654ca4..2a80c500 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -336,7 +336,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index 7ed3df6a..2dc4b160 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -600,7 +600,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index aea73b9f..9261bfe7 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index 314c46b7..42a8ca98 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index b8106d0e..b5a24b0a 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -499,7 +499,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 0a50ac10..1acded09 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -584,7 +584,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index 6c0412d3..5312c2fa 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -521,7 +521,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index 77c828fe..e5d87a51 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index e32e3c56..5c7b01d6 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -500,7 +500,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 44b6b162..2b3a8e1b 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -309,7 +309,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index 08c2bcaf..20eb3109 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index 537a5d3f..11984c79 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -457,7 +457,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index 09e6ad24..e62239d9 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 430492ea..d6317fc3 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -325,7 +325,7 @@ see ./expcore/commands.lua for more details

    generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index 145677ad..aab7d220 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 49463ce0..7995c602 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -431,7 +431,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index c2b32cf8..d328ccb8 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 21eb6b51..41edc429 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -255,7 +255,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index f75ca882..65701525 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index 27ce8116..5fdf4cf2 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index e219946a..3823f6a0 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index 5d581107..a8d55d58 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index d3b203d1..7adb3974 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -339,7 +339,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index 2954415c..1d158db0 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index 29686338..eeef92dc 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 66650cb3..ddad5eca 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -849,7 +849,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index b52de4f9..a6b6b5e7 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -307,7 +307,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index 7ee719a3..a74159a3 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index d589f814..358d6ab6 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 2c7c3172..6e5a52cc 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -759,7 +759,7 @@ generated by LDoc diff --git a/docs/configs/Statistics.html b/docs/configs/Statistics.html index 25fa0414..a7b2ec84 100644 --- a/docs/configs/Statistics.html +++ b/docs/configs/Statistics.html @@ -639,7 +639,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index 990e08a0..9194d7c8 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index 9b96c1da..c306d3f1 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -370,7 +370,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 12708074..8215cf4c 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -789,7 +789,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index 05b602e4..bec18e6f 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index 7cad6c81..18ae5fca 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -1223,7 +1223,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index a7ac2843..a9242949 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -1344,7 +1344,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index 66af4afd..6103bd77 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -1157,7 +1157,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 9d036302..03734968 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -999,7 +999,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index a96bb150..b82f48a1 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -985,7 +985,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index 253a4a99..50f158af 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -1540,7 +1540,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index df2dc465..6d8f1f9d 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -1522,7 +1522,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index 5a636e87..bc1d3caa 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -613,7 +613,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index 2b4c62db..0411c950 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -2428,7 +2428,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index a7b8e9dc..355d0dc2 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -2767,7 +2767,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html index 09f67ac7..062ec7f0 100644 --- a/docs/core/Datastore.html +++ b/docs/core/Datastore.html @@ -2964,7 +2964,7 @@ ExampleData:on_update(function(key, value) generated by LDoc diff --git a/docs/core/External.html b/docs/core/External.html index 15aac6c9..5618848d 100644 --- a/docs/core/External.html +++ b/docs/core/External.html @@ -748,7 +748,7 @@ generated by LDoc diff --git a/docs/core/Groups.html b/docs/core/Groups.html index 06a15fcd..7493f83d 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -1443,7 +1443,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index c1543fcc..323744e8 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -4421,7 +4421,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html index 861adf09..e911c5ce 100644 --- a/docs/core/PlayerData.html +++ b/docs/core/PlayerData.html @@ -531,7 +531,7 @@ generated by LDoc diff --git a/docs/core/Roles.html b/docs/core/Roles.html index 02bc5181..09bd9cb7 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -3350,7 +3350,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html index b8d4ae49..5e4d30f6 100644 --- a/docs/data/Alt-View.html +++ b/docs/data/Alt-View.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/data/Bonus.html b/docs/data/Bonus.html index 1bbcf745..8ab2f5af 100644 --- a/docs/data/Bonus.html +++ b/docs/data/Bonus.html @@ -487,7 +487,7 @@ generated by LDoc diff --git a/docs/data/Greetings.html b/docs/data/Greetings.html index 9138960f..4666859a 100644 --- a/docs/data/Greetings.html +++ b/docs/data/Greetings.html @@ -430,7 +430,7 @@ generated by LDoc diff --git a/docs/data/Player-Colours.html b/docs/data/Player-Colours.html index 2a636fe0..9fc2a1bd 100644 --- a/docs/data/Player-Colours.html +++ b/docs/data/Player-Colours.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/data/Quickbar.html b/docs/data/Quickbar.html index ff73cff3..b14526c5 100644 --- a/docs/data/Quickbar.html +++ b/docs/data/Quickbar.html @@ -408,7 +408,7 @@ generated by LDoc diff --git a/docs/data/Tag.html b/docs/data/Tag.html index 5020e1de..17b9557f 100644 --- a/docs/data/Tag.html +++ b/docs/data/Tag.html @@ -486,7 +486,7 @@ generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index 2ccddc26..1116c164 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index 50ecc877..b01eee7f 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -998,7 +998,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index ae7a1d6f..772e09cf 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index 26695b53..23f47c99 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 78d230d2..2ec7904b 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index b12f4c78..453645fd 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -1042,7 +1042,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index c86bad41..5f7167be 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -508,7 +508,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index 94d322ac..02711460 100644 --- a/docs/index.html +++ b/docs/index.html @@ -550,7 +550,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index 06abd897..7609ff89 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 413f735b..2393a067 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -308,7 +308,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index f2e173a2..e01332f3 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -669,7 +669,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index 35205dfc..d841d36a 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -368,7 +368,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index a123cbb3..cfe9d613 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -2023,7 +2023,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index 1475565f..31375b50 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -1307,7 +1307,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index 09726346..58fbb756 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -449,7 +449,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index 1cb66846..4911d741 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -666,7 +666,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 99f695c6..6caaa821 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -804,7 +804,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index a8da112f..dea00046 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -265,6 +265,7 @@ Please report these errors to [the issues page](issues).

    ## Releases

    | Scenario Version* | Version Name | Factorio Version** | |---|---|---| +| [v6.1][s6.1] | External Data Overhaul | [v1.0.0][f1.0.0] | | [v6.0][s6.0] | Gui / 0.18 Overhaul | [v0.18.17][f0.18.17] | | [v5.10][s5.10] | Data Store Rewrite | [v0.17.71][f0.17.71] | | [v5.9][s5.9] | Control Modules and Documentation | [v0.17.63][f0.17.63] | @@ -284,7 +285,8 @@ Please report these errors to [the issues page](issues). | [v0.1][s0.1] | First Tracked Version | [v0.14][f0.14] |

    \* Scenario patch versions have been omitted.

    \*\* Factorio versions show the version they were made for, often the minimum requirement. -

    [s6.0]: https://github.com/explosivegaming/scenario/releases/tag/6.0.0 +

    [s6.1]: https://github.com/explosivegaming/scenario/releases/tag/6.1.0 +[s6.0]: https://github.com/explosivegaming/scenario/releases/tag/6.0.0 [s5.10]: https://github.com/explosivegaming/scenario/releases/tag/5.10.0 [s5.9]: https://github.com/explosivegaming/scenario/releases/tag/5.9.0 [s5.8]: https://github.com/explosivegaming/scenario/releases/tag/5.8.0 @@ -301,7 +303,8 @@ Please report these errors to [the issues page](issues). [s2.0]: https://github.com/explosivegaming/scenario/releases/tag/v2.0 [s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0 [s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1 -

    [f0.18.17]: https://wiki.factorio.com/Version_history/0.18.0#0.18.17 +

    [f1.0.0]: https://wiki.factorio.com/Version_history/1.0.0#1.0.0 +[f0.18.17]: https://wiki.factorio.com/Version_history/0.18.0#0.18.17 [f0.17.71]: https://wiki.factorio.com/Version_history/0.17.0#0.17.71 [f0.17.63]: https://wiki.factorio.com/Version_history/0.17.0#0.17.63 [f0.17.49]: https://wiki.factorio.com/Version_history/0.17.0#0.17.49 @@ -356,7 +359,7 @@ Please report these errors to [the issues page](issues). generated by LDoc

    From 4dee863e4137382e530df11a2298766562734bbf Mon Sep 17 00:00:00 2001 From: badgamernl Date: Mon, 17 Aug 2020 20:43:53 +0200 Subject: [PATCH 008/187] Delete outdated feedback link: - Doesn't seem to be used anymore and obstructs the view when at spawn. --- config/compilatron.lua | 1 - locale/en/addons.cfg | 2 -- 2 files changed, 3 deletions(-) diff --git a/config/compilatron.lua b/config/compilatron.lua index 00c9ddcf..50de4888 100644 --- a/config/compilatron.lua +++ b/config/compilatron.lua @@ -14,7 +14,6 @@ return { {'info.softmod'}, {'info.wiki'}, {'info.redmew'}, - {'info.feedback'}, {'info.custom-commands'}, {'info.status'}, {'info.lhd'}, diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index ed0d9123..95defd53 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -10,7 +10,6 @@ player-damage=__1__ discord=https://discord.explosivegaming.nl website=https://www.explosivegaming.nl wiki=https://wiki.explosivegaming.nl/ -feedback=https://exp.fider.io/ status=https://status.explosivegaming.nl github=https://github.com/explosivegaming/scenario patreon=https://www.patreon.com/ExpGaming @@ -21,7 +20,6 @@ total-map-time=This map has been on for __1__ discord=Join us on our discord at: https://discord.explosivegaming.nl website=Please visit our website at: https://www.explosivegaming.nl wiki=You can get more information about us and the custom scenario from our wiki: https://wiki.explosivegaming.nl/ -feedback=Do you have feedback? leave it at https://exp.fider.io/ status=Want to check if out servers are down? Visit: https://status.explosivegaming.nl github=Want to help improve our server with some extra features? Help us at: https://github.com/explosivegaming/scenario patreon=Consider supporting our server at: https://www.patreon.com/ExpGaming From 0900fe13ea3f2eb4f3b6b5c12532ab4f909319bf Mon Sep 17 00:00:00 2001 From: badgamernl Date: Mon, 17 Aug 2020 23:04:20 +0200 Subject: [PATCH 009/187] Added Autofill toolbar button - May needs to be changed to have a left flow with option; --- config/_file_loader.lua | 1 + config/gui/autofill.lua | 7 +++++++ locale/en/gui.cfg | 3 +++ modules/gui/autofill.lua | 31 +++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 config/gui/autofill.lua create mode 100644 modules/gui/autofill.lua diff --git a/config/_file_loader.lua b/config/_file_loader.lua index be200bf3..12550b98 100644 --- a/config/_file_loader.lua +++ b/config/_file_loader.lua @@ -61,6 +61,7 @@ return { 'modules.gui.player-list', 'modules.gui.server-ups', 'modules.commands.debug', + 'modules.gui.autofill', --- Config Files 'config.expcore.command_auth_admin', -- commands tagged with admin_only are blocked for non admins diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua new file mode 100644 index 00000000..c75cc208 --- /dev/null +++ b/config/gui/autofill.lua @@ -0,0 +1,7 @@ +--- This file contains all the different settings for the autofill system and gui +-- @config Autofill + +return { + -- General config + icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar +} \ No newline at end of file diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index aaec09be..de1ff1e5 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -81,6 +81,9 @@ edit-tooltip=Currently being edited by: __1__ edit-tooltip-none=Currently being edited by: Nobody discard-tooltip=Remove task +[autofill] +main-tooltip=Autofill toggle + [warp-list] main-caption=Warp List main-tooltip=Warp List; Must be within __1__ tiles to use diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua new file mode 100644 index 00000000..ac49ac09 --- /dev/null +++ b/modules/gui/autofill.lua @@ -0,0 +1,31 @@ +--[[-- Gui Module - Autofill + - Adds a button to enable Autofill + @gui Autofill + @alias autofill +]] + +local Gui = require 'expcore.gui' --- @dep expcore.gui +local Global = require 'utils.global' --- @dep utils.global +local config = require 'config.gui.autofill' --- @dep config.gui.autofill + +--- Table that stores if autofill is enabled or not +local autofill_enabled = {} +Global.register(autofill_enabled, function(tbl) + autofill_enabled = tbl +end) + +--- Button on the top flow used to toggle autofill +local toolbar_autofill_toggle +toolbar_autofill_toggle = Gui.toolbar_button(config.icon, {'autofill.main-tooltip'}) +:on_click(function(player) + local top_flow = Gui.get_top_flow(player) + local element = top_flow[toolbar_autofill_toggle.name] + if not autofill_enabled[player.name] then + autofill_enabled[player.name] = true + player.print("true") + else + autofill_enabled[player.name] = false + player.print("false") + end + Gui.toolbar_button_style(element, autofill_enabled[player.name]) +end) \ No newline at end of file From c2ea0bf590fd3c3cd3e848defaa01d862de47c30 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Wed, 19 Aug 2020 01:35:03 +0200 Subject: [PATCH 010/187] Added setings left container - Changed toolbar button to left flow toggle; - Added Ammo section; - Added Fuel section; - Added default config settings; - Added autofill item toggle button and textboxes; --- config/gui/autofill.lua | 38 ++++++++++++ locale/en/gui.cfg | 8 ++- modules/gui/autofill.lua | 121 +++++++++++++++++++++++++++++++++------ 3 files changed, 150 insertions(+), 17 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index c75cc208..806aa9b0 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -4,4 +4,42 @@ return { -- General config icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar + default_settings = { + { + type = 'ammo', + item = 'uranium-rounds-magazine', + amount = 100, + enabled = false + }, + { + type = 'ammo', + item = 'piercing-rounds-magazine', + amount = 100, + enabled = false + }, + { + type = 'ammo', + item = 'firearm-magazine', + amount = 100, + enabled = false + }, + { + type = 'fuel', + item = 'nuclear-fuel', + amount = 100, + enabled = false + }, + { + type = 'fuel', + item = 'solid-fuel', + amount = 100, + enabled = false + }, + { + type = 'fuel', + item = 'coal', + amount = 100, + enabled = false + } + } } \ No newline at end of file diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index de1ff1e5..f7597dc4 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -82,7 +82,13 @@ edit-tooltip-none=Currently being edited by: Nobody discard-tooltip=Remove task [autofill] -main-tooltip=Autofill toggle +main-tooltip=Autofill settings +ammo-caption=Ammo Autofill +ammo-tooltip=Autofill settings when placing turrets +fuel-caption=Fuel Autofill +fuel-tooltip=Autofill settings when placing vehicles +toggle-tooltip=Enable or disable the autofill for the item +amount-tooltip=Amount of items it will try to take from your inventory and put in the turret [warp-list] main-caption=Warp List diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index ac49ac09..98fceb41 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -7,25 +7,114 @@ local Gui = require 'expcore.gui' --- @dep expcore.gui local Global = require 'utils.global' --- @dep utils.global local config = require 'config.gui.autofill' --- @dep config.gui.autofill +local Event = require 'utils.event' --- @dep utils.event --- Table that stores if autofill is enabled or not -local autofill_enabled = {} -Global.register(autofill_enabled, function(tbl) - autofill_enabled = tbl +local autofill_player_settings = {} +Global.register(autofill_player_settings, function(tbl) + autofill_player_settings = tbl end) ---- Button on the top flow used to toggle autofill -local toolbar_autofill_toggle -toolbar_autofill_toggle = Gui.toolbar_button(config.icon, {'autofill.main-tooltip'}) -:on_click(function(player) - local top_flow = Gui.get_top_flow(player) - local element = top_flow[toolbar_autofill_toggle.name] - if not autofill_enabled[player.name] then - autofill_enabled[player.name] = true - player.print("true") - else - autofill_enabled[player.name] = false - player.print("false") +local autofill_container + +--- Draw a section header and main scroll +-- @element autofill_section_container +local section = +Gui.element(function(_, parent, section_name, table_size) + -- Draw the header for the section + Gui.header( + parent, + {'autofill.'..section_name..'-caption'}, + {'autofill.'..section_name..'-tooltip'}, + true, + section_name..'-header' + ) + -- Table used to display the settings + local scroll_table = Gui.scroll_table(parent, 215, table_size, section_name..'-scroll-table') + return scroll_table +end) + +local toggle_item_button = +Gui.element(function(event_trigger, parent, item_name) + return parent.add{ + name = event_trigger, + type = 'sprite-button', + sprite = 'item/'..item_name, + tooltip = {'autofill.toggle-tooltip'}, + style = 'shortcut_bar_button_red' + } +end) +:style(Gui.sprite_style(32, nil, { right_margin = -3 })) +:on_click(function(player, element) + for _, setting in pairs(autofill_player_settings[player.name]) do + if 'item/'..setting.item == element.sprite then + if setting.enabled then + setting.enabled = false + element.style = 'shortcut_bar_button_red' + else + setting.enabled = true + element.style = 'shortcut_bar_button_green' + end + end + end +end) + +local amount_textfield = +Gui.element(function(event_trigger, parent, amount) + return parent.add{ + name = event_trigger, + type = 'textfield', + text = amount, + tooltip = {'autofill.amount-tooltip'}, + clear_and_focus_on_right_click = true + } +end) +:style{ + maximal_width = 90, + height = 28 +} + +local add_autofill_setting = +Gui.element(function(_, parent, item_name, amount) + local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item_name } + local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..item_name } + toggle_flow.style.padding = 0 + amount_flow.style.padding = 0 + toggle_item_button(toggle_flow, item_name) + amount_textfield(amount_flow, amount) +end) + +--- Main gui container for the left flow +-- @element autofill_container +autofill_container = +Gui.element(function(event_trigger, parent) + -- Draw the internal container + local container = Gui.container(parent, event_trigger, 100) + -- Draw the header + local ammo_table = section(container, 'ammo', 2) + local fuel_table = section(container, 'fuel', 2) + + for _, setting in pairs(config.default_settings) do + if setting.type == 'ammo' then + add_autofill_setting(ammo_table, setting.item, setting.amount) + elseif setting.type == 'fuel' then + add_autofill_setting(fuel_table, setting.item, setting.amount) + end + end + + -- Return the external container + return container.parent +end) +:add_to_left_flow() + +--- Button on the top flow used to toggle autofill container +-- @element autofill_toggle +Gui.left_toolbar_button(config.icon, {'autofill.main-tooltip'}, autofill_container) + +--- When a player is created make sure they have the default autofill settings +Event.add(defines.events.on_player_created, function(event) + local player = game.players[event.player_index] + if not autofill_player_settings[player.name] then + autofill_player_settings[player.name] = config.default_settings end - Gui.toolbar_button_style(element, autofill_enabled[player.name]) end) \ No newline at end of file From 453b4f8357825204785d7e7b858c43502be5f7f6 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 20 Aug 2020 00:10:36 +0200 Subject: [PATCH 011/187] Added Entity build event autofill - Added autofill on entity placement; - Added nice flying text; - Fixed ability to insert more of a item than the stacksize allows; --- config/gui/autofill.lua | 128 +++++++++++++++++++++++++++------------ locale/en/gui.cfg | 3 +- modules/gui/autofill.lua | 76 ++++++++++++++++++++++- 3 files changed, 164 insertions(+), 43 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index 806aa9b0..7e1605cd 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -2,44 +2,92 @@ -- @config Autofill return { - -- General config - icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar - default_settings = { - { - type = 'ammo', - item = 'uranium-rounds-magazine', - amount = 100, - enabled = false - }, - { - type = 'ammo', - item = 'piercing-rounds-magazine', - amount = 100, - enabled = false - }, - { - type = 'ammo', - item = 'firearm-magazine', - amount = 100, - enabled = false - }, - { - type = 'fuel', - item = 'nuclear-fuel', - amount = 100, - enabled = false - }, - { - type = 'fuel', - item = 'solid-fuel', - amount = 100, - enabled = false - }, - { - type = 'fuel', - item = 'coal', - amount = 100, - enabled = false - } - } + -- General config + icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar + entities = { + ['car'] = { + { + type = 'fuel', + inventory = defines.inventory.fuel, + enabled = true + }, + { + type = 'ammo', + inventory = defines.inventory.car_ammo, + enabled = true + } + }, + ['locomotive'] = { + { + type = 'fuel', + inventory = defines.inventory.fuel, + enabled = true + } + }, + ['tank'] = { + { + type = 'fuel', + inventory = defines.inventory.fuel, + enabled = true + } + }, + ['gun-turret'] = { + { + type = 'ammo', + inventory = defines.inventory.turret_ammo, + enabled = true + } + } + }, + default_settings = { + { + type = 'ammo', + inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + item = 'uranium-rounds-magazine', + amount = 10, + enabled = false + }, + { + type = 'ammo', + inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + item = 'piercing-rounds-magazine', + amount = 10, + enabled = false + }, + { + type = 'ammo', + inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + item = 'firearm-magazine', + amount = 10, + enabled = false + }, + { + type = 'fuel', + inventories = {defines.inventory.fuel}, + item = 'nuclear-fuel', + amount = 1, + enabled = false + }, + { + type = 'fuel', + inventories = {defines.inventory.fuel}, + item = 'rocket-fuel', + amount = 10, + enabled = false + }, + { + type = 'fuel', + inventories = {defines.inventory.fuel}, + item = 'solid-fuel', + amount = 10, + enabled = false + }, + { + type = 'fuel', + inventories = {defines.inventory.fuel}, + item = 'coal', + amount = 10, + enabled = false + } + } } \ No newline at end of file diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index f7597dc4..2ae942f0 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -89,7 +89,8 @@ fuel-caption=Fuel Autofill fuel-tooltip=Autofill settings when placing vehicles toggle-tooltip=Enable or disable the autofill for the item amount-tooltip=Amount of items it will try to take from your inventory and put in the turret - +confirmed=Set autofill amount to __1__ for __2__ +filled=Autofilled the __1__ with __2__ __3__ [warp-list] main-caption=Warp List main-tooltip=Warp List; Must be within __1__ tiles to use diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 98fceb41..1d4169cb 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -4,11 +4,14 @@ @alias autofill ]] +local Game = require 'utils.game' --- @dep utils.game local Gui = require 'expcore.gui' --- @dep expcore.gui local Global = require 'utils.global' --- @dep utils.global local config = require 'config.gui.autofill' --- @dep config.gui.autofill local Event = require 'utils.event' --- @dep utils.event +local print_text = Game.print_floating_text -- (surface, position, text, color) + --- Table that stores if autofill is enabled or not local autofill_player_settings = {} Global.register(autofill_player_settings, function(tbl) @@ -71,8 +74,18 @@ Gui.element(function(event_trigger, parent, amount) end) :style{ maximal_width = 90, - height = 28 + height = 32, + padding = -2 } +:on_confirmed(function(player, element, _) + local parent_name = element.parent.name + for _, setting in pairs(autofill_player_settings[player.name]) do + if 'amount-setting-'..setting.item == parent_name then + setting.amount = tonumber(element.text) + player.print({'autofill.confirmed', setting.amount, '[img=item/'..setting.item..']'}) + end + end +end) local add_autofill_setting = Gui.element(function(_, parent, item_name, amount) @@ -117,4 +130,63 @@ Event.add(defines.events.on_player_created, function(event) if not autofill_player_settings[player.name] then autofill_player_settings[player.name] = config.default_settings end -end) \ No newline at end of file +end) + +local function inventories_contains_inventory(inventories, inventory) + for _, inv in pairs(inventories) do + if inv == inventory then + return true + end + end + return false +end + +local function entity_build(event) + -- Check if player exists + local player = game.players[event.player_index] + if not player then + return + end + -- Check if the entity is in the config and enabled + local entity = event.created_entity + local entity_configs = config.entities[entity.name] + if not entity_configs then + return + end + + -- Loop over each entity config and try to furfill the request amount + for _,entity_config in pairs(entity_configs) do + if not entity_config.enabled then + break + end + local player_inventory = player.get_main_inventory() + local entity_inventory = entity.get_inventory(entity_config.inventory) + for _, setting in pairs(autofill_player_settings[player.name]) do + if not setting.enabled or not inventories_contains_inventory(setting.inventories, entity_config.inventory) then + goto continue + end + local item = setting.item + local preferd_amount = setting.amount + local item_amount = player_inventory.get_item_count(item) + if item_amount ~= 0 then + local inserted + if item_amount >= preferd_amount then + if not entity_inventory.can_insert({name=item, count=preferd_amount}) then + goto continue + end + inserted = entity_inventory.insert({name=item, count=preferd_amount}) + player_inventory.remove({name=item, count=inserted}) + print_text(entity.surface, entity.position, {'autofill.filled', '[img=entity/'..entity.name..']', inserted, '[img=item/'..item..']' }, { r = 0, g = 255, b = 0, a = 1}) + else + inserted = entity_inventory.insert({name=item, count=item_amount}) + player_inventory.remove({name=item, count=inserted}) + print_text(entity.surface, entity.position, {'autofill.filled', '[img=entity/'..entity.name..']', inserted, '[img=item/'..item..']' }, { r = 255, g = 165, b = 0, a = 1}) + end + goto continue + end + ::continue:: + end + end +end + +Event.add(defines.events.on_built_entity, entity_build) \ No newline at end of file From 05153c7a6cd23171f3fcf3cec0d73b503a728aa0 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 20 Aug 2020 21:03:45 +0200 Subject: [PATCH 012/187] Fix desync settings table shared acros all players --- modules/gui/autofill.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 1d4169cb..78bf5192 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -9,6 +9,7 @@ local Gui = require 'expcore.gui' --- @dep expcore.gui local Global = require 'utils.global' --- @dep utils.global local config = require 'config.gui.autofill' --- @dep config.gui.autofill local Event = require 'utils.event' --- @dep utils.event +local table = require 'overrides.table' --- @dep overrides.table local print_text = Game.print_floating_text -- (surface, position, text, color) @@ -128,7 +129,7 @@ Gui.left_toolbar_button(config.icon, {'autofill.main-tooltip'}, autofill_contain Event.add(defines.events.on_player_created, function(event) local player = game.players[event.player_index] if not autofill_player_settings[player.name] then - autofill_player_settings[player.name] = config.default_settings + autofill_player_settings[player.name] = table.deep_copy(config.default_settings) end end) From 8efa1c09544a910c189a73341ff832bcba1be664 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 20 Aug 2020 21:45:35 +0200 Subject: [PATCH 013/187] Locale and code quality improvements - Added tank ammo autofill to config - Fixed locale to be fancier - Fixed some repatative code --- config/gui/autofill.lua | 5 +++++ locale/en/gui.cfg | 8 ++++---- modules/gui/autofill.lua | 37 +++++++++++++++++++++---------------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index 7e1605cd..d7069993 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -29,6 +29,11 @@ return { type = 'fuel', inventory = defines.inventory.fuel, enabled = true + }, + { + type = 'ammo', + inventory = defines.inventory.car_ammo, + enabled = true } }, ['gun-turret'] = { diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 2ae942f0..4d6ab0be 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -84,11 +84,11 @@ discard-tooltip=Remove task [autofill] main-tooltip=Autofill settings ammo-caption=Ammo Autofill -ammo-tooltip=Autofill settings when placing turrets +ammo-tooltip=Autofill settings when playing entities with a ammo slot fuel-caption=Fuel Autofill -fuel-tooltip=Autofill settings when placing vehicles -toggle-tooltip=Enable or disable the autofill for the item -amount-tooltip=Amount of items it will try to take from your inventory and put in the turret +fuel-tooltip=Autofill settings when placing entities with a fuel slot +toggle-tooltip=Toggle the autofill of __1__ into the __2__ slot of entities +amount-tooltip=Amount of items it will try and put into the __1__ slot of entities confirmed=Set autofill amount to __1__ for __2__ filled=Autofilled the __1__ with __2__ __3__ [warp-list] diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 78bf5192..a4e7a635 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -21,11 +21,15 @@ end) local autofill_container +local function rich_img(type, value) + return '[img='..type..'/'..value..']' +end + --- Draw a section header and main scroll -- @element autofill_section_container local section = Gui.element(function(_, parent, section_name, table_size) - -- Draw the header for the section + -- Draw the header for the section Gui.header( parent, {'autofill.'..section_name..'-caption'}, @@ -39,12 +43,12 @@ Gui.element(function(_, parent, section_name, table_size) end) local toggle_item_button = -Gui.element(function(event_trigger, parent, item_name) +Gui.element(function(event_trigger, parent, setting) return parent.add{ name = event_trigger, type = 'sprite-button', - sprite = 'item/'..item_name, - tooltip = {'autofill.toggle-tooltip'}, + sprite = 'item/'..setting.item, + tooltip = {'autofill.toggle-tooltip', rich_img('item', setting.item), setting.type}, style = 'shortcut_bar_button_red' } end) @@ -64,12 +68,12 @@ end) end) local amount_textfield = -Gui.element(function(event_trigger, parent, amount) +Gui.element(function(event_trigger, parent, setting) return parent.add{ name = event_trigger, type = 'textfield', - text = amount, - tooltip = {'autofill.amount-tooltip'}, + text = setting.amount, + tooltip = {'autofill.amount-tooltip', setting.type}, clear_and_focus_on_right_click = true } end) @@ -89,13 +93,13 @@ end) end) local add_autofill_setting = -Gui.element(function(_, parent, item_name, amount) - local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item_name } - local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..item_name } +Gui.element(function(_, parent, setting) + local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..setting.item } + local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..setting.item } toggle_flow.style.padding = 0 amount_flow.style.padding = 0 - toggle_item_button(toggle_flow, item_name) - amount_textfield(amount_flow, amount) + toggle_item_button(toggle_flow, setting) + amount_textfield(amount_flow, setting) end) --- Main gui container for the left flow @@ -104,15 +108,16 @@ autofill_container = Gui.element(function(event_trigger, parent) -- Draw the internal container local container = Gui.container(parent, event_trigger, 100) + -- Draw the header local ammo_table = section(container, 'ammo', 2) local fuel_table = section(container, 'fuel', 2) for _, setting in pairs(config.default_settings) do if setting.type == 'ammo' then - add_autofill_setting(ammo_table, setting.item, setting.amount) + add_autofill_setting(ammo_table, setting) elseif setting.type == 'fuel' then - add_autofill_setting(fuel_table, setting.item, setting.amount) + add_autofill_setting(fuel_table, setting) end end @@ -177,11 +182,11 @@ local function entity_build(event) end inserted = entity_inventory.insert({name=item, count=preferd_amount}) player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, entity.position, {'autofill.filled', '[img=entity/'..entity.name..']', inserted, '[img=item/'..item..']' }, { r = 0, g = 255, b = 0, a = 1}) + print_text(entity.surface, entity.position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 0, g = 255, b = 0, a = 1}) else inserted = entity_inventory.insert({name=item, count=item_amount}) player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, entity.position, {'autofill.filled', '[img=entity/'..entity.name..']', inserted, '[img=item/'..item..']' }, { r = 255, g = 165, b = 0, a = 1}) + print_text(entity.surface, entity.position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 255, g = 165, b = 0, a = 1}) end goto continue end From 9911a0e3d3b872d1d33cc2d55c89e53f48cb6a54 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 20 Aug 2020 21:48:53 +0200 Subject: [PATCH 014/187] Fixed redundand contains function --- modules/gui/autofill.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index a4e7a635..d9419554 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -138,15 +138,6 @@ Event.add(defines.events.on_player_created, function(event) end end) -local function inventories_contains_inventory(inventories, inventory) - for _, inv in pairs(inventories) do - if inv == inventory then - return true - end - end - return false -end - local function entity_build(event) -- Check if player exists local player = game.players[event.player_index] @@ -168,7 +159,7 @@ local function entity_build(event) local player_inventory = player.get_main_inventory() local entity_inventory = entity.get_inventory(entity_config.inventory) for _, setting in pairs(autofill_player_settings[player.name]) do - if not setting.enabled or not inventories_contains_inventory(setting.inventories, entity_config.inventory) then + if not setting.enabled or not table.contains(setting.inventories, entity_config.inventory) then goto continue end local item = setting.item From dac4d40682d5b3c5f6a5a50b8cea900dd405c2af Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 20 Aug 2020 22:29:50 +0200 Subject: [PATCH 015/187] Changed config/settings loop - Fixed settings/entity loop should be faster now - Fixed floating text position overlapping - Added more comments --- config/gui/autofill.lua | 12 ++++++------ modules/gui/autofill.lua | 39 +++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index d7069993..60cc91a8 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -6,38 +6,38 @@ return { icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar entities = { ['car'] = { - { + [defines.inventory.fuel] = { type = 'fuel', inventory = defines.inventory.fuel, enabled = true }, - { + [defines.inventory.car_ammo] = { type = 'ammo', inventory = defines.inventory.car_ammo, enabled = true } }, ['locomotive'] = { - { + [defines.inventory.fuel] = { type = 'fuel', inventory = defines.inventory.fuel, enabled = true } }, ['tank'] = { - { + [defines.inventory.fuel] = { type = 'fuel', inventory = defines.inventory.fuel, enabled = true }, - { + [defines.inventory.car_ammo] = { type = 'ammo', inventory = defines.inventory.car_ammo, enabled = true } }, ['gun-turret'] = { - { + [defines.inventory.turret_ammo] = { type = 'ammo', inventory = defines.inventory.turret_ammo, enabled = true diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index d9419554..9fdc3736 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -150,39 +150,50 @@ local function entity_build(event) if not entity_configs then return end + -- Get the inventory of the player + local player_inventory = player.get_main_inventory() - -- Loop over each entity config and try to furfill the request amount - for _,entity_config in pairs(entity_configs) do - if not entity_config.enabled then - break + local text_position = { x = entity.position.x, y = entity.position.y } + -- Loop over all possible item settings to insert into the entity + for _, setting in pairs(autofill_player_settings[player.name]) do + if not setting.enabled then + goto end_setting end - local player_inventory = player.get_main_inventory() - local entity_inventory = entity.get_inventory(entity_config.inventory) - for _, setting in pairs(autofill_player_settings[player.name]) do - if not setting.enabled or not table.contains(setting.inventories, entity_config.inventory) then - goto continue + -- Loop over possible inventories for this setting to put into the vehicle + for _, inventory in pairs(setting.inventories) do + -- Check in the configs if the inventory type exists and is enabled for this vehicle + if not entity_configs[inventory] or not entity_configs[inventory].enabled then + goto end_inventory end + + -- Get the inventory of the entity + local entity_inventory = entity.get_inventory(inventory) + if not entity_inventory then + goto end_inventory + end + local item = setting.item local preferd_amount = setting.amount local item_amount = player_inventory.get_item_count(item) if item_amount ~= 0 then local inserted + text_position.y = text_position.y - 0.2 if item_amount >= preferd_amount then if not entity_inventory.can_insert({name=item, count=preferd_amount}) then - goto continue + goto end_inventory end inserted = entity_inventory.insert({name=item, count=preferd_amount}) player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, entity.position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 0, g = 255, b = 0, a = 1}) + print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 0, g = 255, b = 0, a = 1}) else inserted = entity_inventory.insert({name=item, count=item_amount}) player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, entity.position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 255, g = 165, b = 0, a = 1}) + print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 255, g = 165, b = 0, a = 1}) end - goto continue end - ::continue:: + ::end_inventory:: end + ::end_setting:: end end From 074f6b9ab4f60a0a5adb99eaa6108ce13c52745e Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Wed, 26 Aug 2020 14:31:27 +0000 Subject: [PATCH 016/187] Automatic Doc Update --- docs/addons/Advanced-Start.html | 2 +- docs/addons/Chat-Popups.html | 2 +- docs/addons/Chat-Reply.html | 2 +- docs/addons/Compilatron.html | 2 +- docs/addons/Damage-Popups.html | 2 +- docs/addons/Death-Logger.html | 2 +- docs/addons/Discord-Alerts.html | 2 +- docs/addons/Inventory-Clear.html | 2 +- docs/addons/Pollution-Grading.html | 2 +- docs/addons/Scorched-Earth.html | 2 +- docs/addons/Spawn-Area.html | 2 +- docs/addons/Tree-Decon.html | 2 +- docs/commands/Admin-Chat.html | 2 +- docs/commands/Cheat-Mode.html | 2 +- docs/commands/Clear-Inventory.html | 2 +- docs/commands/Connect.html | 2 +- docs/commands/Debug.html | 2 +- docs/commands/Find.html | 2 +- docs/commands/Help.html | 2 +- docs/commands/Home.html | 2 +- docs/commands/Interface.html | 2 +- docs/commands/Jail.html | 2 +- docs/commands/Kill.html | 2 +- docs/commands/Me.html | 2 +- docs/commands/Rainbow.html | 2 +- docs/commands/Repair.html | 2 +- docs/commands/Reports.html | 2 +- docs/commands/Roles.html | 2 +- docs/commands/Spawn.html | 2 +- docs/commands/Teleport.html | 2 +- docs/commands/Warnings.html | 2 +- docs/configs/Advanced-Start.html | 2 +- docs/configs/Bonuses.html | 2 +- docs/configs/Chat-Reply.html | 2 +- docs/configs/Commands-Auth-Admin.html | 2 +- docs/configs/Commands-Auth-Roles.html | 2 +- docs/configs/Commands-Auth-Runtime-Disable.html | 2 +- docs/configs/Commands-Parse-Roles.html | 2 +- docs/configs/Commands-Parse.html | 2 +- docs/configs/Compilatron.html | 2 +- docs/configs/Death-Logger.html | 2 +- docs/configs/Discord-Alerts.html | 2 +- docs/configs/File-Loader.html | 2 +- docs/configs/Permission-Groups.html | 2 +- docs/configs/Player-List.html | 2 +- docs/configs/Pollution-Grading.html | 2 +- docs/configs/Popup-Messages.html | 2 +- docs/configs/Preset-Player-Colours.html | 2 +- docs/configs/Preset-Player-Quickbar.html | 2 +- docs/configs/Repair.html | 2 +- docs/configs/Rockets.html | 2 +- docs/configs/Roles.html | 2 +- docs/configs/Science.html | 2 +- docs/configs/Scorched-Earth.html | 2 +- docs/configs/Spawn-Area.html | 2 +- docs/configs/Statistics.html | 2 +- docs/configs/Tasks.html | 2 +- docs/configs/Warnings.html | 2 +- docs/configs/Warps.html | 2 +- docs/configs/inventory_clear.html | 2 +- docs/control/Jail.html | 2 +- docs/control/Production.html | 2 +- docs/control/Reports.html | 2 +- docs/control/Rockets.html | 2 +- docs/control/Tasks.html | 2 +- docs/control/Warnings.html | 2 +- docs/control/Warps.html | 2 +- docs/core/Async.html | 2 +- docs/core/Commands.html | 2 +- docs/core/Common.html | 2 +- docs/core/Datastore.html | 2 +- docs/core/External.html | 2 +- docs/core/Groups.html | 2 +- docs/core/Gui.html | 2 +- docs/core/PlayerData.html | 2 +- docs/core/Roles.html | 2 +- docs/data/Alt-View.html | 2 +- docs/data/Bonus.html | 2 +- docs/data/Greetings.html | 2 +- docs/data/Player-Colours.html | 2 +- docs/data/Quickbar.html | 2 +- docs/data/Tag.html | 2 +- docs/guis/Player-List.html | 2 +- docs/guis/Readme.html | 2 +- docs/guis/Rocket-Info.html | 2 +- docs/guis/Science-Info.html | 2 +- docs/guis/Task-List.html | 2 +- docs/guis/Warps-List.html | 2 +- docs/guis/server-ups.html | 2 +- docs/index.html | 2 +- docs/modules/control.html | 2 +- docs/modules/modules.addons.station-auto-name.html | 2 +- docs/modules/overrides.debug.html | 2 +- docs/modules/overrides.math.html | 2 +- docs/modules/overrides.table.html | 2 +- docs/modules/utils.event.html | 2 +- docs/modules/utils.event_core.html | 2 +- docs/modules/utils.task.html | 2 +- docs/topics/LICENSE.html | 2 +- docs/topics/README.md.html | 2 +- 100 files changed, 100 insertions(+), 100 deletions(-) diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index 535e9bfd..eef95aea 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index 3f442536..b26225b1 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index 6db112ae..df5d9784 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index bda49f7a..7549104b 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index 003e30f8..d3799438 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 601263fa..3e0d7872 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index b0d5befb..0253ac26 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -447,7 +447,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index 81417800..96cf9d01 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index 0683847c..4811776d 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index 118b6491..5ee3e6e9 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index 8b40d24b..1fe3dc4b 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index be69c732..4b721367 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index 36f3cb7a..b4e99909 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index f5e8e341..ec232dfa 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 13ecb39a..2c8e1d9b 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Connect.html b/docs/commands/Connect.html index d1d7e478..7947abdd 100644 --- a/docs/commands/Connect.html +++ b/docs/commands/Connect.html @@ -606,7 +606,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 7cf7af9a..f9152902 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -380,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index b2d8c3c6..73fadf8f 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index 55d85b6d..eed6842b 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -419,7 +419,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index 200237e7..d40ae292 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -473,7 +473,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index 3f6ab5eb..6468c14d 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index 3e1719ab..3635506d 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -626,7 +626,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index 043d511c..28da26aa 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index 4f483e18..8092db5e 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index e18bab98..22c24df3 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index 2a80c500..bcbebfd4 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -336,7 +336,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index 2dc4b160..f63557c4 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -600,7 +600,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index 9261bfe7..d067dc88 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index 42a8ca98..bdd960d5 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index b5a24b0a..e5e8853b 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -499,7 +499,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 1acded09..09412b62 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -584,7 +584,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index 5312c2fa..379c4e48 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -521,7 +521,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index e5d87a51..179dfdbf 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index 5c7b01d6..83804c5d 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -500,7 +500,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 2b3a8e1b..5589b71a 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -309,7 +309,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index 20eb3109..3e8e5efa 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index 11984c79..44cee792 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -457,7 +457,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index e62239d9..082964ce 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index d6317fc3..466c7834 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -325,7 +325,7 @@ see ./expcore/commands.lua for more details

    generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index aab7d220..e750aee0 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 7995c602..5f8e7a9f 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -431,7 +431,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index d328ccb8..f432264a 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 41edc429..32f074c9 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -255,7 +255,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index 65701525..a9e47c09 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index 5fdf4cf2..482f40cf 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index 3823f6a0..08112c77 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index a8d55d58..34c2f16e 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index 7adb3974..e248c4f7 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -339,7 +339,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index 1d158db0..c7a35a3f 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index eeef92dc..f2f36b4a 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index ddad5eca..063981d4 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -849,7 +849,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index a6b6b5e7..2a5e0f1b 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -307,7 +307,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index a74159a3..dd531697 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index 358d6ab6..1675db5c 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 6e5a52cc..6ca15dd8 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -759,7 +759,7 @@ generated by LDoc diff --git a/docs/configs/Statistics.html b/docs/configs/Statistics.html index a7b2ec84..b89bd118 100644 --- a/docs/configs/Statistics.html +++ b/docs/configs/Statistics.html @@ -639,7 +639,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index 9194d7c8..23f16b43 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index c306d3f1..b818404e 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -370,7 +370,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 8215cf4c..bc9c98f4 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -789,7 +789,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index bec18e6f..1e0d94d9 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index 18ae5fca..ed05ffa8 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -1223,7 +1223,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index a9242949..6d4ea915 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -1344,7 +1344,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index 6103bd77..63ed66c2 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -1157,7 +1157,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 03734968..4727635a 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -999,7 +999,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index b82f48a1..f54f492e 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -985,7 +985,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index 50f158af..c4d6c309 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -1540,7 +1540,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index 6d8f1f9d..4d682306 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -1522,7 +1522,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index bc1d3caa..92be2222 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -613,7 +613,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index 0411c950..a3d668f3 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -2428,7 +2428,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index 355d0dc2..e4d4dfaf 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -2767,7 +2767,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html index 062ec7f0..a212ced4 100644 --- a/docs/core/Datastore.html +++ b/docs/core/Datastore.html @@ -2964,7 +2964,7 @@ ExampleData:on_update(function(key, value) generated by LDoc diff --git a/docs/core/External.html b/docs/core/External.html index 5618848d..6ecd89ed 100644 --- a/docs/core/External.html +++ b/docs/core/External.html @@ -748,7 +748,7 @@ generated by LDoc diff --git a/docs/core/Groups.html b/docs/core/Groups.html index 7493f83d..bc536e08 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -1443,7 +1443,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index 323744e8..19f13929 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -4421,7 +4421,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html index e911c5ce..1a26a3d9 100644 --- a/docs/core/PlayerData.html +++ b/docs/core/PlayerData.html @@ -531,7 +531,7 @@ generated by LDoc diff --git a/docs/core/Roles.html b/docs/core/Roles.html index 09bd9cb7..f1480209 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -3350,7 +3350,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html index 5e4d30f6..bd1194d6 100644 --- a/docs/data/Alt-View.html +++ b/docs/data/Alt-View.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/data/Bonus.html b/docs/data/Bonus.html index 8ab2f5af..51c80a2c 100644 --- a/docs/data/Bonus.html +++ b/docs/data/Bonus.html @@ -487,7 +487,7 @@ generated by LDoc diff --git a/docs/data/Greetings.html b/docs/data/Greetings.html index 4666859a..9a66ba57 100644 --- a/docs/data/Greetings.html +++ b/docs/data/Greetings.html @@ -430,7 +430,7 @@ generated by LDoc diff --git a/docs/data/Player-Colours.html b/docs/data/Player-Colours.html index 9fc2a1bd..67be6ea4 100644 --- a/docs/data/Player-Colours.html +++ b/docs/data/Player-Colours.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/data/Quickbar.html b/docs/data/Quickbar.html index b14526c5..a384694b 100644 --- a/docs/data/Quickbar.html +++ b/docs/data/Quickbar.html @@ -408,7 +408,7 @@ generated by LDoc diff --git a/docs/data/Tag.html b/docs/data/Tag.html index 17b9557f..f4a18c07 100644 --- a/docs/data/Tag.html +++ b/docs/data/Tag.html @@ -486,7 +486,7 @@ generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index 1116c164..6d1a02ad 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index b01eee7f..21dae04e 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -998,7 +998,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index 772e09cf..f8a92235 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index 23f47c99..0887cfc8 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 2ec7904b..82f8361e 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index 453645fd..a7da43b6 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -1042,7 +1042,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index 5f7167be..34c48b76 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -508,7 +508,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index 02711460..af809c66 100644 --- a/docs/index.html +++ b/docs/index.html @@ -550,7 +550,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index 7609ff89..06ed2ff6 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 2393a067..53df4814 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -308,7 +308,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index e01332f3..0c6b78f5 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -669,7 +669,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index d841d36a..9df8c244 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -368,7 +368,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index cfe9d613..99686ccf 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -2023,7 +2023,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index 31375b50..19138144 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -1307,7 +1307,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index 58fbb756..f88ae78c 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -449,7 +449,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index 4911d741..ce30595f 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -666,7 +666,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 6caaa821..235f3fa8 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -804,7 +804,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index dea00046..6e10eff0 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -359,7 +359,7 @@ Please report these errors to [the issues page](issues). generated by LDoc From f1537af711024c2064b55cd531ea8c8057cc98cf Mon Sep 17 00:00:00 2001 From: badgamernl Date: Tue, 1 Sep 2020 05:43:05 +0200 Subject: [PATCH 017/187] Major overhaul of inner workings: - Change config layout to entity based; - Change the gui layout to entity based; - Fix entity placed event to work with new system; - Change gui styles to fit other gui's more; - Added demo entities with items: * Car; * Locomotive; * Spidertron; * Gun Turret; * Stone furnace; * Steel furnace; --- config/gui/autofill.lua | 296 +++++++++++++++++++++++----------- locale/en/gui.cfg | 11 +- modules/gui/autofill.lua | 333 +++++++++++++++++++++++++++------------ 3 files changed, 440 insertions(+), 200 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index 60cc91a8..da9069f0 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -1,98 +1,212 @@ --- This file contains all the different settings for the autofill system and gui -- @config Autofill -return { +local table = require 'overrides.table' --- @dep overrides.table + +local ammo = 'ammo' +local fuel = 'fuel' +local shell = 'shell' + +local car = 'car' +local tank = 'tank' +local spidertron = 'spidertron' +local locomotive = 'locomotive' +local gun_turret = 'gun-turret' +local stone_furnace = 'stone-furnace' +local steel_furnace = 'steel-furnace' + +local config = { -- General config icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar - entities = { - ['car'] = { - [defines.inventory.fuel] = { - type = 'fuel', - inventory = defines.inventory.fuel, - enabled = true - }, - [defines.inventory.car_ammo] = { - type = 'ammo', - inventory = defines.inventory.car_ammo, - enabled = true - } - }, - ['locomotive'] = { - [defines.inventory.fuel] = { - type = 'fuel', - inventory = defines.inventory.fuel, - enabled = true - } - }, - ['tank'] = { - [defines.inventory.fuel] = { - type = 'fuel', - inventory = defines.inventory.fuel, - enabled = true - }, - [defines.inventory.car_ammo] = { - type = 'ammo', - inventory = defines.inventory.car_ammo, - enabled = true - } - }, - ['gun-turret'] = { - [defines.inventory.turret_ammo] = { - type = 'ammo', - inventory = defines.inventory.turret_ammo, - enabled = true - } - } + categories = { + ammo = ammo, + fuel = fuel, + shell = shell }, - default_settings = { - { - type = 'ammo', - inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - item = 'uranium-rounds-magazine', - amount = 10, - enabled = false - }, - { - type = 'ammo', - inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - item = 'piercing-rounds-magazine', - amount = 10, - enabled = false - }, - { - type = 'ammo', - inventories = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - item = 'firearm-magazine', - amount = 10, - enabled = false - }, - { - type = 'fuel', - inventories = {defines.inventory.fuel}, - item = 'nuclear-fuel', - amount = 1, - enabled = false - }, - { - type = 'fuel', - inventories = {defines.inventory.fuel}, - item = 'rocket-fuel', - amount = 10, - enabled = false - }, - { - type = 'fuel', - inventories = {defines.inventory.fuel}, - item = 'solid-fuel', - amount = 10, - enabled = false - }, - { - type = 'fuel', - inventories = {defines.inventory.fuel}, - item = 'coal', - amount = 10, - enabled = false - } + entities = { + car = car, + tank = tank, + spidertron = spidertron, + locomotive = locomotive, + gun_turret = gun_turret, + stone_furnace = stone_furnace, + steel_furnace = steel_furnace + }, + default_entities = {} +} + +local default_autofill_item_settings = { + { + category = config.categories.ammo, + entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, + type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + name = 'uranium-rounds-magazine', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, + type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + name = 'piercing-rounds-magazine', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, + type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + name = 'firearm-magazine', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.tank}, + type = {defines.inventory.car_ammo}, + name = 'flamethrower-ammo', + amount = 10, + enabled = false + }, + { + category = config.categories.shell, + entity = {config.entities.tank}, + type = {defines.inventory.car_ammo}, + name = 'cannon-shell', + amount = 10, + enabled = false + }, + { + category = config.categories.shell, + entity = {config.entities.tank}, + type = {defines.inventory.car_ammo}, + name = 'explosive-cannon-shell', + amount = 10, + enabled = false + }, + { + category = config.categories.shell, + entity = {config.entities.tank}, + type = {defines.inventory.car_ammo}, + name = 'uranium-cannon-shell', + amount = 10, + enabled = false + }, + { + category = config.categories.shell, + entity = {config.entities.tank}, + type = {defines.inventory.car_ammo}, + name = 'explosive-uranium-cannon-shell', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.spidertron}, + type = {defines.inventory.car_ammo}, + name = 'rocket', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.spidertron}, + type = {defines.inventory.car_ammo}, + name = 'explosive-rocket', + amount = 10, + enabled = false + }, + { + category = config.categories.ammo, + entity = {config.entities.spidertron}, + type = {defines.inventory.car_ammo}, + name = 'atomic-bomb', + amount = 10, + enabled = false + }, + { + category = config.categories.fuel, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + type = {defines.inventory.fuel}, + name = 'nuclear-fuel', + amount = 1, + enabled = false + }, + { + category = config.categories.fuel, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + type = {defines.inventory.fuel}, + name = 'rocket-fuel', + amount = 10, + enabled = false + }, + { + category = config.categories.fuel, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + type = {defines.inventory.fuel}, + name = 'solid-fuel', + amount = 10, + enabled = false + }, + { + category = config.categories.fuel, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + type = {defines.inventory.fuel}, + name = 'coal', + amount = 10, + enabled = false } -} \ No newline at end of file +} + +local function get_items_by_type(entity, type) + local items = entity.items + for _, item in pairs(default_autofill_item_settings) do + if table.contains(item.entity, entity.entity) then + if table.contains(item.type, type) then + items[item.name] = { + entity = entity.entity, + category = item.category, + type = type, + name = item.name, + amount = item.amount, + enabled = item.enabled + } + end + end + end + return items +end + +local default_entities = config.default_entities + +local function generate_default_setting(entity_name, type, enabled) + if not default_entities[entity_name] then + default_entities[entity_name] = { + entity = entity_name, + enabled = enabled, + items = {} + } + end + get_items_by_type(default_entities[entity_name], type) +end + +generate_default_setting(config.entities.car, defines.inventory.fuel, true) +generate_default_setting(config.entities.car, defines.inventory.car_ammo, true) + +generate_default_setting(config.entities.locomotive, defines.inventory.fuel, true) + +generate_default_setting(config.entities.tank, defines.inventory.fuel, true) +generate_default_setting(config.entities.tank, defines.inventory.car_ammo, true) + +generate_default_setting(config.entities.spidertron, defines.inventory.car_ammo, true) + +generate_default_setting(config.entities.gun_turret, defines.inventory.turret_ammo, true) + +generate_default_setting(config.entities.stone_furnace, defines.inventory.fuel, true) + +generate_default_setting(config.entities.steel_furnace, defines.inventory.fuel, true) + +-- Cleanup temporary table +default_autofill_item_settings = nil + +return config \ No newline at end of file diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 4d6ab0be..6cebaa17 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -83,13 +83,12 @@ discard-tooltip=Remove task [autofill] main-tooltip=Autofill settings -ammo-caption=Ammo Autofill -ammo-tooltip=Autofill settings when playing entities with a ammo slot -fuel-caption=Fuel Autofill -fuel-tooltip=Autofill settings when placing entities with a fuel slot +toggle-section-tooltip=Expand Section +toggle-section-collapse-tooltip=Collapse Section +toggle-entity-tooltip=Toggle the autofill of __1__ entity (overwrites autofill settings of the entity) toggle-tooltip=Toggle the autofill of __1__ into the __2__ slot of entities -amount-tooltip=Amount of items it will try and put into the __1__ slot of entities -confirmed=Set autofill amount to __1__ for __2__ +amount-tooltip=Amount of items it will try and put into the __1__ slot of __2__ +confirmed=Set autofill amount to __1__ __2__ for __3__ filled=Autofilled the __1__ with __2__ __3__ [warp-list] main-caption=Warp List diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 9fdc3736..a675e147 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -25,99 +25,232 @@ local function rich_img(type, value) return '[img='..type..'/'..value..']' end ---- Draw a section header and main scroll --- @element autofill_section_container -local section = -Gui.element(function(_, parent, section_name, table_size) - -- Draw the header for the section - Gui.header( - parent, - {'autofill.'..section_name..'-caption'}, - {'autofill.'..section_name..'-tooltip'}, - true, - section_name..'-header' - ) - -- Table used to display the settings - local scroll_table = Gui.scroll_table(parent, 215, table_size, section_name..'-scroll-table') - return scroll_table -end) - -local toggle_item_button = -Gui.element(function(event_trigger, parent, setting) - return parent.add{ - name = event_trigger, - type = 'sprite-button', - sprite = 'item/'..setting.item, - tooltip = {'autofill.toggle-tooltip', rich_img('item', setting.item), setting.type}, - style = 'shortcut_bar_button_red' - } -end) -:style(Gui.sprite_style(32, nil, { right_margin = -3 })) -:on_click(function(player, element) - for _, setting in pairs(autofill_player_settings[player.name]) do - if 'item/'..setting.item == element.sprite then - if setting.enabled then - setting.enabled = false - element.style = 'shortcut_bar_button_red' - else - setting.enabled = true - element.style = 'shortcut_bar_button_green' +-- Button to toggle a section dropdown +-- @element toggle_section +local toggle_section = +Gui.element{ + type = 'sprite-button', + sprite = 'utility/expand_dark', + hovered_sprite = 'utility/expand', + tooltip = {'autofill.toggle-section-tooltip'} +} +toggle_section +:style(Gui.sprite_style(20)) +:on_click(function(_, element, _) + local header_flow = element.parent + local flow_name = header_flow.caption + local flow = header_flow.parent.parent[flow_name] + if Gui.toggle_visible_state(flow) then + element.sprite = 'utility/collapse_dark' + element.hovered_sprite = 'utility/collapse' + element.tooltip = {'autofill.toggle-section-collapse-tooltip'} + else + element.sprite = 'utility/expand_dark' + element.hovered_sprite = 'utility/expand' + element.tooltip = {'autofill.toggle-section-tooltip'} + end + local event = {} + for _, child in pairs(element.parent.parent.children) do + if child.alignment and child.alignment[toggle_section.name] then + if element.parent.name ~= child.name then + event.element = child.alignment[toggle_section.name] + toggle_section:raise_custom_event(event) end end end end) +-- Used to assign an event to the header label to trigger a toggle +-- @element header_toggle +local header_toggle = Gui.element() +:on_click(function(_, element, event) + event.element = element.parent.alignment[toggle_section.name] + toggle_section:raise_custom_event(event) +end) +-- Used to assign an event to the header label to trigger a toggle +-- @element header_toggle +local entity_toggle = Gui.element(function(event_trigger, parent, entity_name) + return parent.add{ + name = event_trigger, + type = 'sprite-button', + sprite = 'item/'..entity_name, + tooltip = {'autofill.toggle-entity-tooltip', rich_img('item', entity_name)}, + style = 'shortcut_bar_button_green' + } +end) +:style(Gui.sprite_style(22)) +:on_click(function(player, element, _) + local entity_name = string.sub(element.parent.parent.name, 0, -(1 + string.len('-header'))) + if not autofill_player_settings[player.name] then return end + local setting = autofill_player_settings[player.name][entity_name] + if not setting then return end + if setting.enabled then + setting.enabled = false + element.style = 'shortcut_bar_button_red' + else + setting.enabled = true + element.style = 'shortcut_bar_button_green' + end +end) + +--- Draw a section header and main scroll +-- @element autofill_section_container +local section = +Gui.element(function(_, parent, section_name, table_size) + -- Draw the header for the section + local header = Gui.header( + parent, + {'entity-name.'..section_name}, + {'autofill.toggle-section-tooltip'}, + true, + section_name..'-header', + header_toggle.name + ) + -- Right aligned button to toggle the section + header.caption = section_name + entity_toggle(header, section_name) + toggle_section(header) + + -- Table used to display the settings + local scroll_table = Gui.scroll_table(parent, 999, table_size, section_name) + scroll_table.parent.visible = false + + return scroll_table +end) + + + +local toggle_item_button = +Gui.element(function(event_trigger, parent, item) + return parent.add{ + name = event_trigger, + type = 'sprite-button', + sprite = 'item/'..item.name, + tooltip = {'autofill.toggle-tooltip', rich_img('item', item.name), item.category}, + style = 'shortcut_bar_button_red' + } +end) +:style(Gui.sprite_style(32, nil, { right_margin = -3 })) +:on_click(function(player, element) + local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) + local entity_name = element.parent.parent.parent.parent.parent.parent.name + if not autofill_player_settings[player.name] then return end + local setting = autofill_player_settings[player.name][entity_name] + if not setting then return end + local item = setting.items[item_name] + if not item then return end + if item.enabled then + item.enabled = false + element.style = 'shortcut_bar_button_red' + else + item.enabled = true + element.style = 'shortcut_bar_button_green' + end +end) + local amount_textfield = -Gui.element(function(event_trigger, parent, setting) +Gui.element(function(event_trigger, parent, item) return parent.add{ name = event_trigger, type = 'textfield', - text = setting.amount, - tooltip = {'autofill.amount-tooltip', setting.type}, + text = item.amount, + tooltip = {'autofill.amount-tooltip', item.category, rich_img('item', item.entity) }, clear_and_focus_on_right_click = true } end) :style{ - maximal_width = 90, - height = 32, + maximal_width = 40, + height = 31, padding = -2 } :on_confirmed(function(player, element, _) - local parent_name = element.parent.name - for _, setting in pairs(autofill_player_settings[player.name]) do - if 'amount-setting-'..setting.item == parent_name then - setting.amount = tonumber(element.text) - player.print({'autofill.confirmed', setting.amount, '[img=item/'..setting.item..']'}) - end - end + local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) + local entity_name = element.parent.parent.parent.parent.parent.parent.name + if not autofill_player_settings[player.name] then return end + local setting = autofill_player_settings[player.name][entity_name] + if not setting then return end + local item = setting.items[item_name] + if not item then return end + item.amount = tonumber(element.text) + player.print({'autofill.confirmed', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) }) end) local add_autofill_setting = -Gui.element(function(_, parent, setting) - local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..setting.item } - local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..setting.item } +Gui.element(function(_, parent, item) + local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item.name } + local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..item.name } toggle_flow.style.padding = 0 amount_flow.style.padding = 0 - toggle_item_button(toggle_flow, setting) - amount_textfield(amount_flow, setting) + toggle_item_button(toggle_flow, item) + amount_textfield(amount_flow, item) end) +local toggle_item_button_empty = +Gui.element(function(_, parent, i) + return parent.add{ + name = 'toggle-setting-empty-frame-'..i, + type = 'sprite-button' + } +end) +:style(Gui.sprite_style(32, nil, { right_margin = -3 })) + + +local amount_textfield_empty = +Gui.element(function(_, parent, i) + return parent.add{ + name = 'amount-setting-empty-frame-'..i, + type = 'textfield' + } +end) +:style{ maximal_width = 40, height = 31, padding = -2 } + +local add_empty_autofill_setting = +Gui.element(function(_, parent, i) + local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-empty-'..i } + local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-empty-'..i } + toggle_flow.style.padding = 0 + amount_flow.style.padding = 0 + local toggle_element = toggle_item_button_empty(toggle_flow, i) + toggle_element.enabled = false + local amount_element = amount_textfield_empty(amount_flow, i) + amount_element.enabled = false +end) + + --- Main gui container for the left flow -- @element autofill_container autofill_container = Gui.element(function(event_trigger, parent) -- Draw the internal container - local container = Gui.container(parent, event_trigger, 100) - + local container = Gui.container(parent, event_trigger) + container.parent.style.minimal_width = 245 -- Draw the header - local ammo_table = section(container, 'ammo', 2) - local fuel_table = section(container, 'fuel', 2) + for _, setting in pairs(config.default_entities) do + local table_sizes = {} + local tables = {} + local entity_table = section(container, setting.entity, 3) + for _, category in pairs(config.categories) do + if not table_sizes[category] then table_sizes[category] = 0 end + local alignment = Gui.alignment(entity_table, category..'-'..setting.entity, 'center', 'top') + alignment.style.padding = 0 + local category_table = Gui.scroll_table(alignment, 999, 2, category) + category_table.parent.style.padding = 0 + tables[category] = category_table + for _, item in pairs(setting.items) do + if item.category == category then + add_autofill_setting(category_table, item) + table_sizes[category] = table_sizes[category] + 1 + end + end + end - for _, setting in pairs(config.default_settings) do - if setting.type == 'ammo' then - add_autofill_setting(ammo_table, setting) - elseif setting.type == 'fuel' then - add_autofill_setting(fuel_table, setting) + local t = table.get_values(table_sizes) + table.sort(t) + local biggest = t[#t] + for category, size in pairs(table_sizes) do + for i=biggest-size,1,-1 do + add_empty_autofill_setting(tables[category], i) + end end end @@ -134,8 +267,10 @@ Gui.left_toolbar_button(config.icon, {'autofill.main-tooltip'}, autofill_contain Event.add(defines.events.on_player_created, function(event) local player = game.players[event.player_index] if not autofill_player_settings[player.name] then - autofill_player_settings[player.name] = table.deep_copy(config.default_settings) + autofill_player_settings[player.name] = table.deep_copy(config.default_entities) end + + print(game.table_to_json(autofill_player_settings[player.name])) end) local function entity_build(event) @@ -146,54 +281,46 @@ local function entity_build(event) end -- Check if the entity is in the config and enabled local entity = event.created_entity - local entity_configs = config.entities[entity.name] - if not entity_configs then - return - end + + -- Check if player has settings + if not autofill_player_settings[player.name] then return end + + -- Check if autofill for the entity is enabled + if not autofill_player_settings[player.name][entity.name] then return end + -- Get the inventory of the player local player_inventory = player.get_main_inventory() local text_position = { x = entity.position.x, y = entity.position.y } - -- Loop over all possible item settings to insert into the entity - for _, setting in pairs(autofill_player_settings[player.name]) do - if not setting.enabled then - goto end_setting - end - -- Loop over possible inventories for this setting to put into the vehicle - for _, inventory in pairs(setting.inventories) do - -- Check in the configs if the inventory type exists and is enabled for this vehicle - if not entity_configs[inventory] or not entity_configs[inventory].enabled then - goto end_inventory - end + -- Loop over all possible items to insert into the entity + for _, item in pairs(autofill_player_settings[player.name][entity.name].items) do + -- Check if the item is enabled or goto next item + if not item.enabled then goto end_item end - -- Get the inventory of the entity - local entity_inventory = entity.get_inventory(inventory) - if not entity_inventory then - goto end_inventory - end + -- Get the inventory of the entity or goto next item + local entity_inventory = entity.get_inventory(item.type) + if not entity_inventory then goto end_item end - local item = setting.item - local preferd_amount = setting.amount - local item_amount = player_inventory.get_item_count(item) - if item_amount ~= 0 then - local inserted - text_position.y = text_position.y - 0.2 - if item_amount >= preferd_amount then - if not entity_inventory.can_insert({name=item, count=preferd_amount}) then - goto end_inventory - end - inserted = entity_inventory.insert({name=item, count=preferd_amount}) - player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 0, g = 255, b = 0, a = 1}) - else - inserted = entity_inventory.insert({name=item, count=item_amount}) - player_inventory.remove({name=item, count=inserted}) - print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item) }, { r = 255, g = 165, b = 0, a = 1}) + local preferd_amount = item.amount + local item_amount = player_inventory.get_item_count(item.name) + if item_amount ~= 0 then + local inserted + text_position.y = text_position.y - 0.2 + if item_amount >= preferd_amount then + -- Can item be inserted? no, goto next item! + if not entity_inventory.can_insert({name=item.name, count=preferd_amount}) then + goto end_item end + inserted = entity_inventory.insert({name=item.name, count=preferd_amount}) + player_inventory.remove({name=item.name, count=inserted}) + print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item.name) }, { r = 0, g = 255, b = 0, a = 1}) + else + inserted = entity_inventory.insert({name=item.name, count=item_amount}) + player_inventory.remove({name=item.name, count=inserted}) + print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item.name) }, { r = 255, g = 165, b = 0, a = 1}) end - ::end_inventory:: end - ::end_setting:: + ::end_item:: end end From 665ecfca7c7b222249cd2fd99bd01a8a221f46cd Mon Sep 17 00:00:00 2001 From: badgamernl Date: Wed, 2 Sep 2020 00:10:10 +0200 Subject: [PATCH 018/187] Change in look and feel: - Change the way the header text is displayed; - Change entity toggle to be checkmark and cross; - Added burner mining drill to autofill; - Added comments; - Changed use of some scroll tables to just normal tables; - Fixed entity toggle not working when placing down entities; --- config/gui/autofill.lua | 12 ++++-- locale/en/gui.cfg | 1 + modules/gui/autofill.lua | 87 ++++++++++++++++++++++++++-------------- 3 files changed, 65 insertions(+), 35 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index da9069f0..118e8ec4 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -12,6 +12,7 @@ local tank = 'tank' local spidertron = 'spidertron' local locomotive = 'locomotive' local gun_turret = 'gun-turret' +local burner_mining_drill = 'burner-mining-drill' local stone_furnace = 'stone-furnace' local steel_furnace = 'steel-furnace' @@ -29,6 +30,7 @@ local config = { spidertron = spidertron, locomotive = locomotive, gun_turret = gun_turret, + burner_mining_drill = burner_mining_drill, stone_furnace = stone_furnace, steel_furnace = steel_furnace }, @@ -126,7 +128,7 @@ local default_autofill_item_settings = { }, { category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, type = {defines.inventory.fuel}, name = 'nuclear-fuel', amount = 1, @@ -134,7 +136,7 @@ local default_autofill_item_settings = { }, { category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, type = {defines.inventory.fuel}, name = 'rocket-fuel', amount = 10, @@ -142,7 +144,7 @@ local default_autofill_item_settings = { }, { category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, type = {defines.inventory.fuel}, name = 'solid-fuel', amount = 10, @@ -150,7 +152,7 @@ local default_autofill_item_settings = { }, { category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.stone_furnace, config.entities.steel_furnace}, + entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, type = {defines.inventory.fuel}, name = 'coal', amount = 10, @@ -202,6 +204,8 @@ generate_default_setting(config.entities.spidertron, defines.inventory.car_ammo, generate_default_setting(config.entities.gun_turret, defines.inventory.turret_ammo, true) +generate_default_setting(config.entities.burner_mining_drill, defines.inventory.fuel, true) + generate_default_setting(config.entities.stone_furnace, defines.inventory.fuel, true) generate_default_setting(config.entities.steel_furnace, defines.inventory.fuel, true) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 6cebaa17..ed99cd97 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -83,6 +83,7 @@ discard-tooltip=Remove task [autofill] main-tooltip=Autofill settings +toggle-section-caption=__1__ __2__ toggle-section-tooltip=Expand Section toggle-section-collapse-tooltip=Collapse Section toggle-entity-tooltip=Toggle the autofill of __1__ entity (overwrites autofill settings of the entity) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index a675e147..7e6dcf03 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -25,8 +25,9 @@ local function rich_img(type, value) return '[img='..type..'/'..value..']' end --- Button to toggle a section dropdown --- @element toggle_section +--- Toggle enitity button, used for toggling autofill for the specific entity +-- All entity autofill settings will be ignored if its disabled +-- @element toggle_item_button local toggle_section = Gui.element{ type = 'sprite-button', @@ -49,31 +50,23 @@ toggle_section element.hovered_sprite = 'utility/expand' element.tooltip = {'autofill.toggle-section-tooltip'} end - local event = {} - for _, child in pairs(element.parent.parent.children) do - if child.alignment and child.alignment[toggle_section.name] then - if element.parent.name ~= child.name then - event.element = child.alignment[toggle_section.name] - toggle_section:raise_custom_event(event) - end - end - end end) --- Used to assign an event to the header label to trigger a toggle +--- Used to assign an event to the header label to trigger a toggle -- @element header_toggle local header_toggle = Gui.element() :on_click(function(_, element, event) event.element = element.parent.alignment[toggle_section.name] toggle_section:raise_custom_event(event) end) --- Used to assign an event to the header label to trigger a toggle + +--- Used to assign an event to the header label to trigger a toggle -- @element header_toggle local entity_toggle = Gui.element(function(event_trigger, parent, entity_name) return parent.add{ name = event_trigger, type = 'sprite-button', - sprite = 'item/'..entity_name, + sprite = 'utility/confirm_slot', tooltip = {'autofill.toggle-entity-tooltip', rich_img('item', entity_name)}, style = 'shortcut_bar_button_green' } @@ -86,9 +79,11 @@ end) if not setting then return end if setting.enabled then setting.enabled = false + element.sprite = 'utility/close_black' element.style = 'shortcut_bar_button_red' else setting.enabled = true + element.sprite = 'utility/confirm_slot' element.style = 'shortcut_bar_button_green' end end) @@ -100,7 +95,7 @@ Gui.element(function(_, parent, section_name, table_size) -- Draw the header for the section local header = Gui.header( parent, - {'entity-name.'..section_name}, + {'autofill.toggle-section-caption', rich_img('item', section_name), {'entity-name.'..section_name}}, {'autofill.toggle-section-tooltip'}, true, section_name..'-header', @@ -111,15 +106,19 @@ Gui.element(function(_, parent, section_name, table_size) entity_toggle(header, section_name) toggle_section(header) - -- Table used to display the settings - local scroll_table = Gui.scroll_table(parent, 999, table_size, section_name) - scroll_table.parent.visible = false + local section_table = parent.add{ + type = 'table', + name = section_name, + column_count = table_size + } - return scroll_table + section_table.visible = false + + return section_table end) - - +--- Toggle item button, used for toggling autofill for the specific item +-- @element toggle_item_button local toggle_item_button = Gui.element(function(event_trigger, parent, item) return parent.add{ @@ -133,7 +132,7 @@ end) :style(Gui.sprite_style(32, nil, { right_margin = -3 })) :on_click(function(player, element) local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) - local entity_name = element.parent.parent.parent.parent.parent.parent.name + local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] if not setting then return end @@ -148,6 +147,9 @@ end) end end) + +--- Amount text field for a autofill item +-- @element amount_textfield local amount_textfield = Gui.element(function(event_trigger, parent, item) return parent.add{ @@ -165,7 +167,7 @@ end) } :on_confirmed(function(player, element, _) local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) - local entity_name = element.parent.parent.parent.parent.parent.parent.name + local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] if not setting then return end @@ -175,6 +177,8 @@ end) player.print({'autofill.confirmed', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) }) end) +--- Autofill setting, contains a button and a textbox +-- @element add_autofill_setting local add_autofill_setting = Gui.element(function(_, parent, item) local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item.name } @@ -185,6 +189,8 @@ Gui.element(function(_, parent, item) amount_textfield(amount_flow, item) end) +--- Toggle item button empty, just a filler gui element +-- @element toggle_item_button_empty local toggle_item_button_empty = Gui.element(function(_, parent, i) return parent.add{ @@ -195,6 +201,8 @@ end) :style(Gui.sprite_style(32, nil, { right_margin = -3 })) +--- Amount text field empty, just a filler gui element +-- @element amount_textfield_empty local amount_textfield_empty = Gui.element(function(_, parent, i) return parent.add{ @@ -204,6 +212,8 @@ Gui.element(function(_, parent, i) end) :style{ maximal_width = 40, height = 31, padding = -2 } +--- Autofill setting empty, contains filler button and textfield gui elements +-- @element add_empty_autofill_setting local add_empty_autofill_setting = Gui.element(function(_, parent, i) local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-empty-'..i } @@ -223,19 +233,33 @@ autofill_container = Gui.element(function(event_trigger, parent) -- Draw the internal container local container = Gui.container(parent, event_trigger) - container.parent.style.minimal_width = 245 - -- Draw the header + container.parent.style.minimal_width = 257 + -- Draw the scroll container + local scroll_table = Gui.scroll_table(container, 400, 1, 'autofill-scroll-table') + scroll_table.style.vertical_spacing = 0 + scroll_table.parent.vertical_scroll_policy = 'always' + -- Loop over each default entity config for _, setting in pairs(config.default_entities) do local table_sizes = {} local tables = {} - local entity_table = section(container, setting.entity, 3) + -- Draw a section for the element + local entity_table = section(scroll_table, setting.entity, 3) + -- Loop over each item category for _, category in pairs(config.categories) do if not table_sizes[category] then table_sizes[category] = 0 end + -- Draw a alignment gui to make sure the gui is floating to the top of the parent local alignment = Gui.alignment(entity_table, category..'-'..setting.entity, 'center', 'top') alignment.style.padding = 0 - local category_table = Gui.scroll_table(alignment, 999, 2, category) + -- Draw table + local category_table = alignment.add{ + type = 'table', + name = 'category-table', + column_count = 2 + } + category_table.style.vertical_spacing = 1 category_table.parent.style.padding = 0 tables[category] = category_table + -- Add item autofill setting gui elements to the table for _, item in pairs(setting.items) do if item.category == category then add_autofill_setting(category_table, item) @@ -244,6 +268,7 @@ Gui.element(function(event_trigger, parent) end end + -- Add empty gui elements for the categories with less items than the other categories local t = table.get_values(table_sizes) table.sort(t) local biggest = t[#t] @@ -269,8 +294,6 @@ Event.add(defines.events.on_player_created, function(event) if not autofill_player_settings[player.name] then autofill_player_settings[player.name] = table.deep_copy(config.default_entities) end - - print(game.table_to_json(autofill_player_settings[player.name])) end) local function entity_build(event) @@ -285,15 +308,17 @@ local function entity_build(event) -- Check if player has settings if not autofill_player_settings[player.name] then return end + local entity_settings = autofill_player_settings[player.name][entity.name] -- Check if autofill for the entity is enabled - if not autofill_player_settings[player.name][entity.name] then return end + if not entity_settings then return end + if not entity_settings.enabled then return end -- Get the inventory of the player local player_inventory = player.get_main_inventory() local text_position = { x = entity.position.x, y = entity.position.y } -- Loop over all possible items to insert into the entity - for _, item in pairs(autofill_player_settings[player.name][entity.name].items) do + for _, item in pairs(entity_settings.items) do -- Check if the item is enabled or goto next item if not item.enabled then goto end_item end From 58a23a901ac334697398db7bd514ec96a05bae20 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Wed, 2 Sep 2020 16:03:31 +0200 Subject: [PATCH 019/187] Fix amount textbox validation & event --- locale/en/gui.cfg | 3 ++- modules/gui/autofill.lua | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index ed99cd97..aac03bcf 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -89,8 +89,9 @@ toggle-section-collapse-tooltip=Collapse Section toggle-entity-tooltip=Toggle the autofill of __1__ entity (overwrites autofill settings of the entity) toggle-tooltip=Toggle the autofill of __1__ into the __2__ slot of entities amount-tooltip=Amount of items it will try and put into the __1__ slot of __2__ -confirmed=Set autofill amount to __1__ __2__ for __3__ +invalid=Set autofill amount to the maximum __1__ __2__ for __3__ filled=Autofilled the __1__ with __2__ __3__ + [warp-list] main-caption=Warp List main-tooltip=Warp List; Must be within __1__ tiles to use diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 7e6dcf03..cfbda6fe 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -157,7 +157,10 @@ Gui.element(function(event_trigger, parent, item) type = 'textfield', text = item.amount, tooltip = {'autofill.amount-tooltip', item.category, rich_img('item', item.entity) }, - clear_and_focus_on_right_click = true + clear_and_focus_on_right_click = true, + numeric = true, + allow_decimal = false, + allow_negative = false } end) :style{ @@ -165,7 +168,10 @@ end) height = 31, padding = -2 } -:on_confirmed(function(player, element, _) +:on_text_changed(function(player, element, _) + local value = tonumber(element.text) + if not value then value = 0 end + local clamped = math.clamp(value, 0, 1000) local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end @@ -173,8 +179,12 @@ end) if not setting then return end local item = setting.items[item_name] if not item then return end - item.amount = tonumber(element.text) - player.print({'autofill.confirmed', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) }) + item.amount = clamped + if clamped ~= value then + element.text = clamped + player.print({'autofill.invalid', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) }) + return + end end) --- Autofill setting, contains a button and a textbox From ecadbd653419b2935b664574d46c40883a334ff7 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 02:04:39 +0200 Subject: [PATCH 020/187] Resolve redundant config locals --- config/gui/autofill.lua | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index 118e8ec4..e9d6c6da 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -3,36 +3,23 @@ local table = require 'overrides.table' --- @dep overrides.table -local ammo = 'ammo' -local fuel = 'fuel' -local shell = 'shell' - -local car = 'car' -local tank = 'tank' -local spidertron = 'spidertron' -local locomotive = 'locomotive' -local gun_turret = 'gun-turret' -local burner_mining_drill = 'burner-mining-drill' -local stone_furnace = 'stone-furnace' -local steel_furnace = 'steel-furnace' - local config = { -- General config icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar categories = { - ammo = ammo, - fuel = fuel, - shell = shell + ammo = 'ammo', + fuel = 'fuel', + shell = 'shell' }, entities = { - car = car, - tank = tank, - spidertron = spidertron, - locomotive = locomotive, - gun_turret = gun_turret, - burner_mining_drill = burner_mining_drill, - stone_furnace = stone_furnace, - steel_furnace = steel_furnace + car = 'car', + tank = 'tank', + spidertron = 'spidertron', + locomotive = 'locomotive', + gun_turret = 'gun-turret', + burner_mining_drill = 'burner-mining-drill', + stone_furnace = 'stone-furnace', + steel_furnace = 'steel-furnace' }, default_entities = {} } From f149e446a17fbc06b970c27e0d754fc9c99c10b4 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 03:33:39 +0200 Subject: [PATCH 021/187] Fixed heavy repitition - Introduced EmmyLua documentation (can be removed if needed) - Remamed type to inv --- config/gui/autofill.lua | 207 ++++++++++++++++----------------------- modules/gui/autofill.lua | 14 +-- 2 files changed, 90 insertions(+), 131 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index e9d6c6da..c2a892c6 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -1,11 +1,35 @@ --- This file contains all the different settings for the autofill system and gui -- @config Autofill -local table = require 'overrides.table' --- @dep overrides.table +local table = require 'overrides.table' -- @dep overrides.table + +---@class AutofillEntity +---@field entity string +---@field enabled boolean +---@field items AutofillItem[] + +---@class AutofillItem +---@field entity string +---@field category string +---@field inv number +---@field name string +---@field amount number +---@field enabled boolean + +---@class DefaultItem +---@field name string +---@field amount number +---@field enabled boolean + +---@class DefaultCategory +---@field category string +---@field entity string[] +---@field inv number[] +---@field items DefaultItem[] local config = { -- General config - icon = 'item/piercing-rounds-magazine', --- @setting icon that will be used for the toolbar + icon = 'item/piercing-rounds-magazine', -- @setting icon that will be used for the toolbar categories = { ammo = 'ammo', fuel = 'fuel', @@ -21,162 +45,100 @@ local config = { stone_furnace = 'stone-furnace', steel_furnace = 'steel-furnace' }, + ---@type AutofillEntity[] default_entities = {} } -local default_autofill_item_settings = { +---@type DefaultCategory[] +local default_categories = { { category = config.categories.ammo, entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, - type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - name = 'uranium-rounds-magazine', - amount = 10, - enabled = false - }, - { - category = config.categories.ammo, - entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, - type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - name = 'piercing-rounds-magazine', - amount = 10, - enabled = false - }, - { - category = config.categories.ammo, - entity = {config.entities.car, config.entities.tank, config.entities.gun_turret}, - type = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, - name = 'firearm-magazine', - amount = 10, - enabled = false + inv = {defines.inventory.car_ammo, defines.inventory.turret_ammo}, + items = { + { name = 'uranium-rounds-magazine', amount = 10, enabled = false }, + { name = 'piercing-rounds-magazine', amount = 10, enabled = false }, + { name = 'firearm-magazine', amount = 10, enabled = false }, + } }, { category = config.categories.ammo, entity = {config.entities.tank}, - type = {defines.inventory.car_ammo}, - name = 'flamethrower-ammo', - amount = 10, - enabled = false + inv = {defines.inventory.car_ammo}, + items = { + { name = 'flamethrower-ammo', amount = 10, enabled = false }, + } }, { category = config.categories.shell, entity = {config.entities.tank}, - type = {defines.inventory.car_ammo}, - name = 'cannon-shell', - amount = 10, - enabled = false - }, - { - category = config.categories.shell, - entity = {config.entities.tank}, - type = {defines.inventory.car_ammo}, - name = 'explosive-cannon-shell', - amount = 10, - enabled = false - }, - { - category = config.categories.shell, - entity = {config.entities.tank}, - type = {defines.inventory.car_ammo}, - name = 'uranium-cannon-shell', - amount = 10, - enabled = false - }, - { - category = config.categories.shell, - entity = {config.entities.tank}, - type = {defines.inventory.car_ammo}, - name = 'explosive-uranium-cannon-shell', - amount = 10, - enabled = false + inv = {defines.inventory.car_ammo}, + items = { + { name = 'cannon-shell', amount = 10, enabled = false }, + { name = 'explosive-cannon-shell', amount = 10, enabled = false }, + { name = 'uranium-cannon-shell', amount = 10, enabled = false }, + { name = 'explosive-uranium-cannon-shell', amount = 10, enabled = false }, + } }, { category = config.categories.ammo, entity = {config.entities.spidertron}, - type = {defines.inventory.car_ammo}, - name = 'rocket', - amount = 10, - enabled = false - }, - { - category = config.categories.ammo, - entity = {config.entities.spidertron}, - type = {defines.inventory.car_ammo}, - name = 'explosive-rocket', - amount = 10, - enabled = false - }, - { - category = config.categories.ammo, - entity = {config.entities.spidertron}, - type = {defines.inventory.car_ammo}, - name = 'atomic-bomb', - amount = 10, - enabled = false + inv = {defines.inventory.car_ammo}, + items = { + { name = 'rocket', amount = 10, enabled = false }, + { name = 'explosive-rocket', amount = 10, enabled = false }, + { name = 'atomic-bomb', amount = 10, enabled = false }, + } }, { category = config.categories.fuel, entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, - type = {defines.inventory.fuel}, - name = 'nuclear-fuel', - amount = 1, - enabled = false - }, - { - category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, - type = {defines.inventory.fuel}, - name = 'rocket-fuel', - amount = 10, - enabled = false - }, - { - category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, - type = {defines.inventory.fuel}, - name = 'solid-fuel', - amount = 10, - enabled = false - }, - { - category = config.categories.fuel, - entity = {config.entities.car, config.entities.tank, config.entities.locomotive, config.entities.burner_mining_drill, config.entities.stone_furnace, config.entities.steel_furnace}, - type = {defines.inventory.fuel}, - name = 'coal', - amount = 10, - enabled = false + inv = {defines.inventory.fuel}, + items = { + { name = 'nuclear-fuel', amount = 10, enabled = false }, + { name = 'rocket-fuel', amount = 10, enabled = false }, + { name = 'solid-fuel', amount = 10, enabled = false }, + { name = 'coal', amount = 10, enabled = false }, + } } } -local function get_items_by_type(entity, type) +---@param entity AutofillEntity +---@param inv string +---@return AutofillItem[] +local function get_items_by_inv(entity, inv) local items = entity.items - for _, item in pairs(default_autofill_item_settings) do - if table.contains(item.entity, entity.entity) then - if table.contains(item.type, type) then - items[item.name] = { - entity = entity.entity, - category = item.category, - type = type, - name = item.name, - amount = item.amount, - enabled = item.enabled - } + for _, category in pairs(default_categories) do + if table.contains(category.entity, entity.entity) then + if table.contains(category.inv, inv) then + for _, item in pairs(category.items) do + items[item.name] = { + entity = entity.entity, + category = category.category, + inv = inv, + name = item.name, + amount = item.amount, + enabled = item.enabled + } + end end end end return items end -local default_entities = config.default_entities - -local function generate_default_setting(entity_name, type, enabled) - if not default_entities[entity_name] then - default_entities[entity_name] = { +---@param entity_name string +---@param inv number +---@param enabled boolean +local function generate_default_setting(entity_name, inv, enabled) + if not config.default_entities[entity_name] then + config.default_entities[entity_name] = { entity = entity_name, enabled = enabled, items = {} } end - get_items_by_type(default_entities[entity_name], type) + get_items_by_inv(config.default_entities[entity_name], inv) end generate_default_setting(config.entities.car, defines.inventory.fuel, true) @@ -197,7 +159,4 @@ generate_default_setting(config.entities.stone_furnace, defines.inventory.fuel, generate_default_setting(config.entities.steel_furnace, defines.inventory.fuel, true) --- Cleanup temporary table -default_autofill_item_settings = nil - return config \ No newline at end of file diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index cfbda6fe..51ec376d 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -4,12 +4,12 @@ @alias autofill ]] -local Game = require 'utils.game' --- @dep utils.game -local Gui = require 'expcore.gui' --- @dep expcore.gui -local Global = require 'utils.global' --- @dep utils.global -local config = require 'config.gui.autofill' --- @dep config.gui.autofill -local Event = require 'utils.event' --- @dep utils.event -local table = require 'overrides.table' --- @dep overrides.table +local Game = require 'utils.game' -- @dep utils.game +local Gui = require 'expcore.gui' -- @dep expcore.gui +local Global = require 'utils.global' -- @dep utils.global +local config = require 'config.gui.autofill' -- @dep config.gui.autofill +local Event = require 'utils.event' -- @dep utils.event +local table = require 'overrides.table' -- @dep overrides.table local print_text = Game.print_floating_text -- (surface, position, text, color) @@ -333,7 +333,7 @@ local function entity_build(event) if not item.enabled then goto end_item end -- Get the inventory of the entity or goto next item - local entity_inventory = entity.get_inventory(item.type) + local entity_inventory = entity.get_inventory(item.inv) if not entity_inventory then goto end_item end local preferd_amount = item.amount From 620051ddac4f8a1f59cf1db35ac825ce6fe7a417 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 03:34:59 +0200 Subject: [PATCH 022/187] Fix function chain --- modules/gui/autofill.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 51ec376d..5f448775 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -35,7 +35,6 @@ Gui.element{ hovered_sprite = 'utility/expand', tooltip = {'autofill.toggle-section-tooltip'} } -toggle_section :style(Gui.sprite_style(20)) :on_click(function(_, element, _) local header_flow = element.parent From e23092aa777f1b033f3120eea163924917a597ec Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 03:37:10 +0200 Subject: [PATCH 023/187] Fixed mixup of docs --- modules/gui/autofill.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 5f448775..b3cfd874 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -25,8 +25,7 @@ local function rich_img(type, value) return '[img='..type..'/'..value..']' end ---- Toggle enitity button, used for toggling autofill for the specific entity --- All entity autofill settings will be ignored if its disabled +--- Toggle entity section visibility -- @element toggle_item_button local toggle_section = Gui.element{ @@ -59,8 +58,9 @@ local header_toggle = Gui.element() toggle_section:raise_custom_event(event) end) ---- Used to assign an event to the header label to trigger a toggle --- @element header_toggle +--- Toggle enitity button, used for toggling autofill for the specific entity +-- All entity autofill settings will be ignored if its disabled +-- @element entity_toggle local entity_toggle = Gui.element(function(event_trigger, parent, entity_name) return parent.add{ name = event_trigger, From e52f06ddf9bd68fbcbf68069f2380baf05e8b0f8 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 03:46:23 +0200 Subject: [PATCH 024/187] Fixed locale issues --- locale/en/gui.cfg | 10 +++++----- modules/gui/autofill.lua | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index aac03bcf..83416ba1 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -86,11 +86,11 @@ main-tooltip=Autofill settings toggle-section-caption=__1__ __2__ toggle-section-tooltip=Expand Section toggle-section-collapse-tooltip=Collapse Section -toggle-entity-tooltip=Toggle the autofill of __1__ entity (overwrites autofill settings of the entity) -toggle-tooltip=Toggle the autofill of __1__ into the __2__ slot of entities -amount-tooltip=Amount of items it will try and put into the __1__ slot of __2__ -invalid=Set autofill amount to the maximum __1__ __2__ for __3__ -filled=Autofilled the __1__ with __2__ __3__ +toggle-entity-tooltip=Toggle the autofill of __1__s +toggle-tooltip=Toggle the autofill of __1__ into __2__ slots +amount-tooltip=Amount of items to insert into the __1__ slots +invalid=Autofill set to maximum amount: __1__ __2__ for __3__ +inserted=Inserted __1__ __2__ into __3__ [warp-list] main-caption=Warp List diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index b3cfd874..4c94c32d 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -155,7 +155,7 @@ Gui.element(function(event_trigger, parent, item) name = event_trigger, type = 'textfield', text = item.amount, - tooltip = {'autofill.amount-tooltip', item.category, rich_img('item', item.entity) }, + tooltip = {'autofill.amount-tooltip', item.category }, clear_and_focus_on_right_click = true, numeric = true, allow_decimal = false, @@ -340,19 +340,19 @@ local function entity_build(event) if item_amount ~= 0 then local inserted text_position.y = text_position.y - 0.2 + local color = { r = 0, g = 255, b = 0, a = 1} if item_amount >= preferd_amount then -- Can item be inserted? no, goto next item! if not entity_inventory.can_insert({name=item.name, count=preferd_amount}) then goto end_item end inserted = entity_inventory.insert({name=item.name, count=preferd_amount}) - player_inventory.remove({name=item.name, count=inserted}) - print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item.name) }, { r = 0, g = 255, b = 0, a = 1}) else inserted = entity_inventory.insert({name=item.name, count=item_amount}) - player_inventory.remove({name=item.name, count=inserted}) - print_text(entity.surface, text_position, {'autofill.filled', rich_img('entity', entity.name), inserted, rich_img('item', item.name) }, { r = 255, g = 165, b = 0, a = 1}) + color = { r = 255, g = 165, b = 0, a = 1} end + player_inventory.remove({name=item.name, count=inserted}) + print_text(entity.surface, text_position, {'autofill.inserted', inserted, rich_img('item', item.name), rich_img('entity', entity.name) }, color) end ::end_item:: end From d19cb5e8d79a925c91d067ed2632a93aed2487d9 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 03:48:48 +0200 Subject: [PATCH 025/187] Removed EmmaLua because CI complained --- config/gui/autofill.lua | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/config/gui/autofill.lua b/config/gui/autofill.lua index c2a892c6..b717f97d 100644 --- a/config/gui/autofill.lua +++ b/config/gui/autofill.lua @@ -3,30 +3,6 @@ local table = require 'overrides.table' -- @dep overrides.table ----@class AutofillEntity ----@field entity string ----@field enabled boolean ----@field items AutofillItem[] - ----@class AutofillItem ----@field entity string ----@field category string ----@field inv number ----@field name string ----@field amount number ----@field enabled boolean - ----@class DefaultItem ----@field name string ----@field amount number ----@field enabled boolean - ----@class DefaultCategory ----@field category string ----@field entity string[] ----@field inv number[] ----@field items DefaultItem[] - local config = { -- General config icon = 'item/piercing-rounds-magazine', -- @setting icon that will be used for the toolbar @@ -45,11 +21,9 @@ local config = { stone_furnace = 'stone-furnace', steel_furnace = 'steel-furnace' }, - ---@type AutofillEntity[] default_entities = {} } ----@type DefaultCategory[] local default_categories = { { category = config.categories.ammo, @@ -103,9 +77,6 @@ local default_categories = { } } ----@param entity AutofillEntity ----@param inv string ----@return AutofillItem[] local function get_items_by_inv(entity, inv) local items = entity.items for _, category in pairs(default_categories) do @@ -127,9 +98,6 @@ local function get_items_by_inv(entity, inv) return items end ----@param entity_name string ----@param inv number ----@param enabled boolean local function generate_default_setting(entity_name, inv, enabled) if not config.default_entities[entity_name] then config.default_entities[entity_name] = { From b03dbf8674d3af5664fc18a381542cb4a839b73f Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 04:22:29 +0200 Subject: [PATCH 026/187] Fix player.print --- modules/gui/autofill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 4c94c32d..7b066c1f 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -181,7 +181,7 @@ end) item.amount = clamped if clamped ~= value then element.text = clamped - player.print({'autofill.invalid', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) }) + player.print{'autofill.invalid', item.amount, rich_img('item', item.name), rich_img('entity', entity_name) } return end end) From 4100ba9876d73c5f77fb5a2c3b163306d2527076 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Thu, 3 Sep 2020 04:27:28 +0200 Subject: [PATCH 027/187] Fix function calls --- modules/gui/autofill.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 7b066c1f..f95fd5aa 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -343,15 +343,15 @@ local function entity_build(event) local color = { r = 0, g = 255, b = 0, a = 1} if item_amount >= preferd_amount then -- Can item be inserted? no, goto next item! - if not entity_inventory.can_insert({name=item.name, count=preferd_amount}) then + if not entity_inventory.can_insert{name=item.name, count=preferd_amount} then goto end_item end - inserted = entity_inventory.insert({name=item.name, count=preferd_amount}) + inserted = entity_inventory.insert{name=item.name, count=preferd_amount} else - inserted = entity_inventory.insert({name=item.name, count=item_amount}) + inserted = entity_inventory.insert{name=item.name, count=item_amount} color = { r = 255, g = 165, b = 0, a = 1} end - player_inventory.remove({name=item.name, count=inserted}) + player_inventory.remove{name=item.name, count=inserted} print_text(entity.surface, text_position, {'autofill.inserted', inserted, rich_img('item', item.name), rich_img('entity', entity.name) }, color) end ::end_item:: From 00bb67e9a01972917d41e4a803f223183ee5d306 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Sat, 5 Sep 2020 00:32:21 +0200 Subject: [PATCH 028/187] Fix scroll panel padding issues --- modules/gui/autofill.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index f95fd5aa..8623eb3b 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -242,11 +242,14 @@ autofill_container = Gui.element(function(event_trigger, parent) -- Draw the internal container local container = Gui.container(parent, event_trigger) - container.parent.style.minimal_width = 257 -- Draw the scroll container local scroll_table = Gui.scroll_table(container, 400, 1, 'autofill-scroll-table') - scroll_table.style.vertical_spacing = 0 + -- Set the scroll panel to always show the scrollbar (not doing this will result in a changing gui size) scroll_table.parent.vertical_scroll_policy = 'always' + -- Scroll panel has by default padding + scroll_table.parent.style.padding = 0 + -- Remove the default gap that is added in a table between elements + scroll_table.style.vertical_spacing = 0 -- Loop over each default entity config for _, setting in pairs(config.default_entities) do local table_sizes = {} From ef823f2f69061cda4f96227020bc319ab93b2354 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Sat, 5 Sep 2020 00:44:11 +0200 Subject: [PATCH 029/187] Fix empty placeholder using unneeded gui element --- modules/gui/autofill.lua | 45 +++++++++++++--------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 8623eb3b..0dc52f9d 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -198,40 +198,23 @@ Gui.element(function(_, parent, item) amount_textfield(amount_flow, item) end) ---- Toggle item button empty, just a filler gui element --- @element toggle_item_button_empty -local toggle_item_button_empty = -Gui.element(function(_, parent, i) - return parent.add{ - name = 'toggle-setting-empty-frame-'..i, - type = 'sprite-button' - } -end) -:style(Gui.sprite_style(32, nil, { right_margin = -3 })) - - ---- Amount text field empty, just a filler gui element --- @element amount_textfield_empty -local amount_textfield_empty = -Gui.element(function(_, parent, i) - return parent.add{ - name = 'amount-setting-empty-frame-'..i, - type = 'textfield' - } -end) -:style{ maximal_width = 40, height = 31, padding = -2 } - --- Autofill setting empty, contains filler button and textfield gui elements -- @element add_empty_autofill_setting local add_empty_autofill_setting = -Gui.element(function(_, parent, i) - local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-empty-'..i } - local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-empty-'..i } - toggle_flow.style.padding = 0 - amount_flow.style.padding = 0 - local toggle_element = toggle_item_button_empty(toggle_flow, i) +Gui.element(function(_, parent) + local toggle_element = parent.add{ + type = 'sprite-button' + } + toggle_element.style.right_margin = -3 + toggle_element.style.width = 32 + toggle_element.style.height = 32 toggle_element.enabled = false - local amount_element = amount_textfield_empty(amount_flow, i) + local amount_element = parent.add{ + type = 'textfield' + } + amount_element.style.maximal_width = 40 + amount_element.style.height = 31 + amount_element.style.padding = -2 amount_element.enabled = false end) @@ -286,7 +269,7 @@ Gui.element(function(event_trigger, parent) local biggest = t[#t] for category, size in pairs(table_sizes) do for i=biggest-size,1,-1 do - add_empty_autofill_setting(tables[category], i) + add_empty_autofill_setting(tables[category]) end end end From ca2ff8075e867065f21d19da994bbdb960f9d716 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Sat, 5 Sep 2020 00:48:28 +0200 Subject: [PATCH 030/187] Extra space added to entity table (There was some extra horizontal space that was empty) --- modules/gui/autofill.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 0dc52f9d..74231084 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -239,6 +239,7 @@ Gui.element(function(event_trigger, parent) local tables = {} -- Draw a section for the element local entity_table = section(scroll_table, setting.entity, 3) + entity_table.style.padding = 5 -- Loop over each item category for _, category in pairs(config.categories) do if not table_sizes[category] then table_sizes[category] = 0 end From cbb925eb65b3759ca1d510e4bb12ca99a60d348b Mon Sep 17 00:00:00 2001 From: badgamernl Date: Mon, 7 Sep 2020 00:52:40 +0200 Subject: [PATCH 031/187] Fix item and entity name assingment - Replaced with a more readable version --- modules/gui/autofill.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 74231084..fcde8c32 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -72,7 +72,7 @@ local entity_toggle = Gui.element(function(event_trigger, parent, entity_name) end) :style(Gui.sprite_style(22)) :on_click(function(player, element, _) - local entity_name = string.sub(element.parent.parent.name, 0, -(1 + string.len('-header'))) + local entity_name = string.match(element.parent.parent.name,'(.*)%-header') if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] if not setting then return end @@ -130,7 +130,7 @@ Gui.element(function(event_trigger, parent, item) end) :style(Gui.sprite_style(32, nil, { right_margin = -3 })) :on_click(function(player, element) - local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) + local item_name = string.match(element.parent.name,'toggle%-setting%-(.*)') local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] @@ -171,7 +171,7 @@ end) local value = tonumber(element.text) if not value then value = 0 end local clamped = math.clamp(value, 0, 1000) - local item_name = string.sub(element.parent.name, 1 + string.len('toggle-setting-'), -1) + local item_name = string.match(element.parent.name,'amount%-setting%-(.*)') local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] From f76d8b0a3a23cd66e00d7c8872c2ef32cd02dba2 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Mon, 7 Sep 2020 05:03:28 +0200 Subject: [PATCH 032/187] Fix unneeded string.match - Tip from cool to use tooltip on flow --- modules/gui/autofill.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index fcde8c32..12625886 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -130,7 +130,7 @@ Gui.element(function(event_trigger, parent, item) end) :style(Gui.sprite_style(32, nil, { right_margin = -3 })) :on_click(function(player, element) - local item_name = string.match(element.parent.name,'toggle%-setting%-(.*)') + local item_name = element.parent.tooltip local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] @@ -171,7 +171,7 @@ end) local value = tonumber(element.text) if not value then value = 0 end local clamped = math.clamp(value, 0, 1000) - local item_name = string.match(element.parent.name,'amount%-setting%-(.*)') + local item_name = element.parent.tooltip local entity_name = element.parent.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] @@ -190,8 +190,8 @@ end) -- @element add_autofill_setting local add_autofill_setting = Gui.element(function(_, parent, item) - local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item.name } - local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..item.name } + local toggle_flow = parent.add{ type = 'flow', name = 'toggle-setting-'..item.name, tooltip = item.name } + local amount_flow = parent.add{ type = 'flow', name = 'amount-setting-'..item.name, tooltip = item.name } toggle_flow.style.padding = 0 amount_flow.style.padding = 0 toggle_item_button(toggle_flow, item) From a01ba807f5fa58fb8764dc6bf6c71d316546ab3d Mon Sep 17 00:00:00 2001 From: badgamernl Date: Mon, 7 Sep 2020 05:11:29 +0200 Subject: [PATCH 033/187] Change padding (Was causing the gui width to change when entity expanded) --- modules/gui/autofill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 12625886..20d2ef49 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -239,7 +239,7 @@ Gui.element(function(event_trigger, parent) local tables = {} -- Draw a section for the element local entity_table = section(scroll_table, setting.entity, 3) - entity_table.style.padding = 5 + entity_table.style.padding = 3 -- Loop over each item category for _, category in pairs(config.categories) do if not table_sizes[category] then table_sizes[category] = 0 end From afcd16c56e30fcb3bc3bd3bf7935c4fc9b952ce4 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Tue, 8 Sep 2020 16:20:02 +0200 Subject: [PATCH 034/187] Fixed table center Fixed locale --- locale/en/gui.cfg | 2 +- modules/gui/autofill.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 83416ba1..e4fa8611 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -86,7 +86,7 @@ main-tooltip=Autofill settings toggle-section-caption=__1__ __2__ toggle-section-tooltip=Expand Section toggle-section-collapse-tooltip=Collapse Section -toggle-entity-tooltip=Toggle the autofill of __1__s +toggle-entity-tooltip=Toggle the autofill of __1__ toggle-tooltip=Toggle the autofill of __1__ into __2__ slots amount-tooltip=Amount of items to insert into the __1__ slots invalid=Autofill set to maximum amount: __1__ __2__ for __3__ diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 20d2ef49..37146dea 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -233,6 +233,8 @@ Gui.element(function(event_trigger, parent) scroll_table.parent.style.padding = 0 -- Remove the default gap that is added in a table between elements scroll_table.style.vertical_spacing = 0 + -- Center the first collumn in the table + scroll_table.style.column_alignments[1] = 'center' -- Loop over each default entity config for _, setting in pairs(config.default_entities) do local table_sizes = {} From 7449535aa7610f1801a5cf1cb9cdac5542202413 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Tue, 8 Sep 2020 17:13:18 +0200 Subject: [PATCH 035/187] Remove alignment flow - This should also help with longer entity names --- modules/gui/autofill.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 37146dea..5c4c93eb 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -241,21 +241,23 @@ Gui.element(function(event_trigger, parent) local tables = {} -- Draw a section for the element local entity_table = section(scroll_table, setting.entity, 3) + -- Add some padding around the table entity_table.style.padding = 3 + -- Make sure each collumn is alignment top center + entity_table.style.column_alignments[1] = 'top-center' + entity_table.style.column_alignments[2] = 'top-center' + entity_table.style.column_alignments[3] = 'top-center' -- Loop over each item category for _, category in pairs(config.categories) do if not table_sizes[category] then table_sizes[category] = 0 end - -- Draw a alignment gui to make sure the gui is floating to the top of the parent - local alignment = Gui.alignment(entity_table, category..'-'..setting.entity, 'center', 'top') - alignment.style.padding = 0 -- Draw table - local category_table = alignment.add{ + local category_table = entity_table.add{ type = 'table', - name = 'category-table', + name = category..'-category', column_count = 2 } + -- Add padding between each item category_table.style.vertical_spacing = 1 - category_table.parent.style.padding = 0 tables[category] = category_table -- Add item autofill setting gui elements to the table for _, item in pairs(setting.items) do From b6933bddf85a5dcb32fc4df8c063f28fe92cc1ab Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 8 Sep 2020 18:12:02 +0000 Subject: [PATCH 036/187] Automatic Doc Update --- docs/addons/Advanced-Start.html | 2 +- docs/addons/Chat-Popups.html | 2 +- docs/addons/Chat-Reply.html | 2 +- docs/addons/Compilatron.html | 2 +- docs/addons/Damage-Popups.html | 2 +- docs/addons/Death-Logger.html | 2 +- docs/addons/Discord-Alerts.html | 2 +- docs/addons/Inventory-Clear.html | 2 +- docs/addons/Pollution-Grading.html | 2 +- docs/addons/Scorched-Earth.html | 2 +- docs/addons/Spawn-Area.html | 2 +- docs/addons/Tree-Decon.html | 2 +- docs/commands/Admin-Chat.html | 2 +- docs/commands/Cheat-Mode.html | 2 +- docs/commands/Clear-Inventory.html | 2 +- docs/commands/Connect.html | 2 +- docs/commands/Debug.html | 2 +- docs/commands/Find.html | 2 +- docs/commands/Help.html | 2 +- docs/commands/Home.html | 2 +- docs/commands/Interface.html | 2 +- docs/commands/Jail.html | 2 +- docs/commands/Kill.html | 2 +- docs/commands/Me.html | 2 +- docs/commands/Rainbow.html | 2 +- docs/commands/Repair.html | 2 +- docs/commands/Reports.html | 2 +- docs/commands/Roles.html | 2 +- docs/commands/Spawn.html | 2 +- docs/commands/Teleport.html | 2 +- docs/commands/Warnings.html | 2 +- docs/configs/Advanced-Start.html | 2 +- docs/configs/Bonuses.html | 2 +- docs/configs/Chat-Reply.html | 2 +- docs/configs/Commands-Auth-Admin.html | 2 +- docs/configs/Commands-Auth-Roles.html | 2 +- .../Commands-Auth-Runtime-Disable.html | 2 +- docs/configs/Commands-Parse-Roles.html | 2 +- docs/configs/Commands-Parse.html | 2 +- docs/configs/Compilatron.html | 2 +- docs/configs/Death-Logger.html | 2 +- docs/configs/Discord-Alerts.html | 2 +- docs/configs/File-Loader.html | 2 +- docs/configs/Permission-Groups.html | 2 +- docs/configs/Player-List.html | 2 +- docs/configs/Pollution-Grading.html | 2 +- docs/configs/Popup-Messages.html | 2 +- docs/configs/Preset-Player-Colours.html | 2 +- docs/configs/Preset-Player-Quickbar.html | 2 +- docs/configs/Repair.html | 2 +- docs/configs/Rockets.html | 2 +- docs/configs/Roles.html | 30 ++++++++++- docs/configs/Science.html | 2 +- docs/configs/Scorched-Earth.html | 2 +- docs/configs/Spawn-Area.html | 2 +- docs/configs/Statistics.html | 32 ++++++++++- docs/configs/Tasks.html | 2 +- docs/configs/Warnings.html | 2 +- docs/configs/Warps.html | 2 +- docs/configs/inventory_clear.html | 2 +- docs/control/Jail.html | 2 +- docs/control/Production.html | 2 +- docs/control/Reports.html | 2 +- docs/control/Rockets.html | 2 +- docs/control/Tasks.html | 2 +- docs/control/Warnings.html | 2 +- docs/control/Warps.html | 2 +- docs/core/Async.html | 2 +- docs/core/Commands.html | 2 +- docs/core/Common.html | 2 +- docs/core/Datastore.html | 2 +- docs/core/External.html | 2 +- docs/core/Groups.html | 2 +- docs/core/Gui.html | 2 +- docs/core/PlayerData.html | 2 +- docs/core/Roles.html | 53 ++++++++++++++++--- docs/data/Alt-View.html | 2 +- docs/data/Bonus.html | 2 +- docs/data/Greetings.html | 2 +- docs/data/Player-Colours.html | 2 +- docs/data/Quickbar.html | 2 +- docs/data/Tag.html | 2 +- docs/guis/Player-List.html | 2 +- docs/guis/Readme.html | 2 +- docs/guis/Rocket-Info.html | 2 +- docs/guis/Science-Info.html | 2 +- docs/guis/Task-List.html | 2 +- docs/guis/Warps-List.html | 2 +- docs/guis/server-ups.html | 2 +- docs/index.html | 2 +- docs/modules/control.html | 2 +- .../modules.addons.station-auto-name.html | 2 +- docs/modules/overrides.debug.html | 2 +- docs/modules/overrides.math.html | 2 +- docs/modules/overrides.table.html | 2 +- docs/modules/utils.event.html | 2 +- docs/modules/utils.event_core.html | 2 +- docs/modules/utils.task.html | 2 +- docs/topics/LICENSE.html | 2 +- docs/topics/README.md.html | 2 +- 100 files changed, 204 insertions(+), 105 deletions(-) diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index eef95aea..98303983 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index b26225b1..0354fb6d 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index df5d9784..b0ef351b 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index 7549104b..3c9697d1 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index d3799438..4fd6e6d0 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -364,7 +364,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index 3e0d7872..2903b1e9 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 0253ac26..c9d2ef8d 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -447,7 +447,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index 96cf9d01..ef5d899b 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index 4811776d..b03cd776 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index 5ee3e6e9..c849e232 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index 1fe3dc4b..089edcfb 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index 4b721367..fe9512b5 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -363,7 +363,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index b4e99909..ce8b8408 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index ec232dfa..fb3fb29e 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -376,7 +376,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 2c8e1d9b..ef5f5118 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Connect.html b/docs/commands/Connect.html index 7947abdd..fc720c4d 100644 --- a/docs/commands/Connect.html +++ b/docs/commands/Connect.html @@ -606,7 +606,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index f9152902..4c38b643 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -380,7 +380,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index 73fadf8f..cc57b460 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index eed6842b..0955bc2a 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -419,7 +419,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index d40ae292..cb1addb2 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -473,7 +473,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index 6468c14d..0aeb2e56 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index 3635506d..2ad75320 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -626,7 +626,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index 28da26aa..4ce56107 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index 8092db5e..54041712 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -375,7 +375,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index 22c24df3..c290bea2 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index bcbebfd4..5dd0a5b7 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -336,7 +336,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index f63557c4..9a630ece 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -600,7 +600,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index d067dc88..9b23ea59 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -572,7 +572,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index bdd960d5..12a8f535 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -404,7 +404,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index e5e8853b..6ef64d65 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -499,7 +499,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 09412b62..fa1498f3 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -584,7 +584,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index 379c4e48..fbf4853e 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -521,7 +521,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index 179dfdbf..701d9c53 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index 83804c5d..8a1b9031 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -500,7 +500,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 5589b71a..f65cd2c4 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -309,7 +309,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index 3e8e5efa..bf93aae6 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index 44cee792..185b4500 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -457,7 +457,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index 082964ce..24011f65 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 466c7834..106c73d5 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -325,7 +325,7 @@ see ./expcore/commands.lua for more details

    generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index e750aee0..0a2a81a8 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index 5f8e7a9f..c4158d12 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -431,7 +431,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index f432264a..882db477 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 32f074c9..af495fcb 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -255,7 +255,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index a9e47c09..f5972211 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index 482f40cf..01f3a115 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index 08112c77..88a8d3be 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index 34c2f16e..ce2c6438 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index e248c4f7..f2fdd764 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -339,7 +339,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index c7a35a3f..13a79e95 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index f2f36b4a..8bbdf356 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -429,7 +429,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 063981d4..e44beb8c 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -849,7 +849,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index 2a5e0f1b..5077643e 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -258,6 +258,9 @@ expcore.roles + + expcore.player_data + @@ -285,6 +288,31 @@ + + + + + + +
    +
    +
    +
    + # + expcore.player_data +
    +
    +
    +
    + + + + + + + + + @@ -307,7 +335,7 @@ generated by LDoc
    diff --git a/docs/configs/Science.html b/docs/configs/Science.html index dd531697..6e203c83 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -369,7 +369,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index 1675db5c..c70cdde2 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -403,7 +403,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 6ca15dd8..d8d89dcb 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -759,7 +759,7 @@ generated by LDoc diff --git a/docs/configs/Statistics.html b/docs/configs/Statistics.html index b89bd118..7fb0ec26 100644 --- a/docs/configs/Statistics.html +++ b/docs/configs/Statistics.html @@ -256,6 +256,9 @@ + MapsPlayed + + Playtime @@ -303,6 +306,33 @@
    + # + MapsPlayed +
    +
    +
    +
    + +

    +

    If the number of maps which a player has played should be tracked

    + + + + + + + + + + + + + + +
    +
    +
    +
    # Playtime
    @@ -639,7 +669,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index 23f16b43..d870b3eb 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -399,7 +399,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index b818404e..45459d8b 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -370,7 +370,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index bc9c98f4..c35b3fa2 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -789,7 +789,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index 1e0d94d9..29531ed9 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -252,7 +252,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index ed05ffa8..d9e5f8ea 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -1223,7 +1223,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index 6d4ea915..a37c82ff 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -1344,7 +1344,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index 63ed66c2..0bcfb980 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -1157,7 +1157,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 4727635a..b492eca6 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -999,7 +999,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index f54f492e..b48df560 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -985,7 +985,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index c4d6c309..1f7a1204 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -1540,7 +1540,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index 4d682306..6ce33d05 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -1522,7 +1522,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index 92be2222..4038e372 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -613,7 +613,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index a3d668f3..8668774c 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -2428,7 +2428,7 @@ nb: use error(error_message) within your callback to trigger do not trigger dire generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index e4d4dfaf..8ffba59c 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -2767,7 +2767,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html index a212ced4..cc5b2c87 100644 --- a/docs/core/Datastore.html +++ b/docs/core/Datastore.html @@ -2964,7 +2964,7 @@ ExampleData:on_update(function(key, value) generated by LDoc diff --git a/docs/core/External.html b/docs/core/External.html index 6ecd89ed..76d12ff1 100644 --- a/docs/core/External.html +++ b/docs/core/External.html @@ -748,7 +748,7 @@ generated by LDoc diff --git a/docs/core/Groups.html b/docs/core/Groups.html index bc536e08..b5213839 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -1443,7 +1443,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index 19f13929..7c2e4502 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -4421,7 +4421,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html index 1a26a3d9..14b07cd1 100644 --- a/docs/core/PlayerData.html +++ b/docs/core/PlayerData.html @@ -531,7 +531,7 @@ generated by LDoc diff --git a/docs/core/Roles.html b/docs/core/Roles.html index f1480209..cbc84e0e 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -584,7 +584,11 @@ nb: this is a recursive action, and changing the allows and disallows will effec nb: this is one way, failing false after already gaining the role will not revoke the role - Roles._prototype:set_block_auto_promote([state=true]) + Roles._prototype:get_auto_assign_condition() + Get the auto assign condition for this role, returns nil if no condition is set + + + Roles._prototype:set_block_auto_assign([state=true]) Sets the role to not allow players to have auto assign effect them, useful to keep people locked to a role @@ -2932,7 +2936,7 @@ nb: this is one way, failing false after already gaining the role will not revok (function) - receives only one param which is player to promote, return true to promote the player + receives only one param which is player to assign, return true to assign the player @@ -2967,8 +2971,45 @@ nb: this is one way, failing false after already gaining the role will not revok
    - # - Roles._prototype:set_block_auto_promote([state=true]) + # + Roles._prototype:get_auto_assign_condition() +
    +
    +
    +
    + +

    Get the auto assign condition for this role, returns nil if no condition is set

    +

    + + + + + + Returns: +
      +
    • + (function) + The callback which was assigned as the auto assign condition +
    • +
    + + + + + + + + Usage: +
    -- Give this role to a user if there are admin, ran every 60 seconds
    +local condition = role:get_auto_assign_condition()
    + + +
    +
    +
    +
    + # + Roles._prototype:set_block_auto_assign([state=true])
    @@ -3021,7 +3062,7 @@ nb: this is one way, failing false after already gaining the role will not revok Usage:
    -- Make a role stop players from being auto assigned to other roles
    -role:set_block_auto_promote()
    +role:set_block_auto_assign()
    @@ -3350,7 +3391,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/data/Alt-View.html b/docs/data/Alt-View.html index bd1194d6..3e09ed8e 100644 --- a/docs/data/Alt-View.html +++ b/docs/data/Alt-View.html @@ -335,7 +335,7 @@ generated by LDoc diff --git a/docs/data/Bonus.html b/docs/data/Bonus.html index 51c80a2c..aebcaf4f 100644 --- a/docs/data/Bonus.html +++ b/docs/data/Bonus.html @@ -487,7 +487,7 @@ generated by LDoc diff --git a/docs/data/Greetings.html b/docs/data/Greetings.html index 9a66ba57..96ccba4e 100644 --- a/docs/data/Greetings.html +++ b/docs/data/Greetings.html @@ -430,7 +430,7 @@ generated by LDoc diff --git a/docs/data/Player-Colours.html b/docs/data/Player-Colours.html index 67be6ea4..873140e6 100644 --- a/docs/data/Player-Colours.html +++ b/docs/data/Player-Colours.html @@ -391,7 +391,7 @@ generated by LDoc diff --git a/docs/data/Quickbar.html b/docs/data/Quickbar.html index a384694b..8c2eb3d3 100644 --- a/docs/data/Quickbar.html +++ b/docs/data/Quickbar.html @@ -408,7 +408,7 @@ generated by LDoc diff --git a/docs/data/Tag.html b/docs/data/Tag.html index f4a18c07..908d3a2c 100644 --- a/docs/data/Tag.html +++ b/docs/data/Tag.html @@ -486,7 +486,7 @@ generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index 6d1a02ad..ad3c0f33 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index 21dae04e..748bb761 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -998,7 +998,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index f8a92235..de869edd 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -706,7 +706,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index 0887cfc8..e61b0520 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -585,7 +585,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 82f8361e..ac026f12 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -771,7 +771,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index a7da43b6..da72c483 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -1042,7 +1042,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index 34c48b76..c65a384a 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -508,7 +508,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index af809c66..fcc6c1db 100644 --- a/docs/index.html +++ b/docs/index.html @@ -550,7 +550,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index 06ed2ff6..ae6f57d6 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -310,7 +310,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 53df4814..51ed3ba8 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -308,7 +308,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index 0c6b78f5..21183994 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -669,7 +669,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index 9df8c244..1a0661fa 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -368,7 +368,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index 99686ccf..4901bf42 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -2023,7 +2023,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index 19138144..7fa2cecf 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -1307,7 +1307,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index f88ae78c..a677d8d4 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -449,7 +449,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index ce30595f..1444185c 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -666,7 +666,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 235f3fa8..360bb6be 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -804,7 +804,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index 6e10eff0..dddc0714 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -359,7 +359,7 @@ Please report these errors to [the issues page](issues). generated by LDoc From 72a3378bfad4e2f74f54e20cd1a98e76431d3ec8 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Tue, 8 Sep 2020 20:34:38 +0200 Subject: [PATCH 037/187] Fix toggle item button --- modules/gui/autofill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index 5c4c93eb..c80ea2d4 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -131,7 +131,7 @@ end) :style(Gui.sprite_style(32, nil, { right_margin = -3 })) :on_click(function(player, element) local item_name = element.parent.tooltip - local entity_name = element.parent.parent.parent.parent.name + local entity_name = element.parent.parent.parent.name if not autofill_player_settings[player.name] then return end local setting = autofill_player_settings[player.name][entity_name] if not setting then return end From c46244e7edf7adc3df449c12077380ce21405960 Mon Sep 17 00:00:00 2001 From: badgamernl Date: Fri, 11 Sep 2020 20:48:35 +0200 Subject: [PATCH 038/187] Fix floating text position --- modules/gui/autofill.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/autofill.lua b/modules/gui/autofill.lua index c80ea2d4..f89a8c98 100644 --- a/modules/gui/autofill.lua +++ b/modules/gui/autofill.lua @@ -330,7 +330,7 @@ local function entity_build(event) local item_amount = player_inventory.get_item_count(item.name) if item_amount ~= 0 then local inserted - text_position.y = text_position.y - 0.2 + text_position.y = text_position.y - 0.5 local color = { r = 0, g = 255, b = 0, a = 1} if item_amount >= preferd_amount then -- Can item be inserted? no, goto next item! From 9e150aff79b3a4a8d3846ef58e38a1e866ef104e Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 12 Sep 2020 02:01:34 +0000 Subject: [PATCH 039/187] Automatic Doc Update --- docs/addons/Advanced-Start.html | 4 +- docs/addons/Chat-Popups.html | 4 +- docs/addons/Chat-Reply.html | 4 +- docs/addons/Compilatron.html | 4 +- docs/addons/Damage-Popups.html | 4 +- docs/addons/Death-Logger.html | 4 +- docs/addons/Discord-Alerts.html | 4 +- docs/addons/Inventory-Clear.html | 4 +- docs/addons/Pollution-Grading.html | 4 +- docs/addons/Scorched-Earth.html | 4 +- docs/addons/Spawn-Area.html | 4 +- docs/addons/Tree-Decon.html | 4 +- docs/commands/Admin-Chat.html | 4 +- docs/commands/Cheat-Mode.html | 4 +- docs/commands/Clear-Inventory.html | 4 +- docs/commands/Connect.html | 4 +- docs/commands/Debug.html | 4 +- docs/commands/Find.html | 4 +- docs/commands/Help.html | 4 +- docs/commands/Home.html | 4 +- docs/commands/Interface.html | 4 +- docs/commands/Jail.html | 4 +- docs/commands/Kill.html | 4 +- docs/commands/Me.html | 4 +- docs/commands/Rainbow.html | 4 +- docs/commands/Repair.html | 4 +- docs/commands/Reports.html | 4 +- docs/commands/Roles.html | 4 +- docs/commands/Spawn.html | 4 +- docs/commands/Teleport.html | 4 +- docs/commands/Warnings.html | 4 +- docs/configs/Advanced-Start.html | 4 +- docs/configs/Autofill.html | 262 ++++++++ docs/configs/Bonuses.html | 4 +- docs/configs/Chat-Reply.html | 4 +- docs/configs/Commands-Auth-Admin.html | 4 +- docs/configs/Commands-Auth-Roles.html | 4 +- .../Commands-Auth-Runtime-Disable.html | 4 +- docs/configs/Commands-Parse-Roles.html | 4 +- docs/configs/Commands-Parse.html | 4 +- docs/configs/Compilatron.html | 4 +- docs/configs/Death-Logger.html | 4 +- docs/configs/Discord-Alerts.html | 4 +- docs/configs/File-Loader.html | 4 +- docs/configs/Permission-Groups.html | 4 +- docs/configs/Player-List.html | 4 +- docs/configs/Pollution-Grading.html | 4 +- docs/configs/Popup-Messages.html | 4 +- docs/configs/Preset-Player-Colours.html | 4 +- docs/configs/Preset-Player-Quickbar.html | 4 +- docs/configs/Repair.html | 4 +- docs/configs/Rockets.html | 4 +- docs/configs/Roles.html | 4 +- docs/configs/Science.html | 4 +- docs/configs/Scorched-Earth.html | 4 +- docs/configs/Spawn-Area.html | 4 +- docs/configs/Statistics.html | 4 +- docs/configs/Tasks.html | 4 +- docs/configs/Warnings.html | 4 +- docs/configs/Warps.html | 4 +- docs/configs/inventory_clear.html | 4 +- docs/control/Jail.html | 4 +- docs/control/Production.html | 4 +- docs/control/Reports.html | 4 +- docs/control/Rockets.html | 4 +- docs/control/Tasks.html | 4 +- docs/control/Warnings.html | 4 +- docs/control/Warps.html | 4 +- docs/core/Async.html | 4 +- docs/core/Commands.html | 4 +- docs/core/Common.html | 4 +- docs/core/Datastore.html | 4 +- docs/core/External.html | 4 +- docs/core/Groups.html | 4 +- docs/core/Gui.html | 4 +- docs/core/PlayerData.html | 4 +- docs/core/Roles.html | 4 +- docs/data/Alt-View.html | 4 +- docs/data/Bonus.html | 4 +- docs/data/Greetings.html | 4 +- docs/data/Player-Colours.html | 4 +- docs/data/Quickbar.html | 4 +- docs/data/Tag.html | 4 +- docs/guis/Autofill.html | 602 ++++++++++++++++++ docs/guis/Player-List.html | 4 +- docs/guis/Readme.html | 4 +- docs/guis/Rocket-Info.html | 4 +- docs/guis/Science-Info.html | 4 +- docs/guis/Task-List.html | 4 +- docs/guis/Warps-List.html | 4 +- docs/guis/server-ups.html | 4 +- docs/index.html | 11 +- docs/modules/control.html | 4 +- .../modules.addons.station-auto-name.html | 4 +- docs/modules/overrides.debug.html | 4 +- docs/modules/overrides.math.html | 4 +- docs/modules/overrides.table.html | 4 +- docs/modules/utils.event.html | 4 +- docs/modules/utils.event_core.html | 4 +- docs/modules/utils.task.html | 4 +- docs/topics/LICENSE.html | 4 +- docs/topics/README.md.html | 4 +- 102 files changed, 1171 insertions(+), 100 deletions(-) create mode 100644 docs/configs/Autofill.html create mode 100644 docs/guis/Autofill.html diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index 98303983..8469d4f4 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -98,6 +98,7 @@