From a44d947be3e345a52ae67d26b700e27e0d7c62dd Mon Sep 17 00:00:00 2001 From: Gajo Petrovic Date: Sat, 20 Jul 2019 21:44:36 +0900 Subject: [PATCH 1/3] nlc; 0 luacheck warnings --- .luacheckrc | 6 + LuaMenu/Addons/json.lua | 30 ++--- LuaMenu/Addons/tablefunctions.lua | 6 +- LuaMenu/Addons/timeFunctions.lua | 56 ++++----- LuaMenu/configs/countryShortname.lua | 2 +- .../configs/gameConfig/byar/ModOptions.lua | 10 +- .../configs/gameConfig/byar/aiBlacklist.lua | 2 +- .../configs/gameConfig/byar/rankFunction.lua | 4 +- .../configs/gameConfig/evorts/ModOptions.lua | 20 ++-- .../configs/gameConfig/evorts/aiBlacklist.lua | 2 +- .../gameConfig/evorts/rankFunction.lua | 4 +- LuaMenu/configs/gameConfig/tc/aiblacklist.lua | 4 +- .../gameConfig/tc/gameUnitInformation.lua | 10 +- .../gameConfig/tc/helpSubmenuConfig.lua | 2 +- .../configs/gameConfig/tc/linkFunctions.lua | 6 +- LuaMenu/configs/gameConfig/tc/modoptions.lua | 48 ++++---- .../configs/gameConfig/tc/rankfunction.lua | 8 +- .../configs/gameConfig/tc/settingsmenu.lua | 12 +- .../tc/singleplayerquickskirmish.lua | 22 ++-- LuaMenu/configs/gameConfig/zk/ModOptions.lua | 26 ++-- LuaMenu/configs/gameConfig/zk/aiBlacklist.lua | 2 +- .../gameConfig/zk/benchmarkFileCAIfight.lua | 2 +- .../gameConfig/zk/gameUnitInformation.lua | 112 +++++++++--------- .../gameConfig/zk/helpSubmenuConfig.lua | 20 ++-- .../configs/gameConfig/zk/linkFunctions.lua | 10 +- .../configs/gameConfig/zk/rankFunction.lua | 8 +- .../configs/gameConfig/zk/settingsMenu.lua | 20 ++-- .../gameConfig/zk/singleplayerMenu.lua | 10 +- .../zk/singleplayerQuickSkirmish.lua | 14 +-- .../gameConfig/zk/skinning/skinConfig.lua | 4 +- .../gameConfig/zkdev/singleplayerMenu.lua | 12 +- LuaMenu/configs/planetwars/factionText.lua | 2 +- .../configs/springsettings/springsettings.lua | 2 +- .../chili/skins/DarkHiveSquare/skin.lua | 2 +- LuaMenu/widgets/chili/skins/Evolved/skin.lua | 14 +-- .../widgets/chili/skins/EvolvedBasic/skin.lua | 12 +- LuaMenu/widgets/chili/skins/Glass/skin.lua | 4 +- LuaMenu/widgets/chili/skins/Mat/skin.lua | 2 +- .../widgets/chili/skins/Robocracy/skin.lua | 2 +- LuaMenu/widgets/chili/skins/Twilight/skin.lua | 4 +- LuaMenu/widgets/chobby/utilities/buttons.lua | 18 +-- LuaMenu/widgets/gui_campaign_handler.lua | 2 +- LuaMenu/widgets/gui_friend_window.lua | 4 +- LuaMenu/widgets/gui_springboard_window.lua | 20 ++-- LuaMenu/widgets/include/IterableMap.lua | 36 +++--- 45 files changed, 311 insertions(+), 307 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 2a45a9f8b..70b0f8fe6 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -7,6 +7,12 @@ allow_defined_top = true max_line_length = false codes = true +-- Ideally reenable these warnings later +redefined = false + +ignore = { + "512" -- Loop can be executed at most once. +} -- Something to think about in the future -- max_cyclomatic_complexity = 10 diff --git a/LuaMenu/Addons/json.lua b/LuaMenu/Addons/json.lua index bc781cf72..f45cb2774 100644 --- a/LuaMenu/Addons/json.lua +++ b/LuaMenu/Addons/json.lua @@ -18,7 +18,7 @@ -- compat-5.1 if using Lua 5.0 -- -- CHANGELOG --- 0.9.20 Introduction of local Lua functions for private functions (removed _ function prefix). +-- 0.9.20 Introduction of local Lua functions for private functions (removed _ function prefix). -- Fixed Lua 5.1 compatibility issues. -- Introduced json.null to have null values in associative arrays. -- encode() performance improvement (more than 50%) through table.concat rather than .. @@ -65,19 +65,19 @@ function json.encode (v) if v==nil then return "null" end - + local vtype = type(v) -- Handle strings if vtype == 'string' then return '"' .. encodeString(v) .. '"' -- Need to handle encoding in string end - + -- Handle booleans if vtype=='number' or vtype=='boolean' then return tostring(v) end - + -- Handle tables if vtype=='table' then local rval = {} @@ -100,12 +100,12 @@ function json.encode (v) return '{' .. table.concat(rval,',') .. '}' end end - + -- Handle null values if vtype=='function' and v==null then return 'null' end - + assert(false,'encode attempt to encode unsupported type ' .. vtype .. ':' .. tostring(v)) end @@ -137,7 +137,7 @@ function json.decode(s, startPos) if curChar==[["]] or curChar==[[']] then return decode_scanString(s,startPos) end - + -- Otherwise, it must be a constant return decode_scanConstant(s,startPos) end @@ -199,14 +199,14 @@ function decode_scanComment(s, startPos) assert( string.sub(s,startPos,startPos+1)=='/*', "decode_scanComment called but comment does not start at position " .. startPos) local endPos = string.find(s,'*/',startPos+2) assert(endPos~=nil, "Unterminated comment in string at " .. startPos) - return endPos+2 + return endPos+2 end --- Scans for given constants: true, false or null -- Returns the appropriate Lua type, and the position of the next character to read. -- @param s The string being scanned. -- @param startPos The position in the string at which to start scanning. --- @return object, int The object (true, false or nil) and the position at which the next character should be +-- @return object, int The object (true, false or nil) and the position at which the next character should be -- scanned. function decode_scanConstant(s, startPos) local consts = { ["true"] = true, ["false"] = false, ["null"] = nil } @@ -298,7 +298,7 @@ function decode_scanString(s,startPos) local stringLen = string.len(s) repeat local curChar = string.sub(s,endPos,endPos) - if not escaped then + if not escaped then if curChar==[[\]] then escaped = true else @@ -314,7 +314,7 @@ function decode_scanString(s,startPos) local stringValue = 'return ' .. string.sub(s, startPos, endPos-1) local stringEval = loadstring(stringValue) assert(stringEval, 'Failed to load string [ ' .. stringValue .. '] in JSON4Lua.decode_scanString at position ' .. startPos .. ' : ' .. endPos) - return stringEval(), endPos + return stringEval(), endPos end --- Scans a JSON string skipping all whitespace from the current start position. @@ -348,7 +348,7 @@ function encodeString(s) s = string.gsub(s,"'","\\'") s = string.gsub(s,'\n','\\n') s = string.gsub(s,'\t','\\t') - return s + return s end -- Determines whether the given Lua type is an array or a table / dictionary. @@ -358,7 +358,7 @@ end -- @param t The table to evaluate as an array -- @return boolean, number True if the table can be represented as an array, false otherwise. If true, -- the second returned value is the maximum --- number of indexed elements in the array. +-- number of indexed elements in the array. function isArray(t) -- @@ -372,7 +372,7 @@ function isArray(t) return (array_count == table_count), array_count --[[ - -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable + -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable -- (with the possible exception of 'n') local maxIndex = 0 for k,v in base.pairs(t) do @@ -398,6 +398,6 @@ end -- @return boolean True if the object should be JSON encoded, false if it should be ignored. function isEncodable(o) local t = type(o) - return (t=='string' or t=='boolean' or t=='number' or t=='nil' or t=='table') or (t=='function' and o==null) + return (t=='string' or t=='boolean' or t=='number' or t=='nil' or t=='table') or (t=='function' and o==null) end diff --git a/LuaMenu/Addons/tablefunctions.lua b/LuaMenu/Addons/tablefunctions.lua index 10b259d9a..6f1175021 100644 --- a/LuaMenu/Addons/tablefunctions.lua +++ b/LuaMenu/Addons/tablefunctions.lua @@ -80,9 +80,9 @@ function Spring.Utilities.TableToString(data, key) end if dataType == "string" then local cleaned = data:gsub("\n", "\\n"):gsub("\r", "\\r"):gsub("\t", "\\t"):gsub("\a", "\\a"):gsub("\v", "\\v"):gsub("\"", "\\\"") - return key .. [[="]] .. cleaned .. [["]] + return key .. [[="]] .. cleaned .. [["]] elseif dataType == "number" then - return key .. "=" .. data + return key .. "=" .. data elseif dataType == "boolean" then return key .. "=" .. ((data and "true") or "false") elseif dataType == "table" then @@ -175,7 +175,7 @@ function Spring.Utilities.CustomKeyToUsefulTable(dataRaw) dataRaw = string.gsub(dataRaw, '_', '=') dataRaw = Spring.Utilities.Base64Decode(dataRaw) local dataFunc, err = loadstring("return " .. dataRaw) - if dataFunc then + if dataFunc then local success, usefulTable = pcall(dataFunc) if success then if collectgarbage then diff --git a/LuaMenu/Addons/timeFunctions.lua b/LuaMenu/Addons/timeFunctions.lua index 5d9e0876b..882cc79f7 100644 --- a/LuaMenu/Addons/timeFunctions.lua +++ b/LuaMenu/Addons/timeFunctions.lua @@ -67,7 +67,7 @@ local function FixTimeOutOfBounds(timeTable) timeTable[i + 1] = timeTable[i + 1] + 1 end end - + repeat local updated = false -- Overflow @@ -75,7 +75,7 @@ local function FixTimeOutOfBounds(timeTable) if timeTable[5] == 2 and IsLeapYear(timeTable[6]) then daysInThisMonth = 29 end - + if timeTable[4] > daysInThisMonth then -- Some bases are one index and some are zero indexed FFS!! timeTable[4] = timeTable[4] - daysInThisMonth timeTable[5] = timeTable[5] + 1 @@ -86,7 +86,7 @@ local function FixTimeOutOfBounds(timeTable) timeTable[6] = timeTable[6] + 1 updated = true end - + -- Underflow local daysInLastMonth = monthDays[(timeTable[5] - 2)%12 + 1] or 31 if timeTable[4] < 1 then @@ -100,7 +100,7 @@ local function FixTimeOutOfBounds(timeTable) updated = true end until (not updated) - + return timeTable end @@ -112,15 +112,15 @@ function Spring.Utilities.FormatTime(seconds, includeSeconds) if seconds < 0 then return (includeSeconds and "0s") or "0m" end - + local hours = math.floor(seconds/3600) local minutes = math.floor(seconds/60)%60 local seconds = math.floor(seconds)%60 - + --Spring.Echo("pastTime", pastTime[1], pastTime[2], pastTime[3], pastTime[4], "pastSeconds", pastSeconds) --Spring.Echo("currentTime", currentTime[1], currentTime[2], currentTime[3], currentTime[4], "currentSeconds", currentSeconds) --Spring.Echo("seconds", seconds) - + local timeText = "" if hours > 0 then timeText = timeText .. hours .. "h " @@ -131,7 +131,7 @@ function Spring.Utilities.FormatTime(seconds, includeSeconds) if includeSeconds then timeText = timeText .. seconds .. "s " end - + return timeText end @@ -150,10 +150,10 @@ function Spring.Utilities.ArchaicFormatDate(timeTable, translator) else daySuffix = "th" end - + local timeSuffix = (timeTable[3] < 12 and "AM") or "PM" local hour = (timeTable[3] - 1)%12 + 1 - + local stringToFormat = "%d" .. daySuffix .. " of " .. translator("month_" .. timeTable[5]) .. " at " .. "%d:%02d " .. timeSuffix local timeString = string.format(stringToFormat, timeTable[4], hour, timeTable[2]) return timeString @@ -209,7 +209,7 @@ function Spring.Utilities.GetTimeToPast(pastTimeString, includeSeconds) -- Always assume that the past time is one day behind. currentSeconds = currentSeconds + 86400 end - + return Spring.Utilities.FormatTime(currentSeconds - pastSeconds, includeSeconds) end @@ -225,16 +225,16 @@ function Spring.Utilities.GetTimeDifferenceTable(targetTime, currentTime) tonumber(os.date("!%m")), -- Month tonumber(os.date("!%Y")), -- Year } - + for i = 1, #targetTime do if not (targetTime[i] and currentTime[i]) then return false end end - + -- Order times. local before, after = currentTime, targetTime - + local targetInTheFuture = true for i = 6, 1, -1 do if before[i] ~= after[i] then @@ -245,22 +245,22 @@ function Spring.Utilities.GetTimeDifferenceTable(targetTime, currentTime) break end end - + -- Add days based on year difference. local year = before[6] while before[6] < after[6] do after[4] = after[4] + DaysInAYear(before[6]) before[6] = before[6] + 1 end - + -- Convert month to day. before[4] = before[4] + MonthToDays(before) after[4] = after[4] + MonthToDays(after) - + -- Clear year and month now that conversion to day is complete. after[5] = 0 after[6] = 0 - + -- Do subtraction with unbounded days. for i = 1, 4 do after[i] = after[i] - before[i] @@ -269,7 +269,7 @@ function Spring.Utilities.GetTimeDifferenceTable(targetTime, currentTime) after[i + 1] = after[i + 1] - 1 end end - + return after, targetInTheFuture end @@ -304,7 +304,7 @@ function Spring.Utilities.TimeStringToTable(timeString) return false end end - + return timeTable end @@ -316,7 +316,7 @@ function Spring.Utilities.GetTimeDifference(targetTimeString, otherTime) if otherTime then otherTime = Spring.Utilities.TimeStringToTable(otherTime) end - + local difference, targetInTheFuture = Spring.Utilities.GetTimeDifferenceTable(targetTime, otherTime) local timeText, isNow = Spring.Utilities.FormatRelativeTime(difference, targetInTheFuture) return timeText, targetInTheFuture, isNow @@ -331,23 +331,23 @@ function Spring.Utilities.UtcToLocal(utcTimeString) tonumber(os.date("%m")), -- Month tonumber(os.date("%Y")), -- Year } - + for i = 1, #localTime do if not localTime[i] then return false end end - + local utcTime = Spring.Utilities.TimeStringToTable(utcTimeString) if not utcTime then return false end - + local difference, localInTheFuture = Spring.Utilities.GetTimeDifferenceTable(localTime) if not difference then return end - + if localInTheFuture then for i = 1, 6 do utcTime[i] = utcTime[i] + difference[i] @@ -357,7 +357,7 @@ function Spring.Utilities.UtcToLocal(utcTimeString) utcTime[i] = utcTime[i] - difference[i] end end - + return FixTimeOutOfBounds(utcTime) end @@ -378,7 +378,7 @@ function Spring.Utilities.GetCurrentUtc() tonumber(os.date("!%m")), tonumber(os.date("!%Y")), } - + return string.format("%04d-%02d-%02dT%02d:%02d:%02d", t[6], t[5], t[4], t[3], t[2], t[1]) end @@ -391,6 +391,6 @@ function Spring.Utilities.GetCompactCurrentUtc() tonumber(os.date("!%m")), tonumber(os.date("!%Y")), } - + return string.format("%04d%02d%02d_%02d%02d%02d", t[6], t[5], t[4], t[3], t[2], t[1]) end diff --git a/LuaMenu/configs/countryShortname.lua b/LuaMenu/configs/countryShortname.lua index 730867436..c0e7ae8bd 100644 --- a/LuaMenu/configs/countryShortname.lua +++ b/LuaMenu/configs/countryShortname.lua @@ -1,4 +1,4 @@ -return { +return { AF = "Afghanistan", AL = "Albania", DZ = "Algeria", diff --git a/LuaMenu/configs/gameConfig/byar/ModOptions.lua b/LuaMenu/configs/gameConfig/byar/ModOptions.lua index 2e769e968..b9b753532 100644 --- a/LuaMenu/configs/gameConfig/byar/ModOptions.lua +++ b/LuaMenu/configs/gameConfig/byar/ModOptions.lua @@ -170,7 +170,7 @@ local options={ {key="enabled", name="Enabled", desc="Enable TerrainTypes related MoveSpeed Buffs"}, } }, - + { key="map_waterlevel", name="Water Level", @@ -181,8 +181,8 @@ local options={ max = 10000, step = 1, section="bar_options", - }, - + }, + { key="map_tidal", name="Tidal Strength", @@ -211,7 +211,7 @@ local options={ -- {key="exponly", name="ExperienceOnly", desc="Enable Unbalanced Commanders experience to power, health and reload multipliers"}, -- } --}, - + { key = 'coop', name = 'Cooperative mode', @@ -228,7 +228,7 @@ local options={ section= 'bar_modes', def = false, }, - + { key="transportenemy", name="Enemy Transporting", diff --git a/LuaMenu/configs/gameConfig/byar/aiBlacklist.lua b/LuaMenu/configs/gameConfig/byar/aiBlacklist.lua index 22de9ba14..7cd1314d4 100644 --- a/LuaMenu/configs/gameConfig/byar/aiBlacklist.lua +++ b/LuaMenu/configs/gameConfig/byar/aiBlacklist.lua @@ -1,4 +1,4 @@ -return { +return { CppTestAI = true, E323AI = true, HughAI = true, diff --git a/LuaMenu/configs/gameConfig/byar/rankFunction.lua b/LuaMenu/configs/gameConfig/byar/rankFunction.lua index 995a4f2a6..3816da2fd 100644 --- a/LuaMenu/configs/gameConfig/byar/rankFunction.lua +++ b/LuaMenu/configs/gameConfig/byar/rankFunction.lua @@ -16,9 +16,9 @@ local function GetImageFunction(level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER diff --git a/LuaMenu/configs/gameConfig/evorts/ModOptions.lua b/LuaMenu/configs/gameConfig/evorts/ModOptions.lua index 1fec20252..bafad7609 100644 --- a/LuaMenu/configs/gameConfig/evorts/ModOptions.lua +++ b/LuaMenu/configs/gameConfig/evorts/ModOptions.lua @@ -116,8 +116,8 @@ local options= { step = 1, -- quantization is aligned to the def value -- (step <= 0) means that there is no quantization }, - --- Gameplay Options + +-- Gameplay Options { key = 'gameplayoptions', name = 'Gameplay Options', @@ -138,8 +138,8 @@ local options= { {key="fastest", name="Fastest", desc="All units have a buildtime of 5 seconds"}, } }, - - + + { key="aidifficulty", name="ShardLua AI Difficulty", @@ -155,7 +155,7 @@ local options= { {key="insane", name="Insane", desc="AI gets a gift of 100 metal every 5 seconds and a static 100 energy income."}, } }, --- Control Victory Options +-- Control Victory Options { key = 'controlvictoryoptions', name = 'Control Victory Options', @@ -175,7 +175,7 @@ local options= { {key="tugofwar", name="Tug of War", desc="A Control Point steals enemy score, zero means defeat."}, {key="domination", name="Domination", desc="Holding all Control Points will grant 1000 score, first to reach the score limit wins."}, } - }, + }, { key = 'limitscore', name = 'Total Score', @@ -191,7 +191,7 @@ local options= { { key = "numberofcontrolpoints", name = "Set number of Control Points on the map", - desc = "Sets the number of control points on the map and scales the total score amount to match. Has no effect if Preset map configs are enabled.", + desc = "Sets the number of control points on the map and scales the total score amount to match. Has no effect if Preset map configs are enabled.", section= "controlvictoryoptions", type="list", def="7", @@ -206,7 +206,7 @@ local options= { { key = "usemapconfig", name = "Use preset map-specific Control Point locations?", - desc = "Should the control point config for this map be used instead of autogenerated control points?", + desc = "Should the control point config for this map be used instead of autogenerated control points?", type="list", def="disabled", section= "controlvictoryoptions", @@ -336,7 +336,7 @@ local options= { -- (step <= 0) means that there is no quantization }, -- End Control Victory Options - + -- Chicken Defense Options { key = 'chicken_defense_options', @@ -416,7 +416,7 @@ local options= { def = true, section= "chicken_defense_options", }, - + -- Chicken Defense Custom Difficulty Settings { key = 'chicken_defense_custom_difficulty_settings', diff --git a/LuaMenu/configs/gameConfig/evorts/aiBlacklist.lua b/LuaMenu/configs/gameConfig/evorts/aiBlacklist.lua index 22de9ba14..7cd1314d4 100644 --- a/LuaMenu/configs/gameConfig/evorts/aiBlacklist.lua +++ b/LuaMenu/configs/gameConfig/evorts/aiBlacklist.lua @@ -1,4 +1,4 @@ -return { +return { CppTestAI = true, E323AI = true, HughAI = true, diff --git a/LuaMenu/configs/gameConfig/evorts/rankFunction.lua b/LuaMenu/configs/gameConfig/evorts/rankFunction.lua index 995a4f2a6..3816da2fd 100644 --- a/LuaMenu/configs/gameConfig/evorts/rankFunction.lua +++ b/LuaMenu/configs/gameConfig/evorts/rankFunction.lua @@ -16,9 +16,9 @@ local function GetImageFunction(level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER diff --git a/LuaMenu/configs/gameConfig/tc/aiblacklist.lua b/LuaMenu/configs/gameConfig/tc/aiblacklist.lua index 10ea42df3..86d987217 100644 --- a/LuaMenu/configs/gameConfig/tc/aiblacklist.lua +++ b/LuaMenu/configs/gameConfig/tc/aiblacklist.lua @@ -1,4 +1,4 @@ -return { +return { CppTestAI = true, E323AI = true, HughAI = true, @@ -8,6 +8,6 @@ return { NullOOJavaAI = true, RAI = true, Sharddev = true, - Shard = true, + Shard = true, AAI = true, } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua b/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua index 79dca3499..b5fbbde6c 100644 --- a/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua +++ b/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua @@ -18,18 +18,18 @@ local function AddUnit(unitName) end inNameList[unitName] = true nameList[#nameList + 1] = unitName - + local ud = UnitDefNames[unitName] if ud.buildOptions then for i = 1, #ud.buildOptions do AddUnit(UnitDefs[ud.buildOptions[i] ].name) end end - + if ud.customParams.morphto then AddUnit(ud.customParams.morphto) end - + if ud.weapons then for i = 1, #ud.weapons do local wd = WeaponDefs[ud.weapons[i].weaponDef] @@ -38,7 +38,7 @@ local function AddUnit(unitName) end end end - + if carrierDefs[ud.id] then local data = carrierDefs[ud.id] for i = 1, #data do @@ -75,7 +75,7 @@ local function UnitOrder(name1, name2) if not data2 then return true end - + local category1 = categories[data1.category].order local category2 = categories[data2.category].order return category1 < category2 or (category1 == category2 and data1.order < data2.order) diff --git a/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua b/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua index c170e8fca..a21514804 100644 --- a/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua +++ b/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua @@ -218,7 +218,7 @@ return { control = communityControl, }, -- { --- name = "tutorials", +-- name = "tutorials", -- control = WG.MissionHandler.GetControl(), -- }, { diff --git a/LuaMenu/configs/gameConfig/tc/linkFunctions.lua b/LuaMenu/configs/gameConfig/tc/linkFunctions.lua index 47c18e30a..d6d6f574a 100644 --- a/LuaMenu/configs/gameConfig/tc/linkFunctions.lua +++ b/LuaMenu/configs/gameConfig/tc/linkFunctions.lua @@ -1,12 +1,12 @@ -local function link_homePage() +local function link_homePage() return "http://www.cursed.one" end -local function link_replays() +local function link_replays() return "http://replays.springrts.com/?game_pref=24" end -local function link_maps() +local function link_maps() return "https://springfiles.com/spring/spring-maps" end diff --git a/LuaMenu/configs/gameConfig/tc/modoptions.lua b/LuaMenu/configs/gameConfig/tc/modoptions.lua index 04d075139..11f5ce214 100644 --- a/LuaMenu/configs/gameConfig/tc/modoptions.lua +++ b/LuaMenu/configs/gameConfig/tc/modoptions.lua @@ -50,7 +50,7 @@ local options={ name = 'Resources', desc = 'Sets storage and amount of resources that players will start with', type = 'section', - }, + }, { key = 'startmetal', scope = 'team', @@ -72,7 +72,7 @@ local options={ def = 2000, min = 500, max = 10000, - step = 1, + step = 1, }, { key = 'metalmult', @@ -83,19 +83,19 @@ local options={ def = 1, min = 0.1, max = 100, - step = 0.05, - }, + step = 0.05, + }, { key = 'corpsetime', name = 'Corpse stay time', desc = 'A factor that determines how long corpses will stay on the battlefield for reclaiming or resurrection', type = 'number', - section= "b_resources", + section= "b_resources", def = 4, min = 0, max = 20, - step = 1, - }, + step = 1, + }, ---- AI OPTIONS ---- { @@ -110,7 +110,7 @@ local options={ desc="A cheating AI starts in skirmishes with some defense buildings, base shields and an energy and metal producing central building.", type = "bool", def = false, - section= "e_aioptions", + section= "e_aioptions", }, { key="killstragglers", @@ -118,17 +118,17 @@ local options={ desc="All (non survival mode) AI units will be killed after the AI's base was destroyed.", type = "bool", def = true, - section= "e_aioptions", - }, + section= "e_aioptions", + }, { key = "critters", name = "Spawn critters", desc = "This will enable spawning neutral critters on maps", type = "bool", def = true, - section= "e_aioptions", - }, - + section= "e_aioptions", + }, + ---- CHICKEN/SURVIAL MODE STUFF ---- --[[{ key = 'd_chicken', @@ -211,7 +211,7 @@ local options={ def = 12, min = 0, max = 60, - step = 1, + step = 1, }, { key = 'burrowqueentime', @@ -222,9 +222,9 @@ local options={ def = 100, min = 0, max = 1200, - step = 1, + step = 1, }, ]]-- --- Control Victory Options +-- Control Victory Options { key = 'controlvictoryoptions', name = 'Control Victory', @@ -244,7 +244,7 @@ local options={ {key="tugofwar", name="Tug of War", desc="A Control Point steals enemy score, zero means defeat."}, {key="domination", name="Domination", desc="Holding all Control Points will grant 1000 score, first to reach the score limit wins."}, } - }, + }, { key = 'limitscore', name = 'Total Score', @@ -260,13 +260,13 @@ local options={ { key = "numberofcontrolpoints", name = "Set number of Control Points on map", - desc = "Sets the number of control points on the map and scales the total score amount to match. Has no effect if Preset map configs are enabled.", + desc = "Sets the number of control points on the map and scales the total score amount to match. Has no effect if Preset map configs are enabled.", section= "controlvictoryoptions", type="list", def="7", section= "controlvictoryoptions", items={ - {key="1", name="1", desc="King of the Hill Mode"}, + {key="1", name="1", desc="King of the Hill Mode"}, {key="7", name="7", desc="Capture 7 points"}, {key="13", name="13", desc="Capture 13 points"}, {key="19", name="19", desc="Capture 19 points"}, @@ -276,7 +276,7 @@ local options={ --[[ { key = "usemapconfig", name = "Use preset map-specific Control Point locations?", - desc = "Should the control point config for this map be used instead of autogenerated control points?", + desc = "Should the control point config for this map be used instead of autogenerated control points?", type="list", def="disabled", section= "controlvictoryoptions", @@ -291,9 +291,9 @@ local options={ desc = "Players start with a small base.", type = "bool", def = true, - section = 'controlvictoryoptions', - }, - + section = 'controlvictoryoptions', + }, + { key = 'captureradius', name = 'Capture Radius', @@ -414,7 +414,7 @@ local options={ step = 1, -- quantization is aligned to the def value -- (step <= 0) means that there is no quantization }, --- End Control Victory Options +-- End Control Victory Options } --// add key-name to the description (so you can easier manage modoptions in springie) diff --git a/LuaMenu/configs/gameConfig/tc/rankfunction.lua b/LuaMenu/configs/gameConfig/tc/rankfunction.lua index 9f7460b65..f11a297d5 100644 --- a/LuaMenu/configs/gameConfig/tc/rankfunction.lua +++ b/LuaMenu/configs/gameConfig/tc/rankfunction.lua @@ -20,9 +20,9 @@ local function GetImageFunction(icon, level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER @@ -40,9 +40,9 @@ local function GetLargeImageFunction(icon, level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return LARGE_RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER diff --git a/LuaMenu/configs/gameConfig/tc/settingsmenu.lua b/LuaMenu/configs/gameConfig/tc/settingsmenu.lua index 00900a119..8dafa5697 100644 --- a/LuaMenu/configs/gameConfig/tc/settingsmenu.lua +++ b/LuaMenu/configs/gameConfig/tc/settingsmenu.lua @@ -10,18 +10,18 @@ local function UpdateLups() if not settings then return end - + local lupsFileName = settings.ShaderDetail_file or "LuaMenu/configs/gameConfig/zk/lups/lups3.cfg" local lupsAirJetDisabled = ((settings.LupsAirJet == "On") and FALSE) or TRUE local lupsRibbonDisabled = ((settings.LupsRibbon == "On") and FALSE) or TRUE local lupsShieldSphereColorDisabled = ((settings.LupsShieldSphereColor == "On") and FALSE) or TRUE - + local sourceFile = VFS.LoadFile(lupsFileName) - + sourceFile = sourceFile:gsub("__AIR_JET__", lupsAirJetDisabled) sourceFile = sourceFile:gsub("__RIBBON__", lupsRibbonDisabled) sourceFile = sourceFile:gsub("__SHIELD_SPHERE_COLOR__", lupsShieldSphereColorDisabled) - + local settingsFile = io.open(lupsFileTarget, "w") settingsFile:write(sourceFile) settingsFile:close() @@ -180,7 +180,7 @@ local settingsConfig = { } }, }, - + settings = { { name = "DisplayMode", @@ -690,7 +690,7 @@ local settingsConfig = { name = "Off", apply = { LoadingMT = 0, -- See https://github.com/spring/spring/commit/bdd6b641960759ccadf3e7201e37f2192d873791 - AdvUnitShading = 1, + AdvUnitShading = 1, AdvMapShading = 1, LuaShaders = 1, ForceDisableShaders = 0, diff --git a/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua b/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua index 6fc684bc7..7520bc2ea 100644 --- a/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua +++ b/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua @@ -37,7 +37,7 @@ local aiNames = { "Purger", "Alpha", "Beta", - "Maneater", + "Maneater", "GammaRay", "Omega", "Snake", @@ -50,24 +50,24 @@ local aiNames = { "Testament", "Hellgate", "Deadmoon", - "Deadmeat", + "Deadmeat", "Lil'Sister", - "STFU&Play", + "STFU&Play", } function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) local gameType = pageChoices.gameType or 1 local map = pageChoices.map or 1 - + local Configuration = WG.Chobby.Configuration local pageConfig = skirmishSetupData.pages battleLobby:SelectMap(pageConfig[2].options[map]) - + battleLobby:SetBattleStatus({ allyNumber = 0, isSpectator = false, }) - + -- Chickens if gameType == 4 then battleLobby:AddAi("Zombie Survival: Easy", "Zombie Survival: Easy", 1) @@ -76,7 +76,7 @@ function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) battleLobby:AddAi("Zombie Survival: Hard", "Zombie Survival: Hard", 1) return end - + -- KOTH --[[ if gameType == 6 then local currentModoptions = battleLobby:GetMyBattleModoptions() or {} @@ -91,11 +91,11 @@ function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) end end end - battleLobby:SetModOptions(localModoptions) + battleLobby:SetModOptions(localModoptions) end]] - + local aiName = "Skirmish AI" - + -- AI game local aiNumber = 1 local allies = gameType - 1 -- needs cahnge @@ -103,7 +103,7 @@ function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) battleLobby:AddAi(aiNames[math.random(#aiNames)] .. " (" .. aiNumber .. ")", aiName, 0, Configuration.gameConfig.aiVersion) aiNumber = aiNumber + 1 end - + local enemies = gameType -- needs cahnge for i = 1, enemies do battleLobby:AddAi(aiNames[math.random(#aiNames)] .. " (" .. aiNumber .. ")", aiName, 1, Configuration.gameConfig.aiVersion) diff --git a/LuaMenu/configs/gameConfig/zk/ModOptions.lua b/LuaMenu/configs/gameConfig/zk/ModOptions.lua index c47c22a17..4a5f9fa57 100644 --- a/LuaMenu/configs/gameConfig/zk/ModOptions.lua +++ b/LuaMenu/configs/gameConfig/zk/ModOptions.lua @@ -1,4 +1,4 @@ - + -- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $ @@ -83,7 +83,7 @@ local options = { { key='none', name = "Off", desc = 'Turns commsharing off.' }, }, }, - + { key = "noelo", name = "No Elo", @@ -390,8 +390,8 @@ local options = { type = 'bool', section= 'experimental', def = false, - }, ---[[ + }, +--[[ { key = 'damagemult', name = 'Damage Multiplier', @@ -451,7 +451,7 @@ local options = { desc = 'Determines how many units and buildings a player is allowed to own at a time', type = 'number', section = 'multipliers', - def = 10000, -- don't change to anything reachable, won't take effect; engine default is ~10K + def = 10000, -- don't change to anything reachable, won't take effect; engine default is ~10K -- (actually 32K / #teams so 1v1+gaia allows ~10K each) min = 10, max = 10000, @@ -505,7 +505,7 @@ local options = { -- type = "bool", -- def = true, -- section = "experimental", - --}, + --}, -- { -- Causes desync https://springrts.com/mantis/view.php?id=5936 -- key = "pathfinder", -- name = "Pathfinder type", @@ -529,9 +529,9 @@ local options = { -- -- name = 'Classic', -- -- desc = 'An older pathfinding system without turninplace or reverse', -- -- } --- }, --- }, - +-- }, +-- }, + { key = 'chicken', name = 'Chicken', @@ -686,7 +686,7 @@ local options = { max = 9000, step = 60, }, ---[[ +--[[ { key = 'burrowtechtime', name = 'Burrow Tech Time', @@ -696,9 +696,9 @@ local options = { def = 12, min = 0, max = 60, - step = 1, + step = 1, }, -]]-- +]]-- { key = 'burrowqueentime', name = 'Burrow Queen Time', @@ -708,7 +708,7 @@ local options = { def = 15, min = 0, max = 120, - step = 1, + step = 1, }, } diff --git a/LuaMenu/configs/gameConfig/zk/aiBlacklist.lua b/LuaMenu/configs/gameConfig/zk/aiBlacklist.lua index 41db30019..a7170496e 100644 --- a/LuaMenu/configs/gameConfig/zk/aiBlacklist.lua +++ b/LuaMenu/configs/gameConfig/zk/aiBlacklist.lua @@ -1,4 +1,4 @@ -return { +return { CppTestAI = true, E323AI = true, HughAI = true, diff --git a/LuaMenu/configs/gameConfig/zk/benchmarkFileCAIfight.lua b/LuaMenu/configs/gameConfig/zk/benchmarkFileCAIfight.lua index ca91151b6..808ba7703 100644 --- a/LuaMenu/configs/gameConfig/zk/benchmarkFileCAIfight.lua +++ b/LuaMenu/configs/gameConfig/zk/benchmarkFileCAIfight.lua @@ -316,7 +316,7 @@ return [[[game] Side=Robots; Handicap=0; } - + [ALLYTEAM0] { NumAllies=0; diff --git a/LuaMenu/configs/gameConfig/zk/gameUnitInformation.lua b/LuaMenu/configs/gameConfig/zk/gameUnitInformation.lua index b955d9690..55a9f34e0 100644 --- a/LuaMenu/configs/gameConfig/zk/gameUnitInformation.lua +++ b/LuaMenu/configs/gameConfig/zk/gameUnitInformation.lua @@ -176,78 +176,78 @@ local nameList = { } local categories = { - cloak = { - name = "Cloakbots", + cloak = { + name = "Cloakbots", order = 1, }, - shield = { - name = "Shieldbots", + shield = { + name = "Shieldbots", order = 2, }, - veh = { - name = "Rovers", + veh = { + name = "Rovers", order = 3, }, - tank = { - name = "Tanks", + tank = { + name = "Tanks", order = 4, }, - hover = { - name = "Hovercraft", + hover = { + name = "Hovercraft", order = 5, }, - amph = { - name = "Amphbots", + amph = { + name = "Amphbots", order = 6, }, - jump = { - name = "Jumpbots", + jump = { + name = "Jumpbots", order = 7, }, - spider = { - name = "Spiders", + spider = { + name = "Spiders", order = 8, }, - gunship = { - name = "Gunships", + gunship = { + name = "Gunships", order = 9, }, - plane = { - name = "Planes", + plane = { + name = "Planes", order = 10, }, - ship = { - name = "Ships", + ship = { + name = "Ships", order = 11, }, - strider = { - name = "Striders", + strider = { + name = "Striders", order = 12, }, - econ = { - name = "Economy", + econ = { + name = "Economy", order = 13, }, - defence = { - name = "Defence", + defence = { + name = "Defence", order = 14, }, - special = { - name = "Special", + special = { + name = "Special", order = 15, }, - missilesilo = { - name = "Missile Silo", + missilesilo = { + name = "Missile Silo", order = 16, }, - drone = { - name = "Drones", + drone = { + name = "Drones", order = 17, }, } local humanNames = { - -- Cloak + -- Cloak factorycloak = { category = "cloak", order = 1, @@ -320,7 +320,7 @@ local humanNames = { description = "Area Cloaker/Jammer Walker", humanName = "Iris", }, - + -- Shield factoryshield = { category = "shield", @@ -394,7 +394,7 @@ local humanNames = { description = "Area Shield Walker", humanName = "Aspis", }, - + -- Vehicle factoryveh = { category = "veh", @@ -462,7 +462,7 @@ local humanNames = { description = "Capture Rover", humanName = "Dominatrix", }, - + -- Tank factorytank = { category = "tank", @@ -524,7 +524,7 @@ local humanNames = { description = "Flak Anti-Air Tank", humanName = "Ettin", }, - + -- Hover factoryhover = { category = "hover", @@ -580,7 +580,7 @@ local humanNames = { description = "Anti-Sub Hovercraft", humanName = "Claymore", }, - + -- Amph factoryamph = { category = "amph", @@ -648,7 +648,7 @@ local humanNames = { description = "Amphibious Teleport Bridge", humanName = "Djinn", }, - + -- Jump factoryjump = { category = "jump", @@ -716,7 +716,7 @@ local humanNames = { description = "Cloaked Jumping Anti-Heavy Bomb", humanName = "Skuttle", }, - + -- Spider factoryspider = { category = "spider", @@ -778,7 +778,7 @@ local humanNames = { description = "Cloaked Scout/Anti-Heavy", humanName = "Widow", }, - + -- Gunship factorygunship = { category = "gunship", @@ -852,7 +852,7 @@ local humanNames = { description = "Armed Heavy Air Transport", humanName = "Hercules", }, - + -- Plane factoryplane = { category = "plane", @@ -914,7 +914,7 @@ local humanNames = { description = "Area Jammer, Radar/Sonar Plane", humanName = "Owl", }, - + -- Ship factoryship = { category = "ship", @@ -976,7 +976,7 @@ local humanNames = { description = "Anti-Air Frigate", humanName = "Zephyr", }, - + -- Strider striderhub = { category = "strider", @@ -1050,7 +1050,7 @@ local humanNames = { description = "Battleship (Heavy Artillery)", humanName = "Shogun", }, - + -- Econ staticmex = { category = "econ", @@ -1118,7 +1118,7 @@ local humanNames = { description = "Repairs and Rearms Aircraft, repairs at 2.5 e/s per pad", humanName = "Airpad", }, - + -- Defence turretlaser = { category = "defence", @@ -1216,7 +1216,7 @@ local humanNames = { description = "Area Shield", humanName = "Aegis", }, - + -- Special staticradar = { category = "special", @@ -1278,7 +1278,7 @@ local humanNames = { description = "Planetary Energy Chisel", humanName = "Starlight", }, - + -- Missile Silo staticmissilesilo = { category = "missilesilo", @@ -1310,7 +1310,7 @@ local humanNames = { description = "Napalm Missile", humanName = "Inferno", }, - + -- Drone wolverine_mine = { category = "drone", @@ -1349,18 +1349,18 @@ local function AddUnit(unitName) end inNameList[unitName] = true nameList[#nameList + 1] = unitName - + local ud = UnitDefNames[unitName] if ud.buildOptions then for i = 1, #ud.buildOptions do AddUnit(UnitDefs[ud.buildOptions[i] ].name) end end - + if ud.customParams.morphto then AddUnit(ud.customParams.morphto) end - + if ud.weapons then for i = 1, #ud.weapons do local wd = WeaponDefs[ud.weapons[i].weaponDef] @@ -1369,7 +1369,7 @@ local function AddUnit(unitName) end end end - + if carrierDefs[ud.id] then local data = carrierDefs[ud.id] for i = 1, #data do @@ -1406,7 +1406,7 @@ local function UnitOrder(name1, name2) if not data2 then return true end - + local category1 = categories[data1.category].order local category2 = categories[data2.category].order return category1 < category2 or (category1 == category2 and data1.order < data2.order) diff --git a/LuaMenu/configs/gameConfig/zk/helpSubmenuConfig.lua b/LuaMenu/configs/gameConfig/zk/helpSubmenuConfig.lua index df081f13d..57758fa7e 100644 --- a/LuaMenu/configs/gameConfig/zk/helpSubmenuConfig.lua +++ b/LuaMenu/configs/gameConfig/zk/helpSubmenuConfig.lua @@ -204,7 +204,7 @@ local communityControl = Control:New { font = WG.Chobby.Configuration:GetFont(3), caption = "Community and development links", } - + Button:New { right = 11, y = 7, @@ -220,7 +220,7 @@ local communityControl = Control:New { }, parent = obj, } - + local listHolder = Control:New { x = 12, right = 15, @@ -260,7 +260,7 @@ local bugControl = Control:New { if not obj:IsEmpty() then return end - + local Configuration = WG.Chobby.Configuration Label:New { x = 15, @@ -271,7 +271,7 @@ local bugControl = Control:New { font = Configuration:GetFont(3), caption = "Send a bug report", } - + Button:New { right = 11, y = 7, @@ -287,7 +287,7 @@ local bugControl = Control:New { }, parent = obj, } - + local offset = 70 TextBox:New { x = 21, @@ -309,7 +309,7 @@ local bugControl = Control:New { parent = obj, } offset = offset + 36 - + offset = offset + 8 TextBox:New { x = 21, @@ -331,7 +331,7 @@ local bugControl = Control:New { parent = obj, } offset = offset + 36 - + offset = offset + 8 TextBox:New { x = 24, @@ -343,8 +343,8 @@ local bugControl = Control:New { parent = obj, } offset = offset + 36 - - + + Button:New { x = "35%", right = "35%", @@ -375,7 +375,7 @@ return { control = communityControl, }, { - name = "tutorials", + name = "tutorials", control = WG.MissionHandler.GetControl(), }, { diff --git a/LuaMenu/configs/gameConfig/zk/linkFunctions.lua b/LuaMenu/configs/gameConfig/zk/linkFunctions.lua index 7c3358208..4e8e4b91b 100644 --- a/LuaMenu/configs/gameConfig/zk/linkFunctions.lua +++ b/LuaMenu/configs/gameConfig/zk/linkFunctions.lua @@ -1,20 +1,20 @@ -local function link_reportPlayer(accountID) +local function link_reportPlayer(accountID) return "http://zero-k.info/Users/ReportToAdmin/" .. accountID end -local function link_userPage(accountID) +local function link_userPage(accountID) return "http://zero-k.info/Users/Detail/" .. accountID end -local function link_homePage() +local function link_homePage() return "http://zero-k.info/" end -local function link_replays() +local function link_replays() return "http://zero-k.info/Battles" end -local function link_maps() +local function link_maps() return "http://zero-k.info/Maps" end diff --git a/LuaMenu/configs/gameConfig/zk/rankFunction.lua b/LuaMenu/configs/gameConfig/zk/rankFunction.lua index 9f7460b65..f11a297d5 100644 --- a/LuaMenu/configs/gameConfig/zk/rankFunction.lua +++ b/LuaMenu/configs/gameConfig/zk/rankFunction.lua @@ -20,9 +20,9 @@ local function GetImageFunction(icon, level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER @@ -40,9 +40,9 @@ local function GetLargeImageFunction(icon, level, skill, isBot, isModerator) levelBracket = levelBracket + 1 end levelBracket = levelBracket - 1 - + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) - + return LARGE_RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" end return IMAGE_PLAYER diff --git a/LuaMenu/configs/gameConfig/zk/settingsMenu.lua b/LuaMenu/configs/gameConfig/zk/settingsMenu.lua index d8cfc8d2b..276609c67 100644 --- a/LuaMenu/configs/gameConfig/zk/settingsMenu.lua +++ b/LuaMenu/configs/gameConfig/zk/settingsMenu.lua @@ -11,7 +11,7 @@ local function UpdateLups(_, conf) if not settings then return end - + local lupsFileName = settings.ShaderDetail_file or "LuaMenu/configs/gameConfig/zk/lups/lups3.cfg" local lupsAirJetDisabled = ((settings.LupsAirJet == "On") and FALSE) or TRUE local lupsRibbonDisabled = ((settings.LupsRibbon == "On") and FALSE) or TRUE @@ -19,16 +19,16 @@ local function UpdateLups(_, conf) local LupsShieldHighQualityDisabled = ((settings.LupsShieldShader == "Default") and FALSE) or TRUE local lupsWaterRefractEnabled = ((settings.LupsWaterSettings == "Refraction" or settings.LupsWaterSettings == "Refract and Reflect") and 1) or 0 local lupsWaterReflectEnabled = ((settings.LupsWaterSettings == "Reflection" or settings.LupsWaterSettings == "Refract and Reflect") and 1) or 0 - + local sourceFile = VFS.LoadFile(lupsFileName) - + sourceFile = sourceFile:gsub("__AIR_JET__", lupsAirJetDisabled) sourceFile = sourceFile:gsub("__RIBBON__", lupsRibbonDisabled) sourceFile = sourceFile:gsub("__SHIELD_SPHERE_COLOR__", LupsShieldShaderDisabled) sourceFile = sourceFile:gsub("__SHIELD_SPHERE_HIGH_QUALITY__", LupsShieldHighQualityDisabled) sourceFile = sourceFile:gsub("__ENABLE_REFRACT__", lupsWaterRefractEnabled) sourceFile = sourceFile:gsub("__ENABLE_REFLECT__", lupsWaterReflectEnabled) - + local settingsFile = io.open(lupsFileTarget, "w") settingsFile:write(sourceFile) settingsFile:close() @@ -205,7 +205,7 @@ local settingsConfig = { } }, }, - + -- FIXME: this list is in dire need of resorting settings = { { @@ -218,7 +218,7 @@ local settingsConfig = { humanName = "Menu Display Mode", lobbyDisplayModeToggle = true, }, - + { name = "CompatibilityMode", humanName = "Compatibility Mode", @@ -242,7 +242,7 @@ local settingsConfig = { name = "Off", apply = { LoadingMT = 0, -- See https://github.com/spring/spring/commit/bdd6b641960759ccadf3e7201e37f2192d873791 - AdvUnitShading = 1, + AdvUnitShading = 1, AdvMapShading = 1, LuaShaders = 1, ForceDisableShaders = 0, @@ -746,7 +746,7 @@ local settingsConfig = { }, }, }, - + { name = "WaterType", humanName = "Water Type", @@ -1070,7 +1070,7 @@ end local function DefaultPresetFunc() local gameDefault = settingsConfig[2].presets[1].settings - + if Platform then local gpuMemorySize = Platform.gpuMemorySize or 0 if gpuMemorySize == 0 then @@ -1105,7 +1105,7 @@ local function DefaultPresetFunc() end end end - + -- Default to Medium Spring.Echo("Medium settings preset", Platform, (Platform or {}).gpuMemorySize, (Platform or {}).glVersionShort) return Spring.Utilities.MergeTable(gameDefault, settingsConfig[1].presets[4].settings, true) diff --git a/LuaMenu/configs/gameConfig/zk/singleplayerMenu.lua b/LuaMenu/configs/gameConfig/zk/singleplayerMenu.lua index d8d0812e6..7274bd19c 100644 --- a/LuaMenu/configs/gameConfig/zk/singleplayerMenu.lua +++ b/LuaMenu/configs/gameConfig/zk/singleplayerMenu.lua @@ -95,26 +95,26 @@ return { submenuControl = WG.CampaignHandler.GetControl(true), tabs = { { - name = "technology", + name = "technology", control = WG.TechnologyHandler.GetControl(), }, { - name = "commander", + name = "commander", control = WG.CommanderHandler.GetControl(), }, --{ - -- name = "codex", + -- name = "codex", -- control = WG.CodexHandler.GetControl(), --}, { - name = "options", + name = "options", control = WG.CampaignOptionsWindow.GetControl(), }, }, }, }, { - name = "skirmish", + name = "skirmish", control = WG.BattleRoomWindow.GetSingleplayerControl(VFS.Include(LUA_DIRNAME .. "configs/gameConfig/zk/singleplayerQuickSkirmish.lua")), entryCheck = WG.BattleRoomWindow.SetSingleplayerGame, }, diff --git a/LuaMenu/configs/gameConfig/zk/singleplayerQuickSkirmish.lua b/LuaMenu/configs/gameConfig/zk/singleplayerQuickSkirmish.lua index 464341902..3823fabb9 100644 --- a/LuaMenu/configs/gameConfig/zk/singleplayerQuickSkirmish.lua +++ b/LuaMenu/configs/gameConfig/zk/singleplayerQuickSkirmish.lua @@ -67,34 +67,34 @@ function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) local difficulty = pageChoices.difficulty or 2 -- easy is default local gameType = pageChoices.gameType or 1 local map = pageChoices.map or 1 - + local Configuration = WG.Chobby.Configuration local pageConfig = skirmishSetupData.pages battleLobby:SelectMap(pageConfig[3].options[map]) - + battleLobby:SetBattleStatus({ allyNumber = 0, isSpectator = false, }) - + -- Chickens if gameType == 4 then battleLobby:AddAi(chickenDifficulty[difficulty], chickenDifficulty[difficulty], 1) return end - + local bitAppend = (Configuration:GetIsRunning64Bit() and "64") or "32" local devString = ((Configuration:GetIsDevEngine() and "Dev") or "") local aiName = devString .. aiDifficultyMap[difficulty] .. bitAppend local displayName = aiName - + if Configuration.gameConfig.GetAiSimpleName then local betterName = Configuration.gameConfig.GetAiSimpleName(displayName) if betterName then displayName = betterName end end - + -- AI game local aiNumber = 1 local allies = gameType - 1 @@ -102,7 +102,7 @@ function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) battleLobby:AddAi(displayName .. " (" .. aiNumber .. ")", aiName, 0, Configuration.gameConfig.aiVersion) aiNumber = aiNumber + 1 end - + local enemies = gameType for i = 1, enemies do battleLobby:AddAi(displayName .. " (" .. aiNumber .. ")", aiName, 1, Configuration.gameConfig.aiVersion) diff --git a/LuaMenu/configs/gameConfig/zk/skinning/skinConfig.lua b/LuaMenu/configs/gameConfig/zk/skinning/skinConfig.lua index 95f8b4f01..d0a8af5b8 100644 --- a/LuaMenu/configs/gameConfig/zk/skinning/skinConfig.lua +++ b/LuaMenu/configs/gameConfig/zk/skinning/skinConfig.lua @@ -1,7 +1,7 @@ local config = { backgroundFocus = { - 0.25, - 0.25, + 0.25, + 0.25, }, } diff --git a/LuaMenu/configs/gameConfig/zkdev/singleplayerMenu.lua b/LuaMenu/configs/gameConfig/zkdev/singleplayerMenu.lua index 5f4d7751b..b1619cf6d 100644 --- a/LuaMenu/configs/gameConfig/zkdev/singleplayerMenu.lua +++ b/LuaMenu/configs/gameConfig/zkdev/singleplayerMenu.lua @@ -7,26 +7,26 @@ local menuItems = { submenuControl = WG.CampaignHandler.GetControl(), tabs = { { - name = "technology", + name = "technology", control = WG.TechnologyHandler.GetControl(), }, { - name = "commander", + name = "commander", control = WG.CommanderHandler.GetControl(), }, { - name = "codex", + name = "codex", control = WG.CodexHandler.GetControl(), }, { - name = "options", + name = "options", control = WG.CampaignOptionsWindow.GetControl(), }, }, }, }, { - name = "skirmish", + name = "skirmish", control = WG.BattleRoomWindow.GetSingleplayerControl(VFS.Include(LUA_DIRNAME .. "configs/gameConfig/zk/singleplayerQuickSkirmish.lua")), entryCheck = WG.BattleRoomWindow.SetSingleplayerGame, }, @@ -41,7 +41,7 @@ local menuItems = { entryCheck = WG.BattleRoomWindow.SetSingleplayerGame, }, --{ - -- name = "quick_start", + -- name = "quick_start", -- control = Control:New {}, --}, } diff --git a/LuaMenu/configs/planetwars/factionText.lua b/LuaMenu/configs/planetwars/factionText.lua index 9d1186e2b..01b9fb884 100644 --- a/LuaMenu/configs/planetwars/factionText.lua +++ b/LuaMenu/configs/planetwars/factionText.lua @@ -21,6 +21,6 @@ local data = { desc = "Liberal pluralism. Chaotic, disorganized, loose and free.", image = LUA_DIRNAME .. "images/factions/Federation.png", imageLarge = LUA_DIRNAME .. "images/factions/FederationLarge.png", - } + } } return data \ No newline at end of file diff --git a/LuaMenu/configs/springsettings/springsettings.lua b/LuaMenu/configs/springsettings/springsettings.lua index 48a98a7cb..f91ba4f3f 100644 --- a/LuaMenu/configs/springsettings/springsettings.lua +++ b/LuaMenu/configs/springsettings/springsettings.lua @@ -1,5 +1,5 @@ local settings = { - AdvUnitShading = 1, + AdvUnitShading = 1, AdvMapShading = 1, AllowDeferredMapRendering = 1, AllowDeferredModelRendering = 1, diff --git a/LuaMenu/widgets/chili/skins/DarkHiveSquare/skin.lua b/LuaMenu/widgets/chili/skins/DarkHiveSquare/skin.lua index 4589e653a..df4bf99bf 100644 --- a/LuaMenu/widgets/chili/skins/DarkHiveSquare/skin.lua +++ b/LuaMenu/widgets/chili/skins/DarkHiveSquare/skin.lua @@ -6,7 +6,7 @@ local skin = { name = "DarkHiveSquare", version = "0.1", author = "luckywaldo7", - + depend = { "DarkHive", }, diff --git a/LuaMenu/widgets/chili/skins/Evolved/skin.lua b/LuaMenu/widgets/chili/skins/Evolved/skin.lua index b117b585c..c890f0a5f 100644 --- a/LuaMenu/widgets/chili/skins/Evolved/skin.lua +++ b/LuaMenu/widgets/chili/skins/Evolved/skin.lua @@ -91,7 +91,7 @@ skin.button_planet = { tiles = {64, 64, 64, 64}, --// tile widths: left,top,right,bottom padding = {0, 0, 0, 0}, disableTiling = true, - + backgroundColor = {0, 0, 0, 0}, focusColor = {0.94, 0.50, 0.23, 0.4}, borderColor = {1,1,1,0}, @@ -117,7 +117,7 @@ skin.option_button = { TileImageFG = ":cl:tech_button_bright_small_fg.png", tiles = {20, 14, 20, 14}, --// tile widths: left,top,right,bottom padding = {10, 10, 10, 10}, - + backgroundColor = {0.21, 0.53, 0.60, 0.65}, focusColor = {0.21, 0.53, 0.60, 0.9}, borderColor = {0.21, 0.53, 0.60, 0.15}, @@ -130,7 +130,7 @@ skin.negative_button = { TileImageFG = ":cl:tech_button_bright_small_fg.png", tiles = {20, 14, 20, 14}, --// tile widths: left,top,right,bottom padding = {10, 10, 10, 10}, - + backgroundColor = {0.85, 0.05, 0.25, 0.65}, focusColor = {0.85, 0.05, 0.25, 0.9}, borderColor = {0.85, 0.05, 0.25, 0.15}, @@ -143,7 +143,7 @@ skin.positive_button = { TileImageFG = ":cl:tech_button_bright_small_fg.png", tiles = {20, 14, 20, 14}, --// tile widths: left,top,right,bottom padding = {10, 10, 10, 10}, - + backgroundColor = {0.05, 0.85, 0.25, 0.65}, focusColor = {0.05, 0.85, 0.25, 0.9}, borderColor = {0.05, 0.85, 0.25, 0.15}, @@ -197,10 +197,10 @@ skin.checkbox = { skin.editbox = { hintFont = table.merge({color = {1,1,1,0.7}}, skin.general.font), - + backgroundColor = {0.1, 0.1, 0.1, 0}, cursorColor = {1.0, 0.7, 0.1, 0.8}, - + focusColor = {1, 1, 1, 1}, borderColor = {1, 1, 1, 0.6}, @@ -217,7 +217,7 @@ skin.textbox = { TileImageBK = ":cl:panel2_bg.png", bkgndtiles = {14,14,14,14}, - + TileImageFG = ":cl:panel2_border.png", tiles = {2, 2, 2, 2}, diff --git a/LuaMenu/widgets/chili/skins/EvolvedBasic/skin.lua b/LuaMenu/widgets/chili/skins/EvolvedBasic/skin.lua index 58a47ab2d..ed0368751 100644 --- a/LuaMenu/widgets/chili/skins/EvolvedBasic/skin.lua +++ b/LuaMenu/widgets/chili/skins/EvolvedBasic/skin.lua @@ -63,9 +63,9 @@ skin.option_button = { TileImageFG = ":cl:tech_button_action_fg.png", tiles = {22, 22, 22, 22}, --// tile widths: left,top,right,bottom padding = {10, 10, 10, 10}, - + focusColor = {0.21, 0.53, 0.60, 1}, - + backgroundColor = {0.21, 0.53, 0.60, 0.75}, borderColor = {1,1,1,0}, @@ -79,7 +79,7 @@ skin.negative_button = { padding = {10, 10, 10, 10}, focusColor = {0.72, 0.05, 0.12, 1}, - + backgroundColor = {0.72, 0.05, 0.12, 0.5}, borderColor = {1,1,1,0}, @@ -93,7 +93,7 @@ skin.disabled_button = { padding = {10, 10, 10, 10}, focusColor = {0.4, 0.4, 0.4, 0.25}, - + backgroundColor = {0.4, 0.4, 0.4, 0.5}, borderColor = {1,1,1,0}, @@ -146,10 +146,10 @@ skin.checkbox = { skin.editbox = { hintFont = table.merge({color = {1,1,1,0.7}}, skin.general.font), - + backgroundColor = {0.1, 0.1, 0.1, 0}, cursorColor = {1.0, 0.7, 0.1, 0.8}, - + focusColor = {1, 1, 1, 1}, borderColor = {1, 1, 1, 0.6}, diff --git a/LuaMenu/widgets/chili/skins/Glass/skin.lua b/LuaMenu/widgets/chili/skins/Glass/skin.lua index adef0bcf6..d7609854f 100644 --- a/LuaMenu/widgets/chili/skins/Glass/skin.lua +++ b/LuaMenu/widgets/chili/skins/Glass/skin.lua @@ -155,7 +155,7 @@ skin.scrollpanel = { htiles = {3,6,3,6}, HKnobTileImage = ":cl:scrollbar_knob.png", HKnobTiles = {6,7,6,9}, - + KnobColorSelected = {0.35, 0.35, 1.0, 0.9}, padding = {1,1,1,1}, @@ -218,7 +218,7 @@ skin.line = { tilesV = {0, 0, 0, 0}, DrawControl = DrawLine, } - + skin.control = skin.general diff --git a/LuaMenu/widgets/chili/skins/Mat/skin.lua b/LuaMenu/widgets/chili/skins/Mat/skin.lua index 15dda85ce..99da446f0 100644 --- a/LuaMenu/widgets/chili/skins/Mat/skin.lua +++ b/LuaMenu/widgets/chili/skins/Mat/skin.lua @@ -91,7 +91,7 @@ skin.checkbox = { skin.editbox = { hintFont = table.merge({color = {1,1,1,0.7}}, skin.general.font), - + backgroundColor = {0.1, 0.1, 0.1, 0.7}, cursorColor = {1.0, 0.7, 0.1, 0.8}, diff --git a/LuaMenu/widgets/chili/skins/Robocracy/skin.lua b/LuaMenu/widgets/chili/skins/Robocracy/skin.lua index 5af705ae2..8aaf834cb 100644 --- a/LuaMenu/widgets/chili/skins/Robocracy/skin.lua +++ b/LuaMenu/widgets/chili/skins/Robocracy/skin.lua @@ -91,7 +91,7 @@ skin.checkbox = { skin.editbox = { hintFont = table.merge({color = {1,1,1,0.7}}, skin.general.font), - + backgroundColor = {0.1, 0.1, 0.1, 0.7}, cursorColor = {1.0, 0.7, 0.1, 0.8}, diff --git a/LuaMenu/widgets/chili/skins/Twilight/skin.lua b/LuaMenu/widgets/chili/skins/Twilight/skin.lua index 2ad206d38..2479727e2 100644 --- a/LuaMenu/widgets/chili/skins/Twilight/skin.lua +++ b/LuaMenu/widgets/chili/skins/Twilight/skin.lua @@ -20,7 +20,7 @@ skin.general = { borderColor = {0.2,0.8,1,1}, backgroundColor = {0.1, 0.4, 0.6, 0.4}, textColor = {1,1,1,1}, - + TileImageFG = ":cl:glassFG.png", } @@ -36,7 +36,7 @@ skin.progressbar = { TileImageBK = ":cl:tech_progressbar_empty.png", tiles = {10, 10, 10, 10}, backgroundColor = {0, 0.4, 0.4, 0.7}, - + font = { shadow = true, outline = true, diff --git a/LuaMenu/widgets/chobby/utilities/buttons.lua b/LuaMenu/widgets/chobby/utilities/buttons.lua index 7d9c1a614..5542431e2 100644 --- a/LuaMenu/widgets/chobby/utilities/buttons.lua +++ b/LuaMenu/widgets/chobby/utilities/buttons.lua @@ -24,20 +24,20 @@ function ButtonUtilities.SetButtonSelected(button) if button.selected then return end - + local Configuration = WG.Chobby.Configuration if not button.highlighted then button.oldCaption = button.oldCaption or button.caption button.oldBackgroundColor = button.oldBackgroundColor or button.backgroundColor button.oldFont = button.oldFont or button.font end - + button.selected = true button.highlighted = false - + button:SetCaption(Configuration:GetSelectedColor() .. button.oldCaption .. "\b") button.font = Chili.Font:New(GetFont(button.oldFont.size - 2)) - + if COLOR_CLASS[button.classname] then local col = button.backgroundColor button.backgroundColor = {(1 + col[1])*0.5, (1 + col[2])*0.5, (1 + col[3])*0.5, (1 + col[4])*0.5} @@ -58,13 +58,13 @@ function ButtonUtilities.SetButtonHighlighted(button) button.oldBackgroundColor = button.oldBackgroundColor or button.backgroundColor button.oldFont = button.oldFont or button.font end - + button.selected = false button.highlighted = true - + button:SetCaption(Configuration:GetHighlightedColor() .. button.oldCaption .. "\b") button.font = Chili.Font:New(GetFont(button.oldFont.size - 2)) - + --button.backgroundColor = Configuration:GetButtonSelectedColor() button:Invalidate() end @@ -77,10 +77,10 @@ function ButtonUtilities.SetButtonDeselected(button) button.oldCaption = button.oldCaption or button.caption button.oldBackgroundColor = button.oldBackgroundColor or button.backgroundColor button.oldFont = button.oldFont or button.font - + button.selected = false button.selected = false - + button:SetCaption(button.oldCaption) button.font = button.oldFont button.backgroundColor = button.oldBackgroundColor diff --git a/LuaMenu/widgets/gui_campaign_handler.lua b/LuaMenu/widgets/gui_campaign_handler.lua index ff8c4fb19..44745cda4 100644 --- a/LuaMenu/widgets/gui_campaign_handler.lua +++ b/LuaMenu/widgets/gui_campaign_handler.lua @@ -1061,7 +1061,7 @@ local function GetPlanet(popupOverlay, planetListHolder, planetID, planetData, a local aiConfig = planetData.gameConfig.aiConfig local offset = 0 - local map = {}, {} + local map = {} for i = 1, #aiConfig do offset, map = ProcessAiUnlockDebugView(debugHolder, map, aiConfig[i], WG.CampaignData.GetUnitInfo, offset) end diff --git a/LuaMenu/widgets/gui_friend_window.lua b/LuaMenu/widgets/gui_friend_window.lua index 0fd7a5af9..44f6fdf90 100644 --- a/LuaMenu/widgets/gui_friend_window.lua +++ b/LuaMenu/widgets/gui_friend_window.lua @@ -61,9 +61,9 @@ function widget:Initialize() end function widget:Shutdown() - if WG.LibLobby then + -- if WG.LibLobby then - end + -- end end -------------------------------------------------------------------------------- diff --git a/LuaMenu/widgets/gui_springboard_window.lua b/LuaMenu/widgets/gui_springboard_window.lua index dee3dd663..e57bb5e6f 100644 --- a/LuaMenu/widgets/gui_springboard_window.lua +++ b/LuaMenu/widgets/gui_springboard_window.lua @@ -81,17 +81,15 @@ function SpringBoard:SelectMap(mapName) LaunchSpringBoard({ mapName = mapName }) - if true then return end - - local width = 150 - - mapHumanName = mapName:gsub("_", " ") - mapHumanName = StringUtilities.GetTruncatedStringWithDotDot(mapHumanName, tbMapName.font, width - 22) - tbMapName:SetText(mapHumanName) - local length = tbMapName.font:GetTextWidth(mapHumanName) - --imMapLink:SetPos(length + 5) - imMinimap.file, imMinimap.checkFileExists = Configuration:GetMinimapImage(mapName) - imMinimap:Invalidate() + -- local width = 150 + + -- mapHumanName = mapName:gsub("_", " ") + -- mapHumanName = StringUtilities.GetTruncatedStringWithDotDot(mapHumanName, tbMapName.font, width - 22) + -- tbMapName:SetText(mapHumanName) + -- local length = tbMapName.font:GetTextWidth(mapHumanName) + -- --imMapLink:SetPos(length + 5) + -- imMinimap.file, imMinimap.checkFileExists = Configuration:GetMinimapImage(mapName) + -- imMinimap:Invalidate() end -------------------------------------------------------------------------------- diff --git a/LuaMenu/widgets/include/IterableMap.lua b/LuaMenu/widgets/include/IterableMap.lua index 300badedf..d42045a33 100644 --- a/LuaMenu/widgets/include/IterableMap.lua +++ b/LuaMenu/widgets/include/IterableMap.lua @@ -8,7 +8,7 @@ function IterableMap.New() local unusedKey = 1 local keyByIndex = {} local nextCounter = 0 - + local api = {} function api.GetUnusedKey() @@ -17,7 +17,7 @@ function IterableMap.New() end return unusedKey end - + function api.Add(key, data) if not key then return @@ -33,14 +33,14 @@ function IterableMap.New() dataByKey[key] = data indexByKey[key] = indexMax end - + function api.Remove(key) if (not key) or (not indexByKey[key]) then return end local myIndex = indexByKey[key] local endKey = keyByIndex[indexMax] - + keyByIndex[myIndex] = endKey indexByKey[endKey] = myIndex keyByIndex[indexMax] = nil @@ -48,26 +48,26 @@ function IterableMap.New() dataByKey[key] = nil indexMax = indexMax - 1 end - + function api.ReplaceKey(oldKey, newKey) if (not oldKey) or (not indexByKey[oldKey]) or indexByKey[newKey] then return false end - + keyByIndex[indexByKey[oldKey]] = newKey indexByKey[newKey] = indexByKey[oldKey] dataByKey[newKey] = dataByKey[oldKey] - + indexByKey[oldKey] = nil dataByKey[oldKey] = nil return true end - + -- Get is also set in the case of tables because tables pass by reference function api.Get(key) return dataByKey[key] end - + function api.Set(key, data) if not indexByKey[key] then Add(key, data) @@ -75,11 +75,11 @@ function IterableMap.New() dataByKey[key] = data end end - + function api.InMap(key) return (indexByKey[key] and true) or false end - + function api.Clear(key) indexByKey = {} dataByKey = {} @@ -87,7 +87,7 @@ function IterableMap.New() unusedKey = 1 keyByIndex = {} end - + -- Use Next to implement iteration spread over many updates. Returns the next -- element using some internal counter. function api.Next() @@ -100,7 +100,7 @@ function IterableMap.New() end return keyByIndex[nextCounter], dataByKey[keyByIndex[nextCounter]] end - + -- To use Iterator, write "for unitID, data in interableMap.Iterator() do" -- This approach makes the garbage collector cry so try to use other methods -- of iteration. @@ -108,12 +108,12 @@ function IterableMap.New() local i = 0 return function () i = i + 1 - if i <= indexMax then + if i <= indexMax then return keyByIndex[i], dataByKey[keyByIndex[i]] end end end - + -- Does the function to every element of the map. A less barbaric method -- of iteration. Recommended for cleanliness and speed. -- Using the third argument, index, is a little evil because index should @@ -130,7 +130,7 @@ function IterableMap.New() end end end - + function api.ApplyNoArg(funcToApply) local i = 1 while i <= indexMax do @@ -143,8 +143,8 @@ function IterableMap.New() end end end - - + + -- This 'method' of iteration is for barbarians. Seems to have performance -- similar to Apply. function api.GetIndexMax() From 8a2ca046bd9141ce52b224fb75c93878bf79cafe Mon Sep 17 00:00:00 2001 From: Gajo Petrovic Date: Sat, 20 Jul 2019 21:46:44 +0900 Subject: [PATCH 2/3] add travis luacheck --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..0c2a901fe --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: python # Can use any language here, but if it's not 'python' + # it becomes necessary to pass '--user' to pip when installing hererocks. +sudo: false # Use container-based infrastructure. + +env: + - LUA="lua 5.1" + +before_install: + - pip install hererocks + - hererocks env --$LUA -rlatest # Use latest LuaRocks, install into 'env' directory. + - source env/bin/activate # Add directory with all installed binaries to PATH. + - luarocks install luacheck + +#install: +# - luarocks make # Install the rock, assuming there is a rockspec +# # in the root of the repository. + +script: + # '--enable 1' means 'global = true' + # IDEs tend to have issues with 'global = true', as they work on a per-file basis + # this allows us to use the same .luacheckrc for both travis and IDEs + # (Disabled for now) + # - luacheck LuaMenu --enable 1 + - luacheck LuaMenu \ No newline at end of file From 79bc553180bbd6bc9cd5e353b0fcc233fda1cc63 Mon Sep 17 00:00:00 2001 From: Gajo Petrovic Date: Sat, 20 Jul 2019 21:48:40 +0900 Subject: [PATCH 3/3] trigger travis build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0c2a901fe..314d2ec27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ script: # this allows us to use the same .luacheckrc for both travis and IDEs # (Disabled for now) # - luacheck LuaMenu --enable 1 - - luacheck LuaMenu \ No newline at end of file + - luacheck LuaMenu