mirror of
https://github.com/factoriolib/flib.git
synced 2025-09-06 12:15:02 +00:00
Compare commits
3 Commits
e7e780bdd2
...
dc986df5c8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dc986df5c8 | ||
![]() |
30a46a35bf | ||
![]() |
5bbbe0dc5b |
@@ -3,6 +3,8 @@ Version: 0.16.0
|
||||
Date: ????
|
||||
Features:
|
||||
- Added `flib_data_util.all()`, `flib_data_util.get()` for interacting with prototypes via their base type.
|
||||
Bugfixes:
|
||||
- Removed icon mipmaps properties from `data-util`; icon mipmaps are now automatically deduced by the game engine.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.15.0
|
||||
Date: 2024-10-14
|
||||
|
@@ -40,7 +40,6 @@ function flib_data_util.copy_prototype(prototype, new_name, remove_icon)
|
||||
if remove_icon then
|
||||
p.icon = nil
|
||||
p.icon_size = nil
|
||||
p.icon_mipmaps = nil
|
||||
p.icons = nil
|
||||
end
|
||||
|
||||
@@ -69,7 +68,6 @@ function flib_data_util.create_icons(prototype, new_layers)
|
||||
icons[#icons + 1] = {
|
||||
icon = v.icon,
|
||||
icon_size = v.icon_size or prototype.icon_size,
|
||||
icon_mipmaps = v.icon_mipmaps or prototype.icon_mipmaps or 0,
|
||||
tint = v.tint,
|
||||
scale = v.scale,
|
||||
shift = v.shift,
|
||||
@@ -86,7 +84,6 @@ function flib_data_util.create_icons(prototype, new_layers)
|
||||
{
|
||||
icon = prototype.icon,
|
||||
icon_size = prototype.icon_size,
|
||||
icon_mipmaps = prototype.icon_mipmaps,
|
||||
tint = { r = 1, g = 1, b = 1, a = 1 },
|
||||
},
|
||||
}
|
||||
@@ -152,17 +149,15 @@ end
|
||||
--- @param position? MapPosition
|
||||
--- @param filename? string
|
||||
--- @param size? Vector
|
||||
--- @param mipmap_count? number
|
||||
--- @param mods? table
|
||||
--- @return SpriteSpecification
|
||||
function flib_data_util.build_sprite(name, position, filename, size, mipmap_count, mods)
|
||||
function flib_data_util.build_sprite(name, position, filename, size, mods)
|
||||
local def = {
|
||||
type = "sprite",
|
||||
name = name,
|
||||
filename = filename,
|
||||
position = position,
|
||||
size = size,
|
||||
mipmap_count = mipmap_count,
|
||||
flags = { "icon" },
|
||||
}
|
||||
if mods then
|
||||
|
Reference in New Issue
Block a user