0.7.0: AAI support, autogen shortcuts.

See changelog.txt for rest of changes
This commit is contained in:
Peter 2019-04-14 15:16:32 +08:00
parent eb1e141cd6
commit 1321b3aadd
15 changed files with 1244 additions and 775 deletions

21
LICENSE.txt Normal file
View File

@ -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.

View File

@ -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

View File

@ -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\"")

View File

@ -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 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
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].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
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"])
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
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])
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})
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

View File

@ -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."
}

View File

@ -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"
}
})

File diff suppressed because it is too large Load Diff