Spell Check and Lua Check

This commit is contained in:
Cooldude2606
2019-01-11 22:32:30 +00:00
parent 7110b76444
commit 082d9e5439
65 changed files with 760 additions and 724 deletions

View File

@@ -2,11 +2,10 @@
-- @module ExpGamingInfo.Readme
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
-- @alais ThisModule
-- @alias ThisModule
-- Module Require
local Gui = require('ExpGamingCore.Gui')
local Game = require('FactorioStdLib.Game')
-- Module Define
local module_verbose = false
@@ -65,12 +64,12 @@ end):add_tab('commands',{'ExpGamingInfo-Readme.commands-name'},{'ExpGamingInfo-R
type='label',
caption='/'..command.name
}
local discription = table.add{
local description = table.add{
type='label',
caption=command.description,
}
discription.style.maximal_width = 400
discription.style.single_line = false
description.style.maximal_width = 400
description.style.single_line = false
end
end):add_tab('links',{'ExpGamingInfo-Readme.links-name'},{'ExpGamingInfo-Readme.links-tooltip'},function(frame)
local links={
@@ -87,7 +86,7 @@ end):add_tab('links',{'ExpGamingInfo-Readme.links-name'},{'ExpGamingInfo-Readme.
text_box.selectable = true
end
for i,link in pairs(links) do
frame.add{
frame.add{
type="label",
caption={'ExpGamingInfo-Readme.links-cap'..tostring(i)},
style='caption_label'

View File

@@ -2,7 +2,7 @@
-- @module ExpGamingInfo.Rockets
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
-- @alais ThisModule
-- @alias ThisModule
-- Module Require
local Gui = require('ExpGamingCore.Gui')
@@ -74,20 +74,20 @@ ThisModule.Gui = Gui.left{
type='flow',
direction='vertical'
}
for milestone,time in pairs(global.milestones) do
local milestone = tonumber(milestone:match('%d+'))
if time == 0 and satellites == milestone then
for milestone,next_time in pairs(global.milestones) do
milestone = tonumber(milestone:match('%d+'))
if next_time == 0 and satellites == milestone then
global.milestones['m'..milestone] = global.last
time = global.last
next_time = global.last
Gui.left.open('rockets')
end
local _time = {'ExpGamingInfo-Rockets.nan'}
if time > 0 then _time = tick_to_display_format(time) end
if next_time > 0 then _time = tick_to_display_format(next_time) end
milestones.add{
type='label',
caption={'ExpGamingInfo-Rockets.format',tostring(milestone),_time}
}
if time == 0 then break end
if next_time == 0 then break end
end
end,
can_open=function(player)

View File

@@ -13,8 +13,8 @@ Sync.add_update('rockets',function()
_return.time = Sync.tick_format(time)
_return.fastest = Sync.tick_format(global.fastest)
_return.milestones = {}
for milestone,time in pairs(global.milestones) do
_return.milestones[milestone] = Sync.tick_format(time)
for milestone,next_time in pairs(global.milestones) do
_return.milestones[milestone] = Sync.tick_format(next_time)
end
return _return
end)

View File

@@ -1,14 +1,14 @@
--- Adds a science count gui to the game that shows toatal made and per minute
--- Adds a science count gui to the game that shows total made and per minute
-- @module ExpGamingInfo.Science
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
-- @alais ThisModule
-- @alias ThisModule
-- Module Require
local Gui = require('ExpGamingCore.Gui')
local Game = require('FactorioStdLib.Game')
-- Local Varibles
-- Local Variables
local science_packs = {
'science-pack-1',
'science-pack-2',
@@ -23,7 +23,7 @@ local science_packs = {
local module_verbose = false
local ThisModule = {
on_init=function()
if loaded_modules['ExpGamingCore.Sync^4.0.0'] then require(module_path..'/src/sync') end
if loaded_modules['ExpGamingCore.Sync^4.0.0'] then require(module_path..'/src/sync',{science_packs=science_packs}) end
end
}
@@ -48,7 +48,7 @@ ThisModule.Gui = Gui.left{
verbose('Added Science Global for: '..player.force.name)
global[player.force.name] = table.deepcopy(global._base)
end
force_data = global[player.force.name]
local force_data = global[player.force.name]
frame.caption = {'ExpGamingInfo-Science.name'}
frame.add{
type='label',
@@ -101,5 +101,5 @@ ThisModule.Gui = Gui.left{
script.on_event(defines.events.on_research_finished,function(event) Gui.left.update('science') end)
-- Module Return
-- when called will toogle the gui for that player, if no player it will update the gui
-- when called will toggle the gui for that player, if no player it will update the gui
return setmetatable(ThisModule,{_call=function(self,...) self.Gui(...) end})

View File

@@ -1,5 +1,6 @@
local Sync = require('ExpGamingCore.Sync')
local data = global['ExpGamingInfo.Science']
local science_packs = science_packs
Sync.add_update('science',function()
local _return = {}

View File

@@ -2,7 +2,7 @@
-- @module ExpGamingInfo.Tasklist
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
-- @alais ThisModule
-- @alias ThisModule
-- Module Require
local Gui = require('ExpGamingCore.Gui')
@@ -102,26 +102,26 @@ local add = Gui.inputs{
end)
local function _tasks(player)
local player = Game.get_player(player)
player = Game.get_player(player)
local data = global._edit[player.index]
if not data then return global.tasks end
local _edit = false
local editing = false
for _,v in pairs(data._editing) do
if v == true then
_edit = true
editing = true
break
end
end
if data._edit and not _edit then
if data._edit and not editing then
global.tasks = table.deepcopy(data._tasks)
global._edit[player.index] = table.deepcopy(global._base)
Gui.left.update('tasklist')
return global.tasks
elseif not data._edit and _edit then
elseif not data._edit and editing then
data._edit = true
for key,_ in pairs(data._tasks) do if not data._editing[key] then data._editing[key] = false end end
return data._tasks
elseif _edit then return data._tasks
elseif editing then return data._tasks
else return global.tasks
end
end