Skip to content

Commit

Permalink
Allow games to ignore server version based on config: close #435
Browse files Browse the repository at this point in the history
  • Loading branch information
gajop committed Dec 6, 2017
1 parent e218722 commit 06eb16f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions LuaMenu/configs/gameConfig/evorts/mainConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ local externalFuncAndData = {
background = background,
minimapOverridePath = minimapOverridePath,
minimapThumbnailPath = minimapThumbnailPath,
ignoreServerVersion = true,
}

function externalFuncAndData.CheckAvailability()
Expand Down
1 change: 1 addition & 0 deletions LuaMenu/configs/gameConfig/zk/mainConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ local externalFuncAndData = {
link_replays = link_replays,
link_maps = link_maps,
link_particularMapPage = link_particularMapPage,
ignoreServerVersion = false,
}

function externalFuncAndData.CheckAvailability()
Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/chobby/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Chobby:_Initialize()
WG.Delay(function()
lobby:AddListener("OnSuggestedEngineVersion",
function(listener, engineName)
if engineName and not WG.Chobby.Configuration:IsValidEngineVersion(engineName) then
if engineName and not WG.Chobby.Configuration.gameConfig.ignoreServerVersion and not WG.Chobby.Configuration:IsValidEngineVersion(engineName) then
WG.Chobby.InformationPopup("Wrong Spring engine version. The required version is '" .. engineName .. "', your version is '" .. Spring.Utilities.GetEngineVersion() .. "'.\n\nRestart the game to get the correct version.", 480, 248)
end
end
Expand Down

0 comments on commit 06eb16f

Please sign in to comment.