Skip to content

Commit

Permalink
Change how setting icons were managed
Browse files Browse the repository at this point in the history
  • Loading branch information
kirazy committed Aug 7, 2020
1 parent 619970d commit 31fa988
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Date: 2020.08.07
- Moved sprites, icons and code for oil refineries into this mod
- Revised icon assignment to optionally define `pictures`
- Increased scope of `create_icons_from_list` to handle all item/technology icon setups
- Changed how tier label setting icons were created and referenced; now uses sprite prototype
---------------------------------------------------------------------------------------------------
Version: 0.0.13
Date: 2020.08.03
Expand Down
12 changes: 6 additions & 6 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ reskins-lib-custom-colors-tier-6=Choose color for Tier 6.\n\n[color=#9cdcfe]Defa
[string-mod-setting]
reskins-lib-tier-mapping-progression-map=Progression
reskins-lib-tier-mapping-name-map=Name
reskins-lib-icon-tier-labeling-style-dots=[img=item.reskins-lib-dots-tier-label]Dots
reskins-lib-icon-tier-labeling-style-half-circle=[img=item.reskins-lib-half-circle-tier-label]Half-circles
reskins-lib-icon-tier-labeling-style-rectangle=[img=item.reskins-lib-rectangle-tier-label]Rectangles
reskins-lib-icon-tier-labeling-style-rounded-half-circle=[img=item.reskins-lib-rounded-half-circle-tier-label]Rounded half-circles
reskins-lib-icon-tier-labeling-style-rounded-rectangle=[img=item.reskins-lib-rounded-rectangle-tier-label]Rounded rectangles
reskins-lib-icon-tier-labeling-style-teardrop=[img=item.reskins-lib-teardrop-tier-label]Teardrops
reskins-lib-icon-tier-labeling-style-dots=[img=reskins-lib-dots-tier-label]Dots
reskins-lib-icon-tier-labeling-style-half-circle=[img=reskins-lib-half-circle-tier-label]Half-circles
reskins-lib-icon-tier-labeling-style-rectangle=[img=reskins-lib-rectangle-tier-label]Rectangles
reskins-lib-icon-tier-labeling-style-rounded-half-circle=[img=reskins-lib-rounded-half-circle-tier-label]Rounded half-circles
reskins-lib-icon-tier-labeling-style-rounded-rectangle=[img=reskins-lib-rounded-rectangle-tier-label]Rounded rectangles
reskins-lib-icon-tier-labeling-style-teardrop=[img=reskins-lib-teardrop-tier-label]Teardrops
15 changes: 7 additions & 8 deletions prototypes/label-items.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
local function create_label_item(label)
local function create_label_sprite(label)
data:extend({
{
type = "item",
type = "sprite",
name = "reskins-lib-"..label.."-tier-label",
icon = reskins.lib.directory.."/graphics/icons/icon-"..label..".png",
icon_size = 40, icon_mipmaps = 2,
flags = { "hidden" },
order = "zzz-reskins-tier-icons",
stack_size = 10
filename = reskins.lib.directory.."/graphics/icons/icon-"..label..".png",
size = 40,
mipmap_count = 2,
flags = {"gui-icon"}
}
})
end
Expand All @@ -22,5 +21,5 @@ local icons = {
}

for _, v in pairs(icons) do
create_label_item(v)
create_label_sprite(v)
end

0 comments on commit 31fa988

Please sign in to comment.