Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions LuaMenu/configs/gameConfig/zk/ModOptions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $


Expand Down Expand Up @@ -83,7 +82,7 @@ local options = {
{ key='none', name = "Off", desc = 'Turns commsharing off.' },
},
},

{
key = "noelo",
name = "No Elo",
Expand Down Expand Up @@ -555,7 +554,6 @@ local options = {
-- -- }
-- },
-- },

{
key = 'chicken',
name = 'Chicken',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
},
"hoverraid": {
"role": ["raider"],
"attribute": ["melee","scout"],
"attribute": ["melee","scout"],
"pwr_mod": 0.9,
"pwr_mod": 0.8,
"limit": 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,4 @@
}
}
}
}
}
42 changes: 21 additions & 21 deletions LuaMenu/widgets/api_battle_proposal_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ local function CheckCancelProposal(message)
})
end
currentProposal = nil

return true
end

local function GetProposalFromString(message)
if string.sub(message, 1, 1) ~= "!" or string.sub(message, 1, 14) ~= "!proposebattle"then
return false
end

local data = message:split(" ")
local paramValues = {}
for i = 1, #data do
Expand All @@ -69,14 +69,14 @@ local function GetProposalFromString(message)
end
end
end

local proposalValues = {
minelo = paramValues[1] or false,
maxelo = paramValues[2] or false,
minsize = math.max(1, math.floor(paramValues[3] or 4)),
}
proposalValues.maxsize = math.max(proposalValues.minsize, paramValues[4] or 8)

return true, proposalValues
end

Expand All @@ -91,12 +91,12 @@ local function CheckProposalSent(prop)
})
return false
end

currentProposal = prop

currentProposal.currentPlayers = 1
currentProposal.acceptedPlayers = {}

Chotify:Post({
title = "Battle Proposal",
body = "New proposal sent.\nUse !endproposal to cancel.",
Expand All @@ -121,17 +121,17 @@ function BattleProposalHandler.AddClickableInvites(userName, preMessage, message
if myProposal and CheckCancelProposal(message) then
return onTextClick, textTooltip
end

local hasProposal, prop = GetProposalFromString(message)
if not hasProposal then
return onTextClick, textTooltip
end

local myInfo = WG.LibLobby.lobby:GetMyInfo()
local effectiveSkill = math.max(myInfo.skill or 1500, myInfo.casualSkill or 1500)
local skillTooLow = (prop.minelo and effectiveSkill < prop.minelo)
local skillTooHigh = (prop.maxelo and effectiveSkill > prop.maxelo)

if myProposal then
if skillTooLow then
Chotify:Post({
Expand All @@ -146,13 +146,13 @@ function BattleProposalHandler.AddClickableInvites(userName, preMessage, message
})
return onTextClick, textTooltip
end

CheckProposalSent(prop)
end

local startIndex = string.len(preMessage)
local endIndex = startIndex + string.len(message) + 1

if not (skillTooLow or skillTooLow) then
onTextClick[#onTextClick + 1] = {
startIndex = startIndex,
Expand All @@ -171,7 +171,7 @@ function BattleProposalHandler.AddClickableInvites(userName, preMessage, message
}
}
end

local proposalString
if skillTooLow then
proposalString = "Your skill rating is too low for this proposal."
Expand All @@ -191,7 +191,7 @@ function BattleProposalHandler.AddClickableInvites(userName, preMessage, message
end
proposalString = proposalString .. "\nA battle will open when " .. prop.minsize .. " players accept."
end

textTooltip[#textTooltip + 1] = {
startIndex = startIndex,
endIndex = endIndex,
Expand Down Expand Up @@ -223,7 +223,7 @@ function DelayedInitialize()
if (currentProposal.minelo and effectiveSkill < currentProposal.minelo) or (currentProposal.maxelo and effectiveSkill > currentProposal.maxelo) then
return
end

if currentProposal.battleHostComplete then
lobby:BattleProposalBattleInvite(userName, currentProposal.battleID, currentProposal.password)
Chotify:Post({
Expand All @@ -232,14 +232,14 @@ function DelayedInitialize()
})
return
end

currentProposal.currentPlayers = currentProposal.currentPlayers + 1
currentProposal.acceptedPlayers[userName] = true
Chotify:Post({
title = "Battle Proposal",
body = userName .. " accepted.\nPlayers: " .. currentProposal.currentPlayers .. "/" .. currentProposal.minsize,
})

if currentProposal.currentPlayers >= currentProposal.minsize and not currentProposal.openingBattleName then
-- Check for users leaving
for acceptedUserName, _ in pairs(currentProposal.acceptedPlayers) do
Expand All @@ -249,7 +249,7 @@ function DelayedInitialize()
currentProposal.currentPlayers = currentProposal.currentPlayers - 1
end
end

-- Host the battle
if currentProposal.currentPlayers >= currentProposal.minsize then
WG.BattleRoomWindow.LeaveBattle()
Expand All @@ -272,7 +272,7 @@ function DelayedInitialize()
if battleInfo.title ~= currentProposal.openingBattleName then
return
end

for acceptedUserName, _ in pairs(currentProposal.acceptedPlayers) do
lobby:BattleProposalBattleInvite(acceptedUserName, battleID, currentProposal.password)
end
Expand All @@ -294,7 +294,7 @@ function DelayedInitialize()
body = "Joining " .. userName .. "'s battle",
})
end

lobby:AddListener("OnBattleProposalResponse", OnBattleProposalResponse)
lobby:AddListener("OnJoinedBattle", OnJoinedBattle)
lobby:AddListener("OnBattleProposalBattleInvite", OnBattleProposalBattleInvite)
Expand Down
4 changes: 2 additions & 2 deletions LuaMenu/widgets/api_chili.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ function widget:DrawScreen()
gl.PopMatrix()
end
gl.Color(1,1,1,1)

if loadFade then
local vsx,vsy = gl.GetViewSizes()
gl.Color(1,1,1,loadFade)
gl.Texture(loadTex)
gl.TexRect(0,0,vsx,vsy)
gl.Color(1,1,1,1)

if not hideInterface then
loadFade = loadFade - 0.18
if loadFade <= 0 then
Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/api_limit_fps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function widget:AllowDraw()
framesInBuffer = oldFramesInBuffer + 1
return true
end

return false
end

Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/chobby/components/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function Console:AddMessage(message, userName, dateOverride, color, thirdPerson,
end

onTextClick, textTooltip = WG.BattleProposalHandler.AddClickableInvites(userName, txt, message, onTextClick or {}, textTooltip or {})

txt = txt .. message
onTextClick, textTooltip = WG.BrowserHandler.AddClickableUrls(txt, onTextClick or {}, textTooltip or {})

Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/dbg_img_preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local SCALE = 1
local holder

local function MaybeAddFile(fileName)
if (string.find(fileName, "%.dds") or string.find(fileName, "%.png") or string.find(fileName, "%.jpg"))
if (string.find(fileName, "%.dds") or string.find(fileName, "%.png") or string.find(fileName, "%.jpg"))
and not (string.find(fileName, "MinimapThumbnails"))then
files[#files+1] = fileName
end
Expand Down
10 changes: 5 additions & 5 deletions LuaMenu/widgets/gui_campaign_codex_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ local function PopulateCodexTree(parent, codexText, codexImage)
nodes = nodes, --{"wtf", "lololol", {"omg"}},
}
codexText:SetText("")

for i = 1, #nodes do
local catID = nodes[i][1]
if categoryNewEntries[catID] > 0 then
local nodeObj = codexTree:GetNodeByCaption(catID)
nodeObj:SetHighlight(true)
end
end

local externalFunctions = {}

function externalFunctions.OpenEntry(entryName)
local entry = entryName and codexEntries[entryName]
if not (entry and entryButtons[entryName]) then
Expand All @@ -178,7 +178,7 @@ local function PopulateCodexTree(parent, codexText, codexImage)
categoryNode:Expand()
entryButtons[entryName].OnClick[1](entryButtons[entryName])
end

return externalFunctions
end

Expand Down Expand Up @@ -272,7 +272,7 @@ local function InitializeControls(parentControl)
codexFuncs.OpenEntry(entryName)
end
end

return externalFunctions
end

Expand Down
14 changes: 7 additions & 7 deletions LuaMenu/widgets/gui_campaign_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ local function MakeRewardsPanel(parent, bottom, planetData, cullUnlocked, showCo
if showCodex then
if MakeRewardList(parent, bottom, "Codex", {{rewards.codexEntries, WG.CampaignData.GetCodexEntryInfo, WG.CampaignData.GetCodexEntryIsUnlocked, false, CodexClick}}, cullUnlocked, 3.96, 2) then
bottom = bottom + 98

local singleplayerMenu = WG.Chobby.interfaceRoot.GetSingleplayerSubmenu()
if singleplayerMenu then
local campaignMenu = singleplayerMenu.GetSubmenuByName("campaign")
Expand Down Expand Up @@ -666,7 +666,7 @@ local function MakeWinPopup(planetData, bonusObjectiveSuccess, difficulty)
openCommanderWindowOnContinue = true
end
end

function externalFunctions.CloseWinPopup(cancelCommPopup)
if cancelCommPopup and openCommanderWindowOnContinue then
openCommanderWindowOnContinue = false
Expand Down Expand Up @@ -791,7 +791,7 @@ local function SelectPlanet(popupOverlay, planetHandler, planetID, planetData, s
padding = {0, 0, 10, 0},
text = ((startable or Configuration.debugMode) and planetData.infoDisplay.text) or "This planet will need to be approached for further study.",
font = Configuration:GetFont(3),
}
}


local subPanel = Panel:New{
Expand Down Expand Up @@ -823,10 +823,10 @@ local function SelectPlanet(popupOverlay, planetHandler, planetID, planetData, s
if planetData.infoDisplay.feedbackLink then
MakeFeedbackButton(buttonHolder, planetData.infoDisplay.feedbackLink, nil, 0, 85, nil)
end

difficultyWindow = difficultyWindow or InitializeDifficultySetting()
buttonHolder:AddChild(difficultyWindow)

local startButton = Button:New{
right = 0,
bottom = 0,
Expand Down Expand Up @@ -987,7 +987,7 @@ local function SelectPlanet(popupOverlay, planetHandler, planetID, planetData, s

local function SizeUpdate()
local fluffFont = Configuration:GetFont(((planetHandler.height < 720) and 2) or 3)
local descFont = Configuration:GetFont(((planetHandler.height < 720) and 1) or 2)
local descFont = Configuration:GetFont(((planetHandler.height < 720) and 1) or 2)

planetDesc.font.size = descFont.size
planetDesc:Invalidate()
Expand Down Expand Up @@ -1251,7 +1251,7 @@ local function GetPlanet(popupOverlay, planetListHolder, planetID, planetData, a

local externalFunctions = {}
externalFunctions.OpenPlanetScreen = OpenPlanetScreen

function externalFunctions.StartPlanetMission()
if not startable then
return
Expand Down
4 changes: 2 additions & 2 deletions LuaMenu/widgets/gui_queue_list_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ local function InitializeControls(window)

queueHolders[queueName] = MakeQueueControl(listPanel, queues, queueName, queueDescription, queueData.playersIngame or "?", queueData.playersWaiting or "?", maxPartySize, GetBanTime)
queues = queues + 1

local possibleQueues = lobby:GetQueues()
local sortedQueues = {}

Expand All @@ -559,7 +559,7 @@ local function InitializeControls(window)
for name, data in pairs(possibleQueues) do
sortedQueues[#sortedQueues + 1] = data
end

table.sort(sortedQueues, QueueSortFunc)
local added = {}
for i = 1, #sortedQueues do
Expand Down
Loading