Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions language/en/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,12 @@
"smartselect_includebuildings_descr": "When rectangle-drag-selecting an area, include building units too?\n\nDisabled: non-mobile units will be excluded (hold Shift to override)\nNote: Construction Turrets will always be selected",
"smartselect_includebuilders": "include builders (if above is off)",
"smartselect_includebuilders_descr": "When rectangle-drag-selecting an area, exclude builder units (hold Shift to override)",
"smartselect_includeantinuke": "include antinuke units (if above is off)",
"smartselect_includeantinuke_descr": "When rectangle-drag-selecting an area, exclude antinuke units (hold Shift to override)",
"smartselect_includeradar": "include radar units (if above is off)",
"smartselect_includeradar_descr": "When rectangle-drag-selecting an area, exclude radar units (hold Shift to override)",
"smartselect_includejammer": "include jammer units (if above is off)",
"smartselect_includejammer_descr": "When rectangle-drag-selecting an area, exclude jammer units (hold Shift to override)",
"onlyfighterspatrol": "Only fighters patrol",
"onlyfighterspatrol_descr": "Only fighters obey a factory's patrol route after leaving airlab.",
"fightersfly": "Set fighters on Fly mode",
Expand Down
28 changes: 27 additions & 1 deletion luaui/Widgets/gui_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4605,7 +4605,27 @@ function init()
saveOptionValue('SmartSelect', 'smartselect', 'setIncludeBuilders', { 'includeBuilders' }, value)
end,
},

{ id = "smartselect_includeantinuke", group = "game", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.smartselect_includeantinuke'), type = "bool", value = false, description = Spring.I18N('ui.settings.option.smartselect_includeantinuke_descr'),
onload = function(i)
end,
onchange = function(i, value)
saveOptionValue('SmartSelect', 'smartselect', 'setIncludeAntinuke', { 'includeAntinuke' }, value)
end,
},
{ id = "smartselect_includeradar", group = "game", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.smartselect_includeradar'), type = "bool", value = false, description = Spring.I18N('ui.settings.option.smartselect_includeradar_descr'),
onload = function(i)
end,
onchange = function(i, value)
saveOptionValue('SmartSelect', 'smartselect', 'setIncludeRadar', { 'includeRadar' }, value)
end,
},
{ id = "smartselect_includejammer", group = "game", category = types.basic, name = widgetOptionColor .. " " .. Spring.I18N('ui.settings.option.smartselect_includejammer'), type = "bool", value = false, description = Spring.I18N('ui.settings.option.smartselect_includejammer_descr'),
onload = function(i)
end,
onchange = function(i, value)
saveOptionValue('SmartSelect', 'smartselect', 'setIncludeJammer', { 'includeJammer' }, value)
end,
},

{ id = "prioconturrets", group = "game", category = types.basic, widget = "Priority Construction Turrets", name = Spring.I18N('ui.settings.option.prioconturrets'), type = "bool", value = GetWidgetToggleValue("Priority Construction Turrets"), description = Spring.I18N('ui.settings.option.prioconturrets_descr') },

Expand Down Expand Up @@ -6425,9 +6445,15 @@ function init()
if WG['smartselect'] == nil then
options[getOptionByID('smartselect_includebuildings')] = nil
options[getOptionByID('smartselect_includebuilders')] = nil
options[getOptionByID('smartselect_includeantinuke')] = nil
options[getOptionByID('smartselect_includeradar')] = nil
options[getOptionByID('smartselect_includejammer')] = nil
else
options[getOptionByID('smartselect_includebuildings')].value = WG['smartselect'].getIncludeBuildings()
options[getOptionByID('smartselect_includebuilders')].value = WG['smartselect'].getIncludeBuilders()
options[getOptionByID('smartselect_includeantinuke')].value = WG['smartselect'].getIncludeAntinuke()
options[getOptionByID('smartselect_includeradar')].value = WG['smartselect'].getIncludeRadar()
options[getOptionByID('smartselect_includejammer')].value = WG['smartselect'].getIncludeJammer()
end

if WG['snow'] ~= nil and WG['snow'].getSnowMap ~= nil then
Expand Down
Loading