Skip to content

Commit

Permalink
Send out a LuaMsg to Chobby when creating a new save (#3972)
Browse files Browse the repository at this point in the history
Add a new LuaMenuMsg called "gameSaved" that will trigger an automatic refresh of the Saved Games menu in lobby.
  • Loading branch information
AntlerForce authored Dec 12, 2024
1 parent ab9c6a1 commit ce8a8b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions luaui/Widgets/gui_savegame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ function widget:TextCommand(msg)
Spring.Echo("Trying to save:", msg)
local savefilename = string.sub(msg, 10)
SaveGame(savefilename, savefilename, true)

if Spring.GetMenuName and string.find(string.lower(Spring.GetMenuName()), 'chobby') ~= nil then
Spring.SendLuaMenuMsg("gameSaved")
end
end
end

Expand Down

0 comments on commit ce8a8b5

Please sign in to comment.