Skip to content

Commit

Permalink
Merge pull request #873 from AntlerForce/cloneAI
Browse files Browse the repository at this point in the history
Fix !aiprofile being called in Singleplayer
  • Loading branch information
AntlerForce authored Dec 23, 2024
2 parents e0fca07 + c1d0716 commit 12f6d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LuaMenu/widgets/chobby/components/ai_list_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function AiListWindow:AddAi(displayName, shortName, version, options)
local battleStatusOptions = {side = math.random(0,1), teamColor = PickRandomColor(),}

self.lobby:AddAi(aiName, shortName, self.allyTeam, version, options, battleStatusOptions)
if isSingleplayer ~= true and type(options) == "table" then
if self.lobby.name ~= "singleplayer" and type(options) == "table" then
self.lobby:SayBattle("!aiProfile " .. aiName .. " ".. Spring.Utilities.json.encode(options))
end
Configuration:SetConfigValue("lastAddedAiName", shortName)
Expand Down

0 comments on commit 12f6d5c

Please sign in to comment.