Skip to content

Commit 9085ab5

Browse files
committed
fix: eliminate unused/default prototype properties
kirazy/reskins-bobs#60
1 parent 303807d commit 9085ab5

File tree

9 files changed

+35
-36
lines changed

9 files changed

+35
-36
lines changed

prototypes/entity/addons-storage/chests.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
local inputs = {
88
type = "container",
99
mod = "angels",
10-
tint = util.color("403630"),
10+
tint = util.color("#403630"),
1111
icon_layers = 1,
1212
make_remnants = false,
1313
-- make_explosions = false,

prototypes/entity/addons-storage/logistics-chests.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ local inputs = {
1313
}
1414

1515
local logistic_map = {
16-
["active-provider"] = { tint = util.color("760fd6") },
17-
["buffer"] = { tint = util.color("00bf13") },
18-
["passive-provider"] = { tint = util.color("ff0000") },
19-
["requester"] = { tint = util.color("227dae") },
20-
["storage"] = { tint = util.color("ba7713") },
16+
["active-provider"] = { tint = util.color("#760fd6") },
17+
["buffer"] = { tint = util.color("#00bf13") },
18+
["passive-provider"] = { tint = util.color("#ff0000") },
19+
["requester"] = { tint = util.color("#227dae") },
20+
["storage"] = { tint = util.color("#ba7713") },
2121
}
2222

2323
-- Reskin Warehouses

prototypes/entity/petrochem/petrochem-inline-tank.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ local inputs = {
1515
base_entity_name = "storage-tank",
1616
mod = "angels",
1717
group = "petrochem",
18-
tint = util.color("c20600"), -- Red
18+
tint = util.color("#c20600"), -- Red
1919
icon_layers = 1,
2020
particles = { ["big"] = 1 },
2121
make_remnants = false,

prototypes/entity/petrochem/valve.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ local inputs = {
2121
}
2222

2323
local valves = {
24-
["valve-inspector"] = { tint = util.color("8dd24e") },
25-
["valve-overflow"] = { tint = util.color("689ed3") },
26-
["valve-return"] = { tint = util.color("d4933f") },
27-
["valve-underflow"] = { tint = util.color("fcfcfc") },
24+
["valve-inspector"] = { tint = util.color("#8dd24e") },
25+
["valve-overflow"] = { tint = util.color("#689ed3") },
26+
["valve-return"] = { tint = util.color("#d4933f") },
27+
["valve-underflow"] = { tint = util.color("#fcfcfc") },
2828
}
2929

3030
local function cardinal_pictures(x, tint)
@@ -83,7 +83,7 @@ end
8383
-- Setup for one-off converter valve
8484
local name = "valve-converter"
8585
inputs.type = "furnace"
86-
inputs.tint = util.color("fdec2b")
86+
inputs.tint = util.color("#fdec2b")
8787

8888
---@type data.FurnacePrototype
8989
local entity = data.raw[inputs.type][name]

prototypes/entity/refining/ore-crusher.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ local inputs = {
2020
}
2121

2222
local tier_map = {
23-
["burner-ore-crusher"] = { tier = 0, tint = util.color("262626"), is_burner = true },
23+
["burner-ore-crusher"] = { tier = 0, tint = util.color("#262626"), is_burner = true },
2424
["ore-crusher"] = { tier = 1 },
2525
["ore-crusher-2"] = { tier = 2 },
2626
["ore-crusher-3"] = { tier = 3 },

prototypes/entity/smelting/pipe.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ end
7474

7575
---@type { [PipeNamePrefix]: PipeReskinParams }
7676
local pipe_material_map = {
77-
["titanium"] = { material_type = "angels-titanium", tier = 4, tint = util.color("995f92") },
78-
["ceramic"] = { material_type = "angels-ceramic", tier = 4, tint = util.color("ffffff") },
79-
["tungsten"] = { material_type = "angels-tungsten", tier = 4, tint = util.color("7e5f45") },
80-
["nitinol"] = { material_type = "angels-nitinol", tier = 5, tint = util.color("7664a9") },
77+
["titanium"] = { material_type = "angels-titanium", tier = 4, tint = util.color("#995f92") },
78+
["ceramic"] = { material_type = "angels-ceramic", tier = 4, tint = util.color("#ffffff") },
79+
["tungsten"] = { material_type = "angels-tungsten", tier = 4, tint = util.color("#7e5f45") },
80+
["nitinol"] = { material_type = "angels-nitinol", tier = 5, tint = util.color("#7664a9") },
8181
}
8282

8383
-- Reskin pipes, create and assign extra details

prototypes/functions/functions.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ reskins.angels.constants = {
1515

1616
-- Maybe we'll use this one day?...
1717
local function copy_icon(destination_name, destination_type, source_name, source_type)
18-
-- Fetch source and desination pointers
18+
-- Fetch source and destination pointers
1919
local source = data.raw[source_type]
2020
local destination = data.raw[destination_type]
2121

@@ -39,18 +39,18 @@ end
3939

4040
-- Check to see if the new angels numbering function is available.
4141
local function check_add_number_icon_layer_is_available()
42-
return angelsmods and angelsmods.functions.add_number_icon_layer({}, 1, util.get_color_with_alpha(util.color("000000"), 1))
42+
return angelsmods and angelsmods.functions.add_number_icon_layer({}, 1, util.get_color_with_alpha(util.color("#000000"), 1))
4343
end
4444

4545
local number_function_is_valid = pcall(check_add_number_icon_layer_is_available)
4646

4747
---comment
4848
---@param tier integer
49-
---@param mod string # The key to a specific Angel's mod subtable in the `angelsmods` global, e.g. `"smelting"`.
49+
---@param mod string # The key to a specific Angel's mod sub table in the `angelsmods` global, e.g. `"smelting"`.
5050
---@return data.IconData[]
5151
function reskins.angels.num_tier(tier, mod)
5252
-- Get the tint for the given mod; fallback to black if necessary
53-
local tint = angelsmods and angelsmods[mod] and angelsmods[mod].number_tint or util.color("000000")
53+
local tint = angelsmods and angelsmods[mod] and angelsmods[mod].number_tint or util.color("#000000")
5454

5555
local icons
5656
if number_function_is_valid then

prototypes/items/smelting/ores.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ for ore_name, parameters in pairs(ores) do
6969
local icon_data = { {
7070
icon = reskins[parameters.key].directory .. "/graphics/icons/" .. parameters.subfolder .. "/" .. ore_name .. "/" .. ore_name .. ".png",
7171
icon_size = 64,
72-
icon_miumaps = 4,
7372
scale = 0.5,
7473
} }
7574

@@ -98,22 +97,22 @@ local function make_slag_processing_icon_base()
9897
{
9998
icon = "__angelsrefininggraphics__/graphics/icons/angels-liquid/liquid-recipe-base.png",
10099
icon_size = 600,
101-
tint = util.color("404040b2"),
100+
tint = util.color("#404040b2"),
102101
},
103102
{
104103
icon = "__angelsrefininggraphics__/graphics/icons/angels-liquid/liquid-recipe-top.png",
105104
icon_size = 600,
106-
tint = util.color("ca6311"),
105+
tint = util.color("#ca6311"),
107106
},
108107
{
109108
icon = "__angelsrefininggraphics__/graphics/icons/angels-liquid/liquid-recipe-mid.png",
110109
icon_size = 600,
111-
tint = util.color("613414"),
110+
tint = util.color("#613414"),
112111
},
113112
{
114113
icon = "__angelsrefininggraphics__/graphics/icons/angels-liquid/liquid-recipe-bot.png",
115114
icon_size = 600,
116-
tint = util.color("613414"),
115+
tint = util.color("#613414"),
117116
},
118117
}
119118
end

prototypes/recipe-adjustments/refining/clarifier.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
--
44
-- See LICENSE.md in the project directory for license information.
55

6-
local water_tint = util.color("005799") -- Water void recipe tint for water
7-
local mud_tint = util.color("6a492c") -- AR:Angel's tint for mud
6+
local water_tint = util.color("#005799") -- Water void recipe tint for water
7+
local mud_tint = util.color("#6a492c") -- AR:Angel's tint for mud
88

99
-- Ensure a tint is formatted as expected by reskins.lib functions
10-
---@param color table [Types/Color](https://wiki.factorio.com/Types/Color)
11-
---@return table tint [Types/Color](https://wiki.factorio.com/Types/Color) with fields r, g, b, a
10+
---@param color data.Color
11+
---@return data.Color
1212
local function format_tint(color)
1313
local tint = {
1414
r = color.r or color[1],
@@ -21,11 +21,11 @@ local function format_tint(color)
2121
end
2222

2323
-- Takes two input tints and blends them in the following manner: `A*w + B*(1-w)`
24-
---@param tint_A table [Types/Color](https://wiki.factorio.com/Types/Color)
25-
---@param tint_B table [Types/Color](https://wiki.factorio.com/Types/Color)
26-
---@param weighting? number In the range 0:1, default 0.5
27-
---@param alpha? number In the range 0:1, default 1
28-
---@return table tint [Types/Color](https://wiki.factorio.com/Types/Color)
24+
---@param tint_A data.Color
25+
---@param tint_B data.Color
26+
---@param weighting? number # In the range 0:1, default 0.5
27+
---@param alpha? number # In the range 0:1, default 1
28+
---@return data.Color
2929
local function blend_colors(tint_A, tint_B, weighting, alpha)
3030
local A = format_tint(tint_A)
3131
local B = format_tint(tint_B)
@@ -74,7 +74,7 @@ end
7474
-- end
7575
-- end
7676

77-
-- -- Fix the localisation, hnng...
77+
-- -- Fix the localisation...
7878
-- -- recipe_data.localised_name = {"", ingredient.localised_name, " void"}
7979
-- end
8080
-- end

0 commit comments

Comments
 (0)