diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..2d6eeda --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 npc_strider + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Shortcuts/changelog.txt b/Shortcuts/changelog.txt index df0bf05..5637ad1 100644 --- a/Shortcuts/changelog.txt +++ b/Shortcuts/changelog.txt @@ -1,3 +1,16 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.7.0 +Date: 2019-04-14 + Features: + - Add mod support for AAI vehicles + - Ability to selectively disable/enable individaul settings from mod settings startup panel + - Dynamically generate shortcuts for any selection-tool + - Make use of "only-in-cursor" flag and remove relevant scripts (Should offer an insignificant performance boost when opening inventory) + - Added LICENSE.txt + Bugfixes: + - Add hidden flag (not property!) to automatically generated 'disabled' items (artillery and equipment) + - Fixed startup crash with technologies containing modded recipe effects + --------------------------------------------------------------------------------------------------- Version: 0.6.0 Date: 2019-03-29 diff --git a/Shortcuts/control.lua b/Shortcuts/control.lua index 98059a6..6099620 100644 --- a/Shortcuts/control.lua +++ b/Shortcuts/control.lua @@ -80,39 +80,53 @@ local function toggle_rail(player) end end -local function update_inventory(event) -- removes spare remotes - local item_prototypes = game.item_prototypes - local inventory = game.players[event.player_index].get_inventory(defines.inventory.player_main) - if inventory and inventory.valid then - inventory.remove("artillery-targeting-remote") - inventory.remove("artillery-jammer-tool") - inventory.remove("discharge-defense-remote") - inventory.remove("shortcuts-deconstruction-planner") - if item_prototypes["resource-monitor"] then - inventory.remove("resource-monitor") - end - if item_prototypes["outpost-builder"] then - inventory.remove("outpost-builder") - end - if item_prototypes["ion-cannon-targeter"] then - inventory.remove("ion-cannon-targeter") - end - if item_prototypes["max-rate-calculator"] then - inventory.remove("max-rate-calculator") - end - if item_prototypes["module-inserter"] then - inventory.remove("module-inserter") - end - end -end +-- local function update_inventory(event) -- removes spare remotes + -- local item_prototypes = game.item_prototypes + -- local inventory = game.players[event.player_index].get_inventory(defines.inventory.player_main) + -- if inventory and inventory.valid then + -- if settings.startup["artillery-targeting-remote"].value == true then + -- inventory.remove("artillery-targeting-remote") + -- end + -- if settings.startup["artillery-jammer-remote"].value == true then + -- inventory.remove("artillery-jammer-tool") + -- end + -- if settings.startup["discharge-defense-remote"].value == true then + -- inventory.remove("discharge-defense-remote") + -- end + -- if settings.startup["tree-killer"].value == true then + -- inventory.remove("shortcuts-deconstruction-planner") + -- end + -- if item_prototypes["resource-monitor"] and settings.startup["resource-monitor"].value == true then + -- inventory.remove("resource-monitor") + -- end + -- if item_prototypes["outpost-builder"] and settings.startup["outpost-builder"].value == true then + -- inventory.remove("outpost-builder") + -- end + -- if item_prototypes["ion-cannon-targeter"] and settings.startup["ion-cannon-targeter"].value == true then + -- inventory.remove("ion-cannon-targeter") + -- end + -- if item_prototypes["max-rate-calculator"] and settings.startup["max-rate-calculator"].value == true then + -- inventory.remove("max-rate-calculator") + -- end + -- if item_prototypes["module-inserter"] and settings.startup["module-inserter"].value == true then + -- inventory.remove("module-inserter") + -- end + -- end +-- end local function false_shortcuts(player) -- disables things - player.set_shortcut_available("night-vision-equipment", false) - player.set_shortcut_toggled("night-vision-equipment", false) - player.set_shortcut_available("belt-immunity-equipment", false) - player.set_shortcut_toggled("belt-immunity-equipment", false) - player.set_shortcut_available("active-defense-equipment", false) - player.set_shortcut_toggled("active-defense-equipment", false) + if settings.startup["night-vision-equipment"].value == true then + player.set_shortcut_available("night-vision-equipment", false) + player.set_shortcut_toggled("night-vision-equipment", false) + end + if settings.startup["active-defense-equipment"].value == true then + player.set_shortcut_available("active-defense-equipment", false) + player.set_shortcut_toggled("active-defense-equipment", false) + end + if settings.startup["belt-immunity-equipment"].value == true then + player.set_shortcut_available("belt-immunity-equipment", false) + player.set_shortcut_toggled("belt-immunity-equipment", false) + end end local function enable_it(player, equipment, grid, type) -- enables things @@ -387,7 +401,7 @@ local function shortcut_type(event) end elseif prototype_name == "flashlight-toggle" then toggle_light(game.players[event.player_index]) - elseif prototype_name == "rail-block-visualization-toggle" then + elseif prototype_name == "rail-block-visualization-toggle" then toggle_rail(game.players[event.player_index]) elseif prototype_name == "signal-flare" then local player = game.players[event.player_index] @@ -401,16 +415,26 @@ end script.on_event(defines.events.on_lua_shortcut, shortcut_type) -script.on_event(defines.events.on_player_main_inventory_changed, update_inventory) +-- script.on_event(defines.events.on_player_main_inventory_changed, update_inventory) script.on_event(defines.events.on_player_created, function(event) local player = game.players[event.player_index] - player.set_shortcut_toggled("flashlight-toggle", true) - player.set_shortcut_toggled("rail-block-visualization-toggle", false) + if settings.startup["flashlight-toggle"].value == true then + player.set_shortcut_toggled("flashlight-toggle", true) + end + if settings.startup["rail-block-visualization-toggle"].value == true then + player.set_shortcut_toggled("rail-block-visualization-toggle", false) + end if not game.active_mods["Nanobots"] then - player.set_shortcut_available("night-vision-equipment", false) - player.set_shortcut_available("belt-immunity-equipment", false) - player.set_shortcut_available("active-defense-equipment", false) + if settings.startup["night-vision-equipment"].value == true then + player.set_shortcut_available("night-vision-equipment", false) + end + if settings.startup["active-defense-equipment"].value == true then + player.set_shortcut_available("active-defense-equipment", false) + end + if settings.startup["belt-immunity-equipment"].value == true then + player.set_shortcut_available("belt-immunity-equipment", false) + end else player.print("WARNING: Shortcuts for modular equipment disabled as Nanobots is installed") player.print("> Use the Nanobots hotkeys instead: \"Ctrl F1 - F7 Will toggle specific modular armor equipment on or off\"") diff --git a/Shortcuts/data-updates.lua b/Shortcuts/data-updates.lua index 1a0be8f..80f0a78 100644 --- a/Shortcuts/data-updates.lua +++ b/Shortcuts/data-updates.lua @@ -1,88 +1,122 @@ require("shortcuts") -local function hide_the_remote(recipe, technology) - data.raw["recipe"][recipe].hidden = true - data.raw["recipe"][recipe].ingredients ={{"iron-plate", 1}} - if technology ~= nil then - local effect = data.raw["technology"][technology].effects - for i=1,(#effect) do - if effect[i].type == "unlock-recipe" then - if effect[i].recipe == recipe then - table.remove(effect, i) +local function hide_the_remote(recipe, technology, item) + if item then + if item.flags then + item.flags[#item.flags+1] = "only-in-cursor" + else + item.flags = {"only-in-cursor"} + end + end + local recipe_prototype = data.raw["recipe"][recipe] + local tech_prototype = data.raw["technology"][technology] + if recipe_prototype then + recipe_prototype.hidden = true + recipe_prototype.ingredients ={{"iron-plate", 1}} + if technology ~= nil and tech_prototype then + local effect = tech_prototype.effects + for i=1,(#effect) do + if effect[i].type == "unlock-recipe" then + if effect[i].recipe == recipe then + table.remove(effect, i) + return + end end end end end end -hide_the_remote("artillery-targeting-remote", "artillery") -hide_the_remote("discharge-defense-remote", "discharge-defense-equipment") -if mods["YARM"] and data.raw["item"]["resource-monitor"] and data.raw["technology"]["resource-monitoring"] then - hide_the_remote("resource-monitor", "resource-monitoring") +if settings.startup["artillery-targeting-remote"].value == true then + hide_the_remote("artillery-targeting-remote", "artillery", data.raw["capsule"]["artillery-targeting-remote"]) end -if mods["OutpostPlanner"] and mods["PlannerCore"] and data.raw["selection-tool"]["outpost-builder"] then - hide_the_remote("outpost-builder", nil) +if settings.startup["discharge-defense-remote"].value == true then + hide_the_remote("discharge-defense-remote", "discharge-defense-equipment", data.raw["capsule"]["discharge-defense-remote"]) end -if mods["Orbital Ion Cannon"] and data.raw["item"]["ion-cannon-targeter"] and data.raw["technology"]["orbital-ion-cannon"] then - hide_the_remote("ion-cannon-targeter", "orbital-ion-cannon") +if mods["YARM"] and data.raw["item"]["resource-monitor"] and data.raw["technology"]["resource-monitoring"] and settings.startup["resource-monitor"].value == true then + hide_the_remote("resource-monitor", "resource-monitoring", data.raw["item"]["resource-monitor"]) +end +if mods["OutpostPlanner"] and mods["PlannerCore"] and data.raw["selection-tool"]["outpost-builder"] and settings.startup["outpost-builder"].value == true then + hide_the_remote("outpost-builder", nil, data.raw["selection-tool"]["outpost-builder"]) +end +if mods["Orbital Ion Cannon"] and data.raw["item"]["ion-cannon-targeter"] and data.raw["technology"]["orbital-ion-cannon"] and settings.startup["ion-cannon-targeter"].value == true then + hide_the_remote("ion-cannon-targeter", "orbital-ion-cannon", data.raw["item"]["ion-cannon-targeter"]) +end +if mods["ModuleInserter"] and data.raw["selection-tool"]["module-inserter"] and settings.startup["module-inserter"].value == true then + hide_the_remote("module-inserter", "construction-robotics", data.raw["selection-tool"]["module-inserter"]) +end +if mods["aai-programmable-vehicles"] then + if settings.startup["unit-remote-control"].value == true and data.raw["selection-tool"]["unit-remote-control"] then + hide_the_remote("unit-remote-control", nil, data.raw["selection-tool"]["unit-remote-control"]) + end + if settings.startup["path-remote-control"].value == true and data.raw["selection-tool"]["path-remote-control"] then + hide_the_remote("path-remote-control", nil, data.raw["selection-tool"]["path-remote-control"]) + end end local disabled_equipment = {} local disabled_equipment_item = {} -local equipment_list = { - "night-vision-equipment", - "belt-immunity-equipment", - "active-defense-equipment", -} -if mods["Nanobots"] then - equipment_list = {} +local equipment_list = {} + +if settings.startup["night-vision-equipment"].value == true then + equipment_list[#equipment_list+1] = "night-vision-equipment" +end +if settings.startup["belt-immunity-equipment"].value == true then + equipment_list[#equipment_list+1] = "belt-immunity-equipment" +end +if settings.startup["active-defense-equipment"].value == true then + equipment_list[#equipment_list+1] = "active-defense-equipment" end -for i=1,(#equipment_list) do - for _, equipment in pairs(data.raw[equipment_list[i]]) do - local i = #disabled_equipment+1 - disabled_equipment[i] = util.table.deepcopy(equipment) - local name = disabled_equipment[i].name - if (equipment.type == "active-defense-equipment" and equipment.automatic == true) or equipment.type ~= "active-defense-equipment" then - disabled_equipment[i].name = "disabled-" .. name - disabled_equipment[i].localised_name = {"", {"equipment-name." .. name}, " (", {"gui-constant.off"}, ")"} - elseif (equipment.type == "active-defense-equipment" and equipment.automatic == false) then - disabled_equipment[i].name = "disabledinactive-" .. name - disabled_equipment[i].localised_name = {"equipment-name." .. name} - end - disabled_equipment[i].energy_input = "0kW" - disabled_equipment[i].take_result = name - if equipment_list[i] == "belt-immunity-equipment" or (equipment.type == "active-defense-equipment" and equipment.automatic == true) then - disabled_equipment[i].energy_source.input_flow_limit = "0kW" - disabled_equipment[i].energy_source.buffer_capacity = "0kJ" - disabled_equipment[i].energy_source.drain = "1kW" - end - - if not data.raw["item"][equipment_list[i]] then --for mods which have a different item name compared to equipment name - disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"]["night-vision-equipment"]) +if not mods["Nanobots"] then + + for i=1,(#equipment_list) do + for _, equipment in pairs(data.raw[equipment_list[i]]) do + local i = #disabled_equipment+1 + disabled_equipment[i] = util.table.deepcopy(equipment) + local name = disabled_equipment[i].name + if (equipment.type == "active-defense-equipment" and equipment.automatic == true) or equipment.type ~= "active-defense-equipment" then + disabled_equipment[i].name = "disabled-" .. name + disabled_equipment[i].localised_name = {"", {"equipment-name." .. name}, " (", {"gui-constant.off"}, ")"} + elseif (equipment.type == "active-defense-equipment" and equipment.automatic == false) then + disabled_equipment[i].name = "disabledinactive-" .. name + disabled_equipment[i].localised_name = {"equipment-name." .. name} + end + disabled_equipment[i].energy_input = "0kW" + disabled_equipment[i].take_result = name + if equipment_list[i] == "belt-immunity-equipment" or (equipment.type == "active-defense-equipment" and equipment.automatic == true) then + disabled_equipment[i].energy_source.input_flow_limit = "0kW" + disabled_equipment[i].energy_source.buffer_capacity = "0kJ" + disabled_equipment[i].energy_source.drain = "1kW" + end + + if not data.raw["item"][equipment_list[i]] then --for mods which have a different item name compared to equipment name + disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"]["night-vision-equipment"]) + disabled_equipment_item[i].name = "disabled-" .. name + disabled_equipment_item[i].flags = {"hidden"} + disabled_equipment_item[i].placed_as_equipment_result = name + end + + disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"][equipment_list[i]]) -- LEGACY ITEM (Disable for release) + if not disabled_equipment_item[i] then + disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"]["night-vision-equipment"]) + end + disabled_equipment_item[i].name = "disabled-" .. name - disabled_equipment_item[i].hidden = true + disabled_equipment_item[i].flags = {"hidden"} + -- disabled_equipment_item[i].localised_name = {"", {"equipment-name." .. name}, " (", {"gui-constant.off"}, ")"} + disabled_equipment_item[i].localised_description = {"item-description." .. name} disabled_equipment_item[i].placed_as_equipment_result = name end - - disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"][equipment_list[i]]) -- LEGACY ITEM (Disable for release) - if not disabled_equipment_item[i] then - disabled_equipment_item[i] = util.table.deepcopy(data.raw["item"]["night-vision-equipment"]) + end + + for i=1,(#disabled_equipment),1 do + data:extend({disabled_equipment[i]}) + if disabled_equipment_item[i] then + data:extend({disabled_equipment_item[i]}) end - - disabled_equipment_item[i].name = "disabled-" .. name - disabled_equipment_item[i].hidden = true - -- disabled_equipment_item[i].localised_name = {"", {"equipment-name." .. name}, " (", {"gui-constant.off"}, ")"} - disabled_equipment_item[i].localised_description = {"item-description." .. name} - disabled_equipment_item[i].placed_as_equipment_result = name end -end -for i=1,(#disabled_equipment),1 do - data:extend({disabled_equipment[i]}) - if disabled_equipment_item[i] then - data:extend({disabled_equipment_item[i]}) - end end data:extend({ @@ -94,7 +128,6 @@ data:extend({ icon_size = 64, subgroup = "virtual-signal-color", order = "d[colors]-[9danger]", - hidden = true, }, { type = "virtual-signal", @@ -104,7 +137,6 @@ data:extend({ icon_size = 64, subgroup = "virtual-signal-color", order = "d[colors]-[9disabled]", - hidden = true, } }) @@ -113,51 +145,131 @@ local disabled_turret_item = {} local disabled_gun = {} local disable_turret_list = {} -if settings.startup["artillery-toggle"].value == "both" then - disable_turret_list = {"artillery-wagon", "artillery-turret",} -elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then - disable_turret_list = {"artillery-wagon"} -elseif settings.startup["artillery-toggle"].value == "artillery-turret" then - disable_turret_list = {"artillery-turret"} -end - -for i=1,(#disable_turret_list) do - for _, entity in pairs(data.raw[disable_turret_list[i]]) do - local i = #disabled_turret+1 - disabled_turret[i] = util.table.deepcopy(entity) - local name = disabled_turret[i].name - local gun = disabled_turret[i].gun - disabled_turret_item[i] = util.table.deepcopy(data.raw["item-with-entity-data"][name]) - if disabled_turret_item[i] == nil then - disabled_turret_item[i] = util.table.deepcopy(data.raw["item"][name]) +if settings.startup["artillery-jammer-remote"].value == true then + if settings.startup["artillery-toggle"].value == "both" then + disable_turret_list = {"artillery-wagon", "artillery-turret",} + elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then + disable_turret_list = {"artillery-wagon"} + elseif settings.startup["artillery-toggle"].value == "artillery-turret" then + disable_turret_list = {"artillery-turret"} + end + + for i=1,(#disable_turret_list) do + for _, entity in pairs(data.raw[disable_turret_list[i]]) do + local i = #disabled_turret+1 + disabled_turret[i] = util.table.deepcopy(entity) + local name = disabled_turret[i].name + local gun = disabled_turret[i].gun + disabled_turret_item[i] = util.table.deepcopy(data.raw["item-with-entity-data"][name]) + if disabled_turret_item[i] == nil then + disabled_turret_item[i] = util.table.deepcopy(data.raw["item"][name]) + end + if disabled_turret_item[i] == nil then + disabled_turret_item[i] = util.table.deepcopy(data.raw["item-with-entity-data"]["artillery-wagon"]) + end + disabled_turret_item[i].name = "disabled-" .. name + disabled_turret_item[i].place_result = "disabled-" .. name + disabled_turret_item[i].flags = {"hidden"} + disabled_turret[i].name = "disabled-" .. name + disabled_turret[i].flags = {"hidden"} + disabled_turret[i].localised_name = {"", {"entity-name." .. entity.name}, " (", {"gui-constant.off"}, ")"} + disabled_gun[i] = util.table.deepcopy(data.raw["gun"][gun]) + disabled_gun[i].name = "disabled-" .. gun + disabled_gun[i].flags = {"hidden"} + disabled_gun[i].tint = { r = 1.0, g = 0.0, b = 0.0, a = 1.0 } + disabled_gun[i].attack_parameters.range = 0 + disabled_gun[i].attack_parameters.min_range = 0 + disabled_turret[i].gun = disabled_gun[i].name end - if disabled_turret_item[i] == nil then - disabled_turret_item[i] = util.table.deepcopy(data.raw["item-with-entity-data"]["artillery-wagon"]) + end + + for i=1,(#disabled_turret),1 do + data:extend({disabled_turret[i]}) + if disabled_gun[i] then + data:extend({disabled_gun[i]}) + end + if disabled_turret_item[i] then + data:extend({disabled_turret_item[i]}) end - disabled_turret_item[i].name = "disabled-" .. name - disabled_turret_item[i].place_result = "disabled-" .. name - disabled_turret[i].name = "disabled-" .. name - disabled_turret[i].localised_name = {"", {"entity-name." .. entity.name}, " (", {"gui-constant.off"}, ")"} - disabled_gun[i] = util.table.deepcopy(data.raw["gun"][gun]) - disabled_gun[i].name = "disabled-" .. gun - disabled_gun[i].tint = { r = 1.0, g = 0.0, b = 0.0, a = 1.0 } - disabled_gun[i].attack_parameters.range = 0 - disabled_gun[i].attack_parameters.min_range = 0 - disabled_turret[i].gun = disabled_gun[i].name end + end -for i=1,(#disabled_turret),1 do - data:extend({disabled_turret[i]}) - if disabled_gun[i] then - data:extend({disabled_gun[i]}) - end - if disabled_turret_item[i] then - data:extend({disabled_turret_item[i]}) - end +if settings.startup["tree-killer"].value == true then + local decon_spec = util.table.deepcopy(data.raw["deconstruction-item"]["deconstruction-planner"]) + decon_spec.name = "shortcuts-deconstruction-planner" + decon_spec.localised_name = {"item-name.deconstruction-planner"} + decon_spec.flags = {"only-in-cursor"} + data:extend({decon_spec}) end -local decon_spec = util.table.deepcopy(data.raw["deconstruction-item"]["deconstruction-planner"]) -decon_spec.name = "shortcuts-deconstruction-planner" -decon_spec.localised_name = {"item-name.deconstruction-planner"} -data:extend({decon_spec}) \ No newline at end of file +if settings.startup["autogen"].value == true then + + -- create a post on the discussion page if you want your shortcut to be added to this blacklist. + local shortcut_blacklist = { + "selection-tool", + "max-rate-calculator", + "module-inserter", + "path-remote-control", + "unit-remote-control", + } + + for _, tool in pairs(data.raw["selection-tool"]) do + local name = tool.name + local continue = true + for j, blacklist in pairs(shortcut_blacklist) do + if name == blacklist then + continue = false + break + end + end + if continue == true then + local create = true + for i, shortcut in pairs(data.raw["shortcut"]) do + if shortcut.action == "create-blueprint-item" and shortcut.item_to_create == name then + create = false + break + end + end + if create == true then + local shortcut = { + type = "shortcut", + name = name, + order = tool.order, + action = "create-blueprint-item", + localised_name = {"item-name." .. name}, + item_to_create = name, + style = "default", + icon = + { + filename = tool.icon, + priority = "extra-high-no-scale", + size = tool.icon_size, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = tool.icon, + priority = "extra-high-no-scale", + size = tool.icon_size, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = tool.icon, + priority = "extra-high-no-scale", + size = tool.icon_size, + scale = 1, + flags = {"icon"} + }, + } + + data:extend({shortcut}) + hide_the_remote(name, name, tool) -- only attempts to hide the selection-tool if the recipe/tech name matches the tool name - does not search all recipes for mention of the tool. + end + end + end + +end \ No newline at end of file diff --git a/Shortcuts/graphics/path-remote-control-x24-white.png b/Shortcuts/graphics/path-remote-control-x24-white.png new file mode 100644 index 0000000..391b76f Binary files /dev/null and b/Shortcuts/graphics/path-remote-control-x24-white.png differ diff --git a/Shortcuts/graphics/path-remote-control-x24.png b/Shortcuts/graphics/path-remote-control-x24.png new file mode 100644 index 0000000..78bf75c Binary files /dev/null and b/Shortcuts/graphics/path-remote-control-x24.png differ diff --git a/Shortcuts/graphics/path-remote-control-x32-white.png b/Shortcuts/graphics/path-remote-control-x32-white.png new file mode 100644 index 0000000..439698a Binary files /dev/null and b/Shortcuts/graphics/path-remote-control-x32-white.png differ diff --git a/Shortcuts/graphics/path-remote-control-x32.png b/Shortcuts/graphics/path-remote-control-x32.png new file mode 100644 index 0000000..51eb423 Binary files /dev/null and b/Shortcuts/graphics/path-remote-control-x32.png differ diff --git a/Shortcuts/graphics/unit-remote-control-x24-white.png b/Shortcuts/graphics/unit-remote-control-x24-white.png new file mode 100644 index 0000000..84111ea Binary files /dev/null and b/Shortcuts/graphics/unit-remote-control-x24-white.png differ diff --git a/Shortcuts/graphics/unit-remote-control-x24.png b/Shortcuts/graphics/unit-remote-control-x24.png new file mode 100644 index 0000000..52a5cbc Binary files /dev/null and b/Shortcuts/graphics/unit-remote-control-x24.png differ diff --git a/Shortcuts/graphics/unit-remote-control-x32-white.png b/Shortcuts/graphics/unit-remote-control-x32-white.png new file mode 100644 index 0000000..a8b00d8 Binary files /dev/null and b/Shortcuts/graphics/unit-remote-control-x32-white.png differ diff --git a/Shortcuts/graphics/unit-remote-control-x32.png b/Shortcuts/graphics/unit-remote-control-x32.png new file mode 100644 index 0000000..19d3187 Binary files /dev/null and b/Shortcuts/graphics/unit-remote-control-x32.png differ diff --git a/Shortcuts/info.json b/Shortcuts/info.json index af7eaaa..ea98b30 100644 --- a/Shortcuts/info.json +++ b/Shortcuts/info.json @@ -1,10 +1,10 @@ { "name": "Shortcuts", - "version": "0.6.0", + "version": "0.7.0", "factorio_version": "0.17", "title": "Shortcuts", "author": "npc_strider(morley376)", "contact": "", "homepage": "http://steamcommunity.com/id/morley376", - "description": "Adds a host of useful shortcuts to improve QOL. Shortcuts for the artillery remote, discharge defense remote, tree deconstructor, and toggles for equipment, rail blocks and the player lamp. Additionally adds in a customizable grid overlay, far zoom and a artillery wagon toggle. Mod support for module inserter, orbital ion cannon, outpost planner and max rate calculator. Suggest any new shortcut ideas to the discussion page." + "description": "Adds a host of useful shortcuts to improve QOL. Shortcuts for the artillery remote, discharge defense remote, tree deconstructor, and toggles for equipment, rail blocks and the player lamp. Additionally adds in a customizable grid overlay, far zoom and a artillery wagon toggle. See mod portal FAQ page for a full list of shortcuts and supported mods. Suggest any new shortcut ideas to the discussion page." } \ No newline at end of file diff --git a/Shortcuts/settings.lua b/Shortcuts/settings.lua index 776f478..e73d24c 100644 --- a/Shortcuts/settings.lua +++ b/Shortcuts/settings.lua @@ -79,6 +79,194 @@ data:extend({ localised_name = {"", {"item-name.artillery-wagon-cannon"}, " ", {"gui-mod-info.toggle"}, " ", {"description.decorative-type"}}, setting_type = "startup", allowed_values = {"both", "artillery-wagon", "artillery-turret"}, - default_value = "both" - } + default_value = "both", + order = "a" + }, + { + type = "bool-setting", + name = "autogen", + localised_name = {"", "Auto-", {"gui-new-game.create"}, " ", {"gui-update.mod"}, " shortcuts"}, + localised_description = {"", {""}, "Automatically generate shortcuts for mods which are not officially supported by this mod through a script."}, + setting_type = "startup", + default_value = true, + order = "a" + }, + + + { -- for each shortcut (to free up space for other modded shortcuts) + type = "bool-setting", + name = "artillery-targeting-remote", + localised_name = {"", {"item-name.artillery-targeting-remote"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "draw-grid", + localised_name = {"", {"gui.grid"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "rail-block-visualization-toggle", + localised_name = {"", {"gui-interface-settings.show-rail-block-visualization"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "artillery-jammer-remote", + localised_name = {"", {"gui-mod-info.toggle"}, " ", {"entity-name.artillery-wagon"}, " ", {"damage-type-name.fire"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "tree-killer", + localised_name = {"", {"item-name.deconstruction-planner"}, " (", {"gui-deconstruction.whitelist-trees-and-rocks"}, ") ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "discharge-defense-remote", + localised_name = {"", {"item-name.discharge-defense-remote"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "flashlight-toggle", + localised_name = {"", {"entity-name.small-lamp"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "big-zoom", + localised_name = {"", {"controls.alt-zoom-out"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + }, + { + type = "bool-setting", + name = "signal-flare", + localised_name = {"", {"technology-name.military"}, " ", {"entity-name.beacon"}, " (", {"description.force"}, " ", {"deconstruction-tile-mode.only"}, ") ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "za" + } +}) + + -- Since we cannot conditionally extend mod settings, we have to implement them whether the mod is enabled or not :( +data:extend( +{ + { + type = "bool-setting", + name = "resource-monitor", + localised_name = {"", {"item-name.resource-monitor"}, " ", {"gui-mod-info.toggle"}, " (LEGACY YARM)"}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "path-remote-control", + localised_name = {"", {"item-name.path-remote-control"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "unit-remote-control", + localised_name = {"", {"item-name.unit-remote-control"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "outpost-builder", + localised_name = {"", {"item-name.outpost-builder"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "ion-cannon-targeter", + localised_name = {"", {"item-name.ion-cannon-targeter"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "max-rate-calculator", + localised_name = {"", {"item-name.max-rate-calculator"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "module-inserter", + localised_name = {"", {"item-name.module-inserter"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "night-vision-equipment", + localised_name = {"", {"equipment-name.night-vision-equipment"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "active-defense-equipment", + localised_name = {"", {"equipment-name.personal-laser-defense-equipment"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + }, + { + type = "bool-setting", + name = "belt-immunity-equipment", + localised_name = {"", {"equipment-name.belt-immunity-equipment"}, " ", {"gui-mod-info.toggle"}}, + localised_description = {"", {""}, "Disable specific shortcuts to free up space for other modded shortcuts, or to slightly increase performance and load time."}, + setting_type = "startup", + default_value = true, + order = "zz" + } }) \ No newline at end of file diff --git a/Shortcuts/shortcuts.lua b/Shortcuts/shortcuts.lua index 7b0a612..07968ff 100644 --- a/Shortcuts/shortcuts.lua +++ b/Shortcuts/shortcuts.lua @@ -1,347 +1,396 @@ -local disable_turret_list = {} -if settings.startup["artillery-toggle"].value == "both" then - disable_turret_list = {"artillery-wagon", "artillery-turret",} -elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then - disable_turret_list = {"artillery-wagon"} -elseif settings.startup["artillery-toggle"].value == "artillery-turret" then - disable_turret_list = {"artillery-turret"} +if settings.startup["artillery-targeting-remote"].value == true then + data:extend( + { + { + type = "shortcut", + name = "artillery-targeting-remote", + order = "a[artillery-targeting-remote]", + action = "create-blueprint-item", + localised_name = {"item-name.artillery-targeting-remote"}, + technology_to_unlock = "artillery", + item_to_create = "artillery-targeting-remote", + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/artillery-targeting-remote-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/artillery-targeting-remote-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/artillery-targeting-remote-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + }, + }) end -data:extend( -{ - -- for the artillery toggle +if settings.startup["draw-grid"].value == true then + data:extend( { - type = "selection-tool", - name = "artillery-jammer-tool", - icon = "__Shortcuts__/graphics/artillery-jammer-remote.png", - icon_size = 32, - flags = {"hidden"}, - subgroup = "other", - order = "c[automated-construction]-a[artillery-jammer-tool]", - stack_size = 1, - stackable = false, - selection_color = { r = 1, g = 0, b = 0 }, - alt_selection_color = { r = 1, g = 0, b = 0 }, - selection_mode = {"blueprint"}, - alt_selection_mode = {"blueprint"}, - selection_cursor_box_type = "copy", - alt_selection_cursor_box_type = "copy", - entity_type_filters = disable_turret_list, - tile_filters = {"lab-dark-1"}, - entity_filter_mode = "whitelist", - tile_filter_mode = "whitelist", - alt_entity_type_filters = disable_turret_list, - alt_tile_filters = {"lab-dark-1"}, - alt_entity_filter_mode = "whitelist", - alt_tile_filter_mode = "whitelist", - show_in_library = false, - always_include_tiles = false - }, - -- all shortcuts + { + type = "shortcut", + name = "draw-grid", + order = "a[draw-grid]", + action = "lua", + localised_name = {"gui.grid"}, + style = "blue", + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/grid-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/grid-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/grid-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + }, + }) +end + +if settings.startup["rail-block-visualization-toggle"].value == true then + data:extend( { - type = "shortcut", - name = "artillery-targeting-remote", - order = "a[artillery-targeting-remote]", - action = "create-blueprint-item", - localised_name = {"item-name.artillery-targeting-remote"}, - technology_to_unlock = "artillery", - item_to_create = "artillery-targeting-remote", - style = "red", - icon = { - filename = "__Shortcuts__/graphics/artillery-targeting-remote-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "rail-block-visualization-toggle", + order = "a[rail-block-visualization-toggle]", + action = "lua", + localised_name = {"gui-interface-settings.show-rail-block-visualization"}, + style = "default", + technology_to_unlock = "railway", + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x32.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/artillery-targeting-remote-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/artillery-targeting-remote-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["artillery-jammer-remote"].value == true then + local disable_turret_list = {} + if settings.startup["artillery-toggle"].value == "both" then + disable_turret_list = {"artillery-wagon", "artillery-turret",} + elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then + disable_turret_list = {"artillery-wagon"} + elseif settings.startup["artillery-toggle"].value == "artillery-turret" then + disable_turret_list = {"artillery-turret"} + end + data:extend( { - type = "shortcut", - name = "draw-grid", - order = "a[draw-grid]", - action = "lua", - localised_name = {"gui.grid"}, - style = "blue", - toggleable = true, - icon = { - filename = "__Shortcuts__/graphics/grid-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "artillery-jammer-remote", + order = "a[artillery-jammer-remote]", + action = "create-blueprint-item", + localised_name = {"", {"gui-mod-info.toggle"}, " ", {"entity-name.artillery-wagon"}, " ", {"damage-type-name.fire"}}, + technology_to_unlock = "artillery", + item_to_create = "artillery-jammer-tool", + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/artillery-jammer-remote-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/artillery-jammer-remote-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/artillery-jammer-remote-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = { - filename = "__Shortcuts__/graphics/grid-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} + type = "selection-tool", + name = "artillery-jammer-tool", + icon = "__Shortcuts__/graphics/artillery-jammer-remote.png", + icon_size = 32, + flags = {"hidden", "only-in-cursor"}, + subgroup = "other", + order = "c[automated-construction]-a[artillery-jammer-tool]", + stack_size = 1, + stackable = false, + selection_color = { r = 1, g = 0, b = 0 }, + alt_selection_color = { r = 1, g = 0, b = 0 }, + selection_mode = {"blueprint"}, + alt_selection_mode = {"blueprint"}, + selection_cursor_box_type = "copy", + alt_selection_cursor_box_type = "copy", + entity_type_filters = disable_turret_list, + tile_filters = {"lab-dark-1"}, + entity_filter_mode = "whitelist", + tile_filter_mode = "whitelist", + alt_entity_type_filters = disable_turret_list, + alt_tile_filters = {"lab-dark-1"}, + alt_entity_filter_mode = "whitelist", + alt_tile_filter_mode = "whitelist", + show_in_library = false, + always_include_tiles = false }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/grid-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["tree-killer"].value == true then + data:extend( { - type = "shortcut", - name = "rail-block-visualization-toggle", - order = "a[rail-block-visualization-toggle]", - action = "lua", - localised_name = {"gui-interface-settings.show-rail-block-visualization"}, - style = "default", - technology_to_unlock = "railway", - toggleable = true, - icon = { - filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "tree-killer", + order = "a[tree-killer]", + action = "lua", + localised_name = {"", {"item-name.deconstruction-planner"}, " (", {"gui-deconstruction.whitelist-trees-and-rocks"}, ")"}, + technology_to_unlock = "construction-robotics", + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/tree-killer-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/tree-killer-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/tree-killer-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/rail-block-visualization-toggle-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["discharge-defense-remote"].value == true then + data:extend( { - type = "shortcut", - name = "artillery-jammer-remote", - order = "a[artillery-jammer-remote]", - action = "create-blueprint-item", - localised_name = {"", {"gui-mod-info.toggle"}, " ", {"entity-name.artillery-wagon"}, " ", {"damage-type-name.fire"}}, - technology_to_unlock = "artillery", - item_to_create = "artillery-jammer-tool", - style = "red", - icon = { - filename = "__Shortcuts__/graphics/artillery-jammer-remote-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "discharge-defense-remote", + order = "a[discharge-defense-remote]", + action = "create-blueprint-item", + localised_name = {"item-name.discharge-defense-remote"}, + technology_to_unlock = "discharge-defense-equipment", + item_to_create = "discharge-defense-remote", + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/discharge-defense-remote-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/discharge-defense-remote-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/discharge-defense-remote-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/artillery-jammer-remote-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/artillery-jammer-remote-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["flashlight-toggle"].value == true then + data:extend( { - type = "shortcut", - name = "tree-killer", - order = "a[tree-killer]", - action = "lua", - localised_name = {"", {"item-name.deconstruction-planner"}, " (", {"gui-deconstruction.whitelist-trees-and-rocks"}, ")"}, - technology_to_unlock = "construction-robotics", - style = "red", - icon = { - filename = "__Shortcuts__/graphics/tree-killer-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "flashlight-toggle", + order = "a[flashlight-toggle]", + technology_to_unlock = "electronics", + action = "lua", + localised_name = {"entity-name.small-lamp"}, + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/flashlight-toggle-x32.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/flashlight-toggle-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/flashlight-toggle-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/tree-killer-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/tree-killer-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["big-zoom"].value == true then + data:extend( { - type = "shortcut", - name = "discharge-defense-remote", - order = "a[discharge-defense-remote]", - action = "create-blueprint-item", - localised_name = {"item-name.discharge-defense-remote"}, - technology_to_unlock = "discharge-defense-equipment", - item_to_create = "discharge-defense-remote", - style = "red", - icon = { - filename = "__Shortcuts__/graphics/discharge-defense-remote-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "big-zoom", + order = "a[big-zoom]", + technology_to_unlock = "optics", + action = "lua", + localised_name = {"controls.alt-zoom-out"}, + toggleable = true, + style = "blue", + icon = + { + filename = "__Shortcuts__/graphics/big-zoom-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/big-zoom-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/big-zoom-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/discharge-defense-remote-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/discharge-defense-remote-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + +if settings.startup["signal-flare"].value == true then + data:extend( { - type = "shortcut", - name = "flashlight-toggle", - order = "a[flashlight-toggle]", - technology_to_unlock = "electronics", - action = "lua", - localised_name = {"entity-name.small-lamp"}, - toggleable = true, - icon = { - filename = "__Shortcuts__/graphics/flashlight-toggle-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} + type = "shortcut", + name = "signal-flare", + order = "a[signal-flare]", + technology_to_unlock = "electronics", + action = "lua", + localised_name = {"", {"technology-name.military"}, " ", {"entity-name.beacon"}, " (", {"description.force"}, " ", {"deconstruction-tile-mode.only"}, ")"}, + toggleable = true, + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/signal-flare-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/signal-flare-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/signal-flare-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, }, - small_icon = - { - filename = "__Shortcuts__/graphics/flashlight-toggle-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/flashlight-toggle-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, - { - type = "shortcut", - name = "big-zoom", - order = "a[big-zoom]", - technology_to_unlock = "optics", - action = "lua", - localised_name = {"controls.alt-zoom-out"}, - toggleable = true, - style = "blue", - icon = - { - filename = "__Shortcuts__/graphics/big-zoom-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/big-zoom-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/big-zoom-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, - { - type = "shortcut", - name = "signal-flare", - order = "a[signal-flare]", - technology_to_unlock = "electronics", - action = "lua", - localised_name = {"", {"technology-name.military"}, " ", {"entity-name.beacon"}, " (", {"description.force"}, " ", {"deconstruction-tile-mode.only"}, ")"}, - toggleable = true, - style = "red", - icon = - { - filename = "__Shortcuts__/graphics/signal-flare-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/signal-flare-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/signal-flare-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, + }) +end + -- Custom shortcut can be defined as follows: -- { -- type = "shortcut", @@ -350,342 +399,404 @@ data:extend( -- toggleable = true, -- whether or not the shortcut button is a toggle button or not -- order, localised_name, technology_to_unlock, icon, small_icon, disabled_icon, disabled_small_icon as above -- } -}) -- legacy for older version of YARM (newer versions have the shortcut built in) -if mods["YARM"] and data.raw["item"]["resource-monitor"] and data.raw["technology"]["resource-monitoring"] then -data:extend( -{ +if mods["YARM"] and data.raw["item"]["resource-monitor"] and data.raw["technology"]["resource-monitoring"] and settings.startup["resource-monitor"].value == true then + data:extend( { - type = "shortcut", - name = "resource-monitor", - order = "a[resource-monitor]", - action = "create-blueprint-item", - localised_name = {"item-name.resource-monitor"}, - technology_to_unlock = "resource-monitoring", - item_to_create = "resource-monitor", - style = "green", - icon = { - filename = "__Shortcuts__/graphics/resource-monitor-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/resource-monitor-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/resource-monitor-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + type = "shortcut", + name = "resource-monitor", + order = "a[resource-monitor]", + action = "create-blueprint-item", + localised_name = {"item-name.resource-monitor"}, + technology_to_unlock = "resource-monitoring", + item_to_create = "resource-monitor", + style = "green", + icon = + { + filename = "__Shortcuts__/graphics/resource-monitor-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/resource-monitor-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/resource-monitor-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) end -if mods["OutpostPlanner"] and mods["PlannerCore"] and data.raw["selection-tool"]["outpost-builder"] then -data:extend( -{ +if mods["OutpostPlanner"] and mods["PlannerCore"] and data.raw["selection-tool"]["outpost-builder"] and settings.startup["outpost-builder"].value == true then + data:extend( { - type = "shortcut", - name = "outpost-builder", - order = "a[outpost-builder]", - action = "create-blueprint-item", - localised_name = {"item-name.outpost-builder"}, - -- technology_to_unlock = "resource-monitor", - item_to_create = "outpost-builder", - style = "green", - icon = { - filename = "__Shortcuts__/graphics/outpost-builder-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/outpost-builder-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/outpost-builder-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + type = "shortcut", + name = "outpost-builder", + order = "a[outpost-builder]", + action = "create-blueprint-item", + localised_name = {"item-name.outpost-builder"}, + -- technology_to_unlock = "resource-monitor", + item_to_create = "outpost-builder", + style = "green", + icon = + { + filename = "__Shortcuts__/graphics/outpost-builder-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/outpost-builder-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/outpost-builder-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) end -if mods["Orbital Ion Cannon"] and data.raw["item"]["ion-cannon-targeter"] and data.raw["technology"]["orbital-ion-cannon"] then -data:extend( -{ +if mods["Orbital Ion Cannon"] and data.raw["item"]["ion-cannon-targeter"] and data.raw["technology"]["orbital-ion-cannon"] and settings.startup["ion-cannon-targeter"].value == true then + data:extend( { - type = "shortcut", - name = "ion-cannon-targeter", - order = "a[ion-cannon-targeter]", - action = "create-blueprint-item", - localised_name = {"item-name.ion-cannon-targeter"}, - technology_to_unlock = "orbital-ion-cannon", - item_to_create = "ion-cannon-targeter", - style = "red", - icon = { - filename = "__Shortcuts__/graphics/ion-cannon-targeter-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/ion-cannon-targeter-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/ion-cannon-targeter-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + type = "shortcut", + name = "ion-cannon-targeter", + order = "a[ion-cannon-targeter]", + action = "create-blueprint-item", + localised_name = {"item-name.ion-cannon-targeter"}, + technology_to_unlock = "orbital-ion-cannon", + item_to_create = "ion-cannon-targeter", + style = "red", + icon = + { + filename = "__Shortcuts__/graphics/ion-cannon-targeter-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/ion-cannon-targeter-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/ion-cannon-targeter-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) end -if mods["MaxRateCalculator"] and data.raw["selection-tool"]["max-rate-calculator"] then -data:extend( -{ +if mods["MaxRateCalculator"] and data.raw["selection-tool"]["max-rate-calculator"] and settings.startup["max-rate-calculator"].value == true then + data:extend( { - type = "shortcut", - name = "max-rate-calculator", - order = "a[max-rate-calculator]", - action = "create-blueprint-item", - localised_name = {"item-name.max-rate-calculator"}, - item_to_create = "max-rate-calculator", - style = "blue", - icon = { - filename = "__Shortcuts__/graphics/max-rate-calculator-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/max-rate-calculator-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/max-rate-calculator-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + type = "shortcut", + name = "max-rate-calculator", + order = "a[max-rate-calculator]", + action = "create-blueprint-item", + localised_name = {"item-name.max-rate-calculator"}, + item_to_create = "max-rate-calculator", + style = "blue", + icon = + { + filename = "__Shortcuts__/graphics/max-rate-calculator-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/max-rate-calculator-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/max-rate-calculator-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) end -if mods["ModuleInserter"] and data.raw["selection-tool"]["module-inserter"] then -data:extend( -{ +if mods["ModuleInserter"] and data.raw["selection-tool"]["module-inserter"] and settings.startup["module-inserter"].value == true then + data:extend( { - type = "shortcut", - name = "module-inserter", - order = "a[module-inserter]", - action = "create-blueprint-item", - localised_name = {"item-name.module-inserter"}, - item_to_create = "module-inserter", - technology_to_unlock = "modules", - style = "blue", - icon = { - filename = "__Shortcuts__/graphics/module-inserter-x32-white.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = + type = "shortcut", + name = "module-inserter", + order = "a[module-inserter]", + action = "create-blueprint-item", + localised_name = {"item-name.module-inserter"}, + item_to_create = "module-inserter", + technology_to_unlock = "modules", + style = "blue", + icon = + { + filename = "__Shortcuts__/graphics/module-inserter-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/module-inserter-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/module-inserter-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) +end + +if mods["aai-programmable-vehicles"] then + if settings.startup["unit-remote-control"].value == true and data.raw["selection-tool"]["unit-remote-control"] then + data:extend( { - filename = "__Shortcuts__/graphics/module-inserter-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = + { + type = "shortcut", + name = "unit-remote-control", + order = "a[unit-remote-control]", + action = "create-blueprint-item", + localised_name = {"item-name.unit-remote-control"}, + item_to_create = "unit-remote-control", + technology_to_unlock = "automobilism", + style = "blue", + icon = + { + filename = "__Shortcuts__/graphics/unit-remote-control-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/unit-remote-control-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/unit-remote-control-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) + end + + if settings.startup["path-remote-control"].value == true and data.raw["selection-tool"]["path-remote-control"] then + data:extend( { - filename = "__Shortcuts__/graphics/module-inserter-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + { + type = "shortcut", + name = "path-remote-control", + order = "a[path-remote-control]", + action = "create-blueprint-item", + localised_name = {"item-name.path-remote-control"}, + item_to_create = "path-remote-control", + technology_to_unlock = "automobilism", + style = "blue", + icon = + { + filename = "__Shortcuts__/graphics/path-remote-control-x32-white.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/path-remote-control-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/path-remote-control-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) + end end if not mods["Nanobots"] then -data:extend( -{ - { - type = "shortcut", - name = "night-vision-equipment", - order = "a[night-vision-equipment]", - action = "lua", - localised_name = {"equipment-name.night-vision-equipment"}, - technology_to_unlock = "night-vision-equipment", - toggleable = true, - icon = + if settings.startup["night-vision-equipment"].value == true then + data:extend( { - filename = "__Shortcuts__/graphics/night-vision-toggle-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = + { + type = "shortcut", + name = "night-vision-equipment", + order = "a[night-vision-equipment]", + action = "lua", + localised_name = {"equipment-name.night-vision-equipment"}, + technology_to_unlock = "night-vision-equipment", + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/night-vision-toggle-x32.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/night-vision-toggle-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/night-vision-toggle-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + }, + }) + end + + if settings.startup["active-defense-equipment"].value == true then + data:extend( { - filename = "__Shortcuts__/graphics/night-vision-toggle-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = + { + type = "shortcut", + name = "active-defense-equipment", + order = "a[active-defense-equipment]", + action = "lua", + localised_name = {"equipment-name.personal-laser-defense-equipment"}, + technology_to_unlock = "personal-laser-defense-equipment", + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/active-defense-equipment-x32.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/active-defense-equipment-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/active-defense-equipment-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + }, + }) + end + + if settings.startup["belt-immunity-equipment"].value == true then + data:extend( { - filename = "__Shortcuts__/graphics/night-vision-toggle-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, - { - type = "shortcut", - name = "night-vision-equipment", - order = "a[night-vision-equipment]", - action = "lua", - localised_name = {"equipment-name.night-vision-equipment"}, - technology_to_unlock = "night-vision-equipment", - toggleable = true, - icon = - { - filename = "__Shortcuts__/graphics/night-vision-toggle-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/night-vision-toggle-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/night-vision-toggle-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, - { - type = "shortcut", - name = "active-defense-equipment", - order = "a[active-defense-equipment]", - action = "lua", - localised_name = {"equipment-name.personal-laser-defense-equipment"}, - technology_to_unlock = "personal-laser-defense-equipment", - toggleable = true, - icon = - { - filename = "__Shortcuts__/graphics/active-defense-equipment-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/active-defense-equipment-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/active-defense-equipment-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - }, - { - type = "shortcut", - name = "belt-immunity-equipment", - order = "a[belt-immunity-equipment]", - action = "lua", - localised_name = {"item-name.belt-immunity-equipment"}, - technology_to_unlock = "belt-immunity-equipment", - toggleable = true, - icon = - { - filename = "__Shortcuts__/graphics/belt-immunity-toggle-x32.png", - priority = "extra-high-no-scale", - size = 32, - scale = 1, - flags = {"icon"} - }, - small_icon = - { - filename = "__Shortcuts__/graphics/belt-immunity-toggle-x24.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - disabled_small_icon = - { - filename = "__Shortcuts__/graphics/belt-immunity-toggle-x24-white.png", - priority = "extra-high-no-scale", - size = 24, - scale = 1, - flags = {"icon"} - }, - } -}) + { + type = "shortcut", + name = "belt-immunity-equipment", + order = "a[belt-immunity-equipment]", + action = "lua", + localised_name = {"item-name.belt-immunity-equipment"}, + technology_to_unlock = "belt-immunity-equipment", + toggleable = true, + icon = + { + filename = "__Shortcuts__/graphics/belt-immunity-toggle-x32.png", + priority = "extra-high-no-scale", + size = 32, + scale = 1, + flags = {"icon"} + }, + small_icon = + { + filename = "__Shortcuts__/graphics/belt-immunity-toggle-x24.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + disabled_small_icon = + { + filename = "__Shortcuts__/graphics/belt-immunity-toggle-x24-white.png", + priority = "extra-high-no-scale", + size = 24, + scale = 1, + flags = {"icon"} + }, + } + }) + end end \ No newline at end of file