Skip to content

Commit

Permalink
Revert "Select... now only works for single units"
Browse files Browse the repository at this point in the history
This reverts commit 1c1898d.
  • Loading branch information
Sheeo committed Dec 13, 2014
1 parent 0efe346 commit 44d76ae
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 142 deletions.
38 changes: 21 additions & 17 deletions lua/ui/game/gamemain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ for key, action in currentKeyMap do
modifiersKeys["Alt-" .. key] = action
else
WARN("Alt-" .. key .. " is already bind")
end
end
end
end
end
end
IN_AddKeyMapTable(modifiersKeys)


Expand Down Expand Up @@ -121,7 +121,7 @@ function OnFirstUpdate()
import('/lua/ui/game/score.lua').CreateScoreUI()
end
PlaySound( Sound { Bank='AmbientTest', Cue='AMB_Planet_Rumble_zoom'} )
ForkThread(
ForkThread(
function()
WaitSeconds(1.5)
UIZoomTo(avatars, 1)
Expand Down Expand Up @@ -391,7 +391,7 @@ function CreateWldUIProvider()
end

provider.GetPrefetchTextures = function(self)
return import('/lua/ui/game/prefetchtextures.lua').prefetchTextures
return import('/lua/ui/game/prefetchtextures.lua').prefetchTextures
end

end
Expand Down Expand Up @@ -424,10 +424,14 @@ function OnSelectionChanged(oldSelection, newSelection, added, removed)
import('/lua/ui/game/rallypoint.lua').OnSelectionChanged(newSelection)
end

local selUnits = newSelection

if selUnits and table.getn(selUnits) == 1 and import('/modules/selectedinfo.lua').SelectedOverlayOn then
import('/modules/selectedinfo.lua').ActivateSingleRangeOverlay()
else
import('/modules/selectedinfo.lua').DeactivateSingleRangeOverlay()
end

if import('/modules/selectedinfo.lua').SelectedOverlayOn then
import('/modules/selectedinfo.lua').EnableSingleRangeOverlay(newSelection and table.getsize(newSelection) == 1)
end
end

function OnQueueChanged(newQueue)
Expand Down Expand Up @@ -724,10 +728,10 @@ function ReceiveChat(sender, data)
end

function QuickSave(filename)
if SessionIsActive() and
WorldIsPlaying() and
not SessionIsGameOver() and
not SessionIsMultiplayer() and
if SessionIsActive() and
WorldIsPlaying() and
not SessionIsGameOver() and
not SessionIsMultiplayer() and
not SessionIsReplay() and
not IsNISMode() then

Expand All @@ -752,10 +756,10 @@ end

defaultZoom = 1.4
function SimChangeCameraZoom(newMult)
if SessionIsActive() and
WorldIsPlaying() and
not SessionIsGameOver() and
not SessionIsMultiplayer() and
if SessionIsActive() and
WorldIsPlaying() and
not SessionIsGameOver() and
not SessionIsMultiplayer() and
not SessionIsReplay() and
not IsNISMode() then

Expand All @@ -777,8 +781,8 @@ function UiBeat()
lastObserving = observing
import('/lua/ui/game/economy.lua').ToggleEconPanel(not observing)
end
if HasCommandLineArg("/syncreplay") and HasCommandLineArg("/gpgnet") then
GpgNetSend("BEAT",GameTick(),GetGameSpeed())
if HasCommandLineArg("/syncreplay") and HasCommandLineArg("/gpgnet") then
GpgNetSend("BEAT",GameTick(),GetGameSpeed())
end
end

Expand Down
Loading

0 comments on commit 44d76ae

Please sign in to comment.