mirror of
https://github.com/peter-tanner/factorio-shortcuts.git
synced 2024-11-30 11:10:22 +08:00
0.7.1: Bugfix: support for selection-tools with 'icons' instead of 'icon'
Also a setting for the color of autogenerated shortcuts
This commit is contained in:
parent
e8c4ceaa24
commit
971eae654f
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -4,3 +4,6 @@ mod-list.json
|
|||
*.dat
|
||||
*.pdn
|
||||
*.zip
|
||||
path-remote-control.png
|
||||
unit-remote-control.png
|
||||
/old_assets
|
|
@ -1,3 +1,11 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.7.1
|
||||
Date: 2019-04-14
|
||||
Features:
|
||||
- Add setting to change the color (style property) for all dynamically generated shortcuts
|
||||
Bugfixes:
|
||||
- Dynamically generated shortcuts now no longer crash on startup if the selection-tool is composed of icons instead of an icon. (Will not make an attempt to composite the icons together - the shortcut will appear visually different from the tool in this case)
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.7.0
|
||||
Date: 2019-04-14
|
||||
|
|
|
@ -240,6 +240,13 @@ if settings.startup["autogen"].value == true then
|
|||
end
|
||||
end
|
||||
if create == true then
|
||||
local icon
|
||||
local icon_size = tool.icon_size
|
||||
if tool.icon then
|
||||
icon = tool.icon
|
||||
else
|
||||
icon = tool.icons[1].icon
|
||||
end
|
||||
local shortcut = {
|
||||
type = "shortcut",
|
||||
name = name,
|
||||
|
@ -247,28 +254,28 @@ if settings.startup["autogen"].value == true then
|
|||
action = "create-blueprint-item",
|
||||
localised_name = {"item-name." .. name},
|
||||
item_to_create = name,
|
||||
style = "default",
|
||||
style = settings.startup["autogen-color"].value,
|
||||
icon =
|
||||
{
|
||||
filename = tool.icon,
|
||||
filename = icon,
|
||||
priority = "extra-high-no-scale",
|
||||
size = tool.icon_size,
|
||||
size = icon_size,
|
||||
scale = 1,
|
||||
flags = {"icon"}
|
||||
},
|
||||
small_icon =
|
||||
{
|
||||
filename = tool.icon,
|
||||
filename = icon,
|
||||
priority = "extra-high-no-scale",
|
||||
size = tool.icon_size,
|
||||
size = icon_size,
|
||||
scale = 1,
|
||||
flags = {"icon"}
|
||||
},
|
||||
disabled_small_icon =
|
||||
{
|
||||
filename = tool.icon,
|
||||
filename = icon,
|
||||
priority = "extra-high-no-scale",
|
||||
size = tool.icon_size,
|
||||
size = icon_size,
|
||||
scale = 1,
|
||||
flags = {"icon"}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Shortcuts",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.1",
|
||||
"factorio_version": "0.17",
|
||||
"title": "Shortcuts",
|
||||
"author": "npc_strider(morley376)",
|
||||
|
|
|
@ -89,6 +89,15 @@ data:extend({
|
|||
allowed_values = {"both", "artillery-wagon", "artillery-turret"},
|
||||
default_value = "both",
|
||||
order = "a"
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "autogen-color",
|
||||
localised_name = {"", "Auto-", {"gui-new-game.create"}, " ", {"gui-update.mod"}, " shortcuts ", {"gui-train.color"}},
|
||||
setting_type = "startup",
|
||||
allowed_values = {"default", "red", "green", "blue"},
|
||||
default_value = "default",
|
||||
order = "a"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
|
|
BIN
crosshairs64.png
BIN
crosshairs64.png
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
BIN
laser-turret.png
BIN
laser-turret.png
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue
Block a user