diff --git a/.gitignore b/.gitignore index aa6e79f..b2734d9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ mod mod-list.json *.dat *.pdn -*.zip \ No newline at end of file +*.zip +path-remote-control.png +unit-remote-control.png +/old_assets \ No newline at end of file diff --git a/Shortcuts/changelog.txt b/Shortcuts/changelog.txt index 5637ad1..f78f999 100644 --- a/Shortcuts/changelog.txt +++ b/Shortcuts/changelog.txt @@ -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 diff --git a/Shortcuts/data-updates.lua b/Shortcuts/data-updates.lua index d832909..31c2d8c 100644 --- a/Shortcuts/data-updates.lua +++ b/Shortcuts/data-updates.lua @@ -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"} }, diff --git a/Shortcuts/info.json b/Shortcuts/info.json index ea98b30..e8adc5f 100644 --- a/Shortcuts/info.json +++ b/Shortcuts/info.json @@ -1,6 +1,6 @@ { "name": "Shortcuts", - "version": "0.7.0", + "version": "0.7.1", "factorio_version": "0.17", "title": "Shortcuts", "author": "npc_strider(morley376)", diff --git a/Shortcuts/settings.lua b/Shortcuts/settings.lua index 0cb9491..407b113 100644 --- a/Shortcuts/settings.lua +++ b/Shortcuts/settings.lua @@ -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", diff --git a/crosshairs64.png b/crosshairs64.png deleted file mode 100644 index 3414347..0000000 Binary files a/crosshairs64.png and /dev/null differ diff --git a/laser-turret.png b/laser-turret.png deleted file mode 100644 index f672268..0000000 Binary files a/laser-turret.png and /dev/null differ diff --git a/resource-monitor.png b/resource-monitor.png deleted file mode 100644 index 4aff6c6..0000000 Binary files a/resource-monitor.png and /dev/null differ