From c1d07169ac091b13fe44c4ca50ff8d25a79dedae Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:35:02 -0700 Subject: [PATCH] Fix !aiprofile being called in Singleplayer --- LuaMenu/widgets/chobby/components/ai_list_window.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaMenu/widgets/chobby/components/ai_list_window.lua b/LuaMenu/widgets/chobby/components/ai_list_window.lua index baa357461..4989de069 100644 --- a/LuaMenu/widgets/chobby/components/ai_list_window.lua +++ b/LuaMenu/widgets/chobby/components/ai_list_window.lua @@ -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)