Skip to content

Commit

Permalink
Minor autobalance-related improvements (FAForever#3849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Penguin5 authored May 9, 2022
1 parent 47f20c2 commit 36db081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions loc/US/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7422,6 +7422,7 @@ lobui_0611="Lobby Settings"
lobui_0612="Change your lobby background or chat font size."
lobui_0618="Large Preview"
lobui_0619="Click to show a large map preview showing all the mass and hydrocarbon spots"
lobui_0626="Finished autobalancing"
tooltipui0547 = "Energy being generated and spent per second"
tooltipui0104 = "Mass being generated and spent per second"
tooltipui0700 = "Mass Reclaimed"
Expand Down
6 changes: 6 additions & 0 deletions lua/ui/lobby/lobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4182,6 +4182,7 @@ function CreateUI(maxPlayers)
sortedSlotTeams[player][1] = slotB
end
UpdateGame()
AddChatText(LOC("<LOC lobui_0626>Finished autobalancing"))
end
end

Expand Down Expand Up @@ -7059,6 +7060,11 @@ function InitHostUtils()
-- @param moveFrom Slot number to move from
-- @param moveTo Slot number to move to.
SanityCheckSlotMovement = function(moveFrom, moveTo)
if moveTo == moveFrom then
-- no need to move a slot to its current location
return false
end

if gameInfo.ClosedSlots[moveTo] then
LOG("HostUtils.MovePlayerToEmptySlot: requested slot " .. moveTo .. " is closed")
return false
Expand Down

0 comments on commit 36db081

Please sign in to comment.