@@ -30,10 +30,8 @@ local mods = {
30
30
idle = false , -- whether to select only idle units
31
31
same = false , -- whether to select only units that share type with current selection
32
32
deselect = false , -- whether to select units not present in current selection
33
- all = false , -- whether to select without filters and append (backwards compatibility, it's like append+any)
33
+ all = false , -- whether to select all units
34
34
mobile = false , -- whether to select only mobile units
35
- append = false , -- whether to append units to current selection
36
- any = false , -- whether to select without filters
37
35
}
38
36
local customFilterDef = " "
39
37
local lastMods = mods
@@ -262,19 +260,12 @@ function widget:Update(dt)
262
260
and mods .deselect == lastMods [3 ]
263
261
and mods .all == lastMods [4 ]
264
262
and mods .mobile == lastMods [5 ]
265
- and mods .append == lastMods [6 ]
266
- and mods .any == lastMods [7 ]
267
263
and customFilterDef == lastCustomFilterDef
268
264
then
269
265
return
270
266
end
271
267
272
- lastMods = { mods .idle , mods .same , mods .deselect , mods .all , mods .mobile , mods .append , mods .any }
273
- if mods .all then
274
- -- backwards compatibility
275
- mods .any = true
276
- mods .append = true
277
- end
268
+ lastMods = { mods .idle , mods .same , mods .deselect , mods .all , mods .mobile }
278
269
lastCustomFilterDef = customFilterDef
279
270
280
271
-- Fill dictionary for set comparison
@@ -349,7 +340,7 @@ function widget:Update(dt)
349
340
end
350
341
mouseSelection = tmp
351
342
352
- elseif selectBuildingsWithMobile == false and mods .any == false and mods .deselect == false then
343
+ elseif selectBuildingsWithMobile == false and mods .all == false and mods .deselect == false then
353
344
-- only select mobile units, not buildings
354
345
local mobiles = false
355
346
for i = 1 , # mouseSelection do
@@ -403,7 +394,7 @@ function widget:Update(dt)
403
394
selectedUnits = newSelection
404
395
spSelectUnitArray (selectedUnits )
405
396
406
- elseif mods .append then -- append units inside selection rectangle to current selection
397
+ elseif mods .all then -- append units inside selection rectangle to current selection
407
398
spSelectUnitArray (newSelection )
408
399
spSelectUnitArray (mouseSelection , true )
409
400
selectedUnits = Spring .GetSelectedUnits ()
0 commit comments