Skip to content

Commit 9fccb15

Browse files
committed
Fluids, recipe icons and file shuffling
1 parent 74ea175 commit 9fccb15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+182
-72
lines changed

changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---------------------------------------------------------------------------------------------------
22
Version: 0.0.18
3-
Date: 2020.08.XX
3+
Date: 2020.08.03
44
Features:
55
- Implemented cobaltite, sulfur, rutile, and thorium ores
66
- Implemented lithia and ground water
@@ -9,6 +9,7 @@ Date: 2020.08.XX
99
- Implemented plates, gears, bearings, and ball-bearings
1010
- Implemented nuclear fuels and recipes, and solid fuels and recipes
1111
- Implemented bullets, projectiles, ammo magazines, warheads, and rockets
12+
- Implemented fluids, seedlings, fertiliser, wood pellets and other recipe icons
1213
Changes:
1314
- Batteries now respect Bob's Metals, Chemicals, and Intermediaries "Color updates" setting
1415
- Revised handling for deferred icon assignments; pipes, heat pipes, and Deadlocks loaders and beltboxes no longer deferred

data-updates.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
if mods["ShinyBobGFX"] then
88
require("shiny-bob-compatibility")
99
end
10+
1011
----------------------------------------------------------------------------------------------------
1112
-- ITEMS
1213
----------------------------------------------------------------------------------------------------
15.3 KB
14.8 KB
15.2 KB
8.13 KB
8.13 KB
8 KB
8.08 KB
7.87 KB
10.6 KB
12.6 KB
7.72 KB

prototypes/item/electronics.lua

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ local inputs = {
1616
-- Setup input defaults
1717
reskins.lib.parse_inputs(inputs)
1818

19-
-- Wires
20-
local wires_inputs = util.copy(inputs)
21-
22-
local wires = {
23-
"gilded-copper-cable",
24-
"tinned-copper-cable",
25-
"insulated-cable",
19+
local intermediaries = {
20+
-- Wires
21+
["gilded-copper-cable"] = {subfolder = "wires"},
22+
["tinned-copper-cable"] = {subfolder = "wires"},
23+
["insulated-cable"] = {subfolder = "wires"},
2624
}
2725

28-
for _, name in pairs(wires) do
29-
-- Fetch item
30-
local item = data.raw.item[name]
31-
32-
-- Check if item exists, if not, skip this iteration
33-
if not item then goto continue end
34-
35-
wires_inputs.icon_filename = wires_inputs.directory.."/graphics/icons/electronics/wires/"..name..".png"
36-
37-
reskins.lib.construct_icon(name, 0, wires_inputs)
38-
39-
-- Label to skip to next iteration
40-
::continue::
41-
end
26+
-- Items and recipes shared with other mods within Bob's suite
27+
if not mods["bobplates"] then
28+
-- Intermediaries
29+
intermediaries["solder-alloy"] = {folder = "plates", subfolder = "plates"}
30+
intermediaries["rubber"] = {folder = "plates", subfolder = "items"}
31+
intermediaries["resin"] = {folder = "plates", subfolder = "items"}
32+
intermediaries["ferric-chloride-solution"] = {type = "fluid", folder = "plates", subfolder = "fluids"}
33+
34+
-- Recipes
35+
intermediaries["coal-cracking"] = {type = "recipe", folder = "plates", subfolder = "recipes"}
36+
intermediaries["synthetic-wood"] = {type = "recipe", folder = "plates", subfolder = "recipes"}
37+
intermediaries["bob-resin-wood"] = {type = "recipe", folder = "plates", subfolder = "recipes"}
38+
intermediaries["bob-resin-oil"] = {type = "recipe", folder = "plates", subfolder = "recipes"}
39+
end
40+
41+
reskins.lib.create_icons_from_list(intermediaries, inputs)

prototypes/item/greenhouse.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-- Copyright (c) 2020 Kirazy
2+
-- Part of Artisanal Reskins: Bob's Mods
3+
--
4+
-- See LICENSE.md in the project directory for license information.
5+
6+
-- Check to see if reskinning needs to be done.
7+
if not mods["bobgreenhouse"] then return end
8+
9+
-- Setup inputs
10+
local inputs = {
11+
directory = reskins.bobs.directory,
12+
mod = "bobs",
13+
group = "greenhouse",
14+
}
15+
16+
-- Setup input defaults
17+
reskins.lib.parse_inputs(inputs)
18+
19+
local intermediaries = {
20+
["seedling"] = {subfolder = "items"},
21+
["fertiliser"] = {subfolder = "items"},
22+
["wood-pellets"] = {subfolder = "items"},
23+
["bob-basic-greenhouse-cycle"] = {type = "recipe", subfolder = "recipes"},
24+
["bob-advanced-greenhouse-cycle"] = {type = "recipe", subfolder = "recipes"},
25+
}
26+
27+
reskins.lib.create_icons_from_list(intermediaries, inputs)

prototypes/item/ores.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-- Copyright (c) 2020 Kirazy
2+
-- Part of Artisanal Reskins: Bob's Mods
3+
--
4+
-- See LICENSE.md in the project directory for license information.
5+
6+
-- Check to see if reskinning needs to be done.
7+
if not mods["bobores"] then return end
8+
9+
-- Setup inputs
10+
local inputs = {
11+
directory = reskins.bobs.directory,
12+
mod = "bobs",
13+
group = "ores",
14+
}
15+
16+
-- Setup input defaults
17+
reskins.lib.parse_inputs(inputs)
18+
19+
local intermediaries = {}
20+
21+
-- Items and recipes shared with other mods within Bob's suite
22+
if not mods["bobplates"] then
23+
-- Intermediaries
24+
intermediaries["lithia-water"] = {type = "fluid", folder = "plates", subfolder = "fluids"}
25+
end
26+
27+
reskins.lib.create_icons_from_list(intermediaries, inputs)

prototypes/item/plates.lua

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ local intermediaries = {
2020
----------------------------------------------------------------------------------------------------
2121
-- Intermediaries
2222
----------------------------------------------------------------------------------------------------
23-
2423
-- Plates
2524
["aluminium-plate"] = {subfolder = "plates"},
2625
["brass-alloy"] = {subfolder = "plates"},
@@ -37,7 +36,7 @@ local intermediaries = {
3736
["nitinol-alloy"] = {subfolder = "plates"},
3837
-- ["silicon-plate"] = {subfolder = "plates"},
3938
["silver-plate"] = {subfolder = "plates"},
40-
["solder-alloy"] = {subfolder = "plates"},
39+
["solder-alloy"] = {subfolder = "plates"}, -- Shared with Bob's Electronics
4140
["tin-plate"] = {subfolder = "plates"},
4241
["titanium-plate"] = {subfolder = "plates"},
4342
["tungsten-carbide"] = {subfolder = "plates"},
@@ -78,36 +77,52 @@ local intermediaries = {
7877
["plutonium-239"] = {subfolder = "nuclear"},
7978
["thorium-232"] = {subfolder = "nuclear"},
8079

81-
-- Miscellaneous
82-
["glass"] = {subfolder = "intermediaries"},
83-
["carbon"] = {subfolder = "intermediaries"},
84-
["rubber"] = {subfolder = "intermediaries"},
85-
["resin"] = {subfolder = "intermediaries"},
86-
["enriched-fuel"] = {subfolder = "fuels"},
87-
["liquid-fuel"] = {subfolder = "fluids", type = "fluid"},
80+
-- Fluids
81+
["liquid-fuel"] = {type = "fluid", subfolder = "fluids"},
82+
["ferric-chloride-solution"] = {type = "fluid", subfolder = "fluids"}, -- Shared with Bob's Electronics
83+
["lithia-water"] = {type = "fluid", subfolder = "fluids"}, -- Shared with Bob's Ores
84+
["alien-acid"] = {type = "fluid", subfolder = "fluids"},
85+
["alien-explosive"] = {type = "fluid", subfolder = "fluids"},
86+
["alien-fire"] = {type = "fluid", subfolder = "fluids"},
87+
["alien-poison"] = {type = "fluid", subfolder = "fluids"},
88+
89+
-- Miscellaneous Items
90+
["glass"] = {subfolder = "items"},
91+
["carbon"] = {subfolder = "items"},
92+
["rubber"] = {subfolder = "items"}, -- Shared with Bob's Electronics
93+
["resin"] = {subfolder = "items"}, -- Shared with Bob's Electronics
94+
["enriched-fuel"] = {subfolder = "items"},
8895

8996
----------------------------------------------------------------------------------------------------
9097
-- Recipes
9198
----------------------------------------------------------------------------------------------------
9299
-- Plates
93-
["cobalt-oxide-from-copper"] = {type = "recipe", subfolder = "plates"},
94-
["silver-from-lead"] = {type = "recipe", subfolder = "plates"},
100+
["cobalt-oxide-from-copper"] = {type = "recipe", subfolder = "recipes"},
101+
["silver-from-lead"] = {type = "recipe", subfolder = "recipes"},
95102

96103
-- Nuclear
97-
["thorium-processing"] = {type = "recipe", subfolder = "nuclear"},
98-
["thorium-fuel-reprocessing"] = {type = "recipe", subfolder = "nuclear", image = "thorium-nuclear-fuel-reprocessing"},
99-
["deuterium-fuel-reprocessing"] = {type = "recipe", subfolder = "nuclear", image = "deuterium-nuclear-fuel-reprocessing-pink"},
100-
["bobingabout-enrichment-process"] = {type = "recipe", subfolder = "nuclear"},
104+
["thorium-processing"] = {type = "recipe", subfolder = "recipes"},
105+
["thorium-fuel-reprocessing"] = {type = "recipe", subfolder = "recipes", image = "thorium-nuclear-fuel-reprocessing"},
106+
["deuterium-fuel-reprocessing"] = {type = "recipe", subfolder = "recipes", image = "deuterium-nuclear-fuel-reprocessing-pink"},
107+
["bobingabout-enrichment-process"] = {type = "recipe", subfolder = "recipes"},
101108

102109
-- Solid Fuels
103-
["solid-fuel-from-hydrogen"] = {type = "recipe", subfolder = "fuels"},
104-
["solid-fuel-from-sour-gas"] = {type = "recipe", subfolder = "fuels"},
105-
["enriched-fuel-from-hydrazine"] = {type = "recipe", subfolder = "fuels"},
106-
["enriched-fuel-from-liquid-fuel"] = {type = "recipe", subfolder = "fuels"},
107-
108-
-- Miscellaneous
109-
["bob-resin-wood"] = {type = "recipe", subfolder = "intermediaries"},
110-
["bob-resin-oil"] = {type = "recipe", subfolder = "intermediaries"},
110+
["solid-fuel-from-hydrogen"] = {type = "recipe", subfolder = "recipes"},
111+
["solid-fuel-from-sour-gas"] = {type = "recipe", subfolder = "recipes"}, -- Shared with Bob's Revamp
112+
["enriched-fuel-from-hydrazine"] = {type = "recipe", subfolder = "recipes"},
113+
["enriched-fuel-from-liquid-fuel"] = {type = "recipe", subfolder = "recipes"},
114+
115+
-- Chemicals and Fluids
116+
-- ["sulfuric-nitric-acid"] = {type = "recipe", subfolder = "recipes"},
117+
-- ["pure-water"] = {type = "recipe", subfolder = "recipes"},
118+
-- ["pure-water-from-lithia"] = {type = "recipe", subfolder = "recipes"},
119+
["coal-cracking"] = {type = "recipe", subfolder = "recipes"}, -- Shared with Bob's Electronics
120+
["petroleum-gas-cracking"] = {type = "recipe", subfolder = "recipes"},
121+
122+
-- Wood
123+
["bob-resin-wood"] = {type = "recipe", subfolder = "recipes"}, -- Shared with Bob's Electronics
124+
["bob-resin-oil"] = {type = "recipe", subfolder = "recipes"}, -- Shared with Bob's Electronics
125+
["synthetic-wood"] = {type = "recipe", subfolder = "recipes"}, -- Shared with Bob's Electronics
111126
}
112127

113128
-- Handle deuterium color
@@ -118,7 +133,7 @@ end
118133

119134
-- Handle nuclear update
120135
if reskins.lib.setting("bobmods-plates-nuclearupdate") == true then
121-
intermediaries["nuclear-fuel-reprocessing"] = {type = "recipe", subfolder = "nuclear", defer_to_data_updates = true}
136+
intermediaries["nuclear-fuel-reprocessing"] = {type = "recipe", subfolder = "recipes", defer_to_data_updates = true}
122137

123138
-- Handle deuterium's default process color
124139
if reskins.lib.setting("bobmods-plates-bluedeuterium") == true then
@@ -136,31 +151,9 @@ else
136151

137152
end
138153

139-
for name, map in pairs(intermediaries) do
140-
-- Fetch intermediary
141-
local intermediary = data.raw.item[name]
142-
if map.type then
143-
intermediary = data.raw[map.type][name]
144-
end
145-
146-
-- Check if intermediary exists, if not, skip this iteration
147-
if not intermediary then goto continue end
148-
149-
-- Parse map
150-
local image = map.image or name
151-
inputs.type = map.type or nil
152-
inputs.defer_to_data_updates = map.defer_to_data_updates or nil
153-
inputs.defer_to_data_final_fixes = map.defer_to_data_final_fixes or nil
154-
155-
inputs.icon_filename = inputs.directory.."/graphics/icons/plates/"..map.subfolder.."/"..image..".png"
156-
157-
reskins.lib.construct_icon(name, 0, inputs)
158-
159-
-- One-off fixes
160-
if name == "nickel-plate" then
161-
reskins.lib.clear_icon_specification("bob-nickel-plate", "recipe")
162-
end
154+
reskins.lib.create_icons_from_list(intermediaries, inputs)
163155

164-
-- Label to skip to next iteration
165-
::continue::
156+
-- One-off fixes
157+
if data.raw.item["nickel-plate"] then
158+
reskins.lib.clear_icon_specification("bob-nickel-plate", "recipe")
166159
end

prototypes/item/revamp.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
-- Copyright (c) 2020 Kirazy
2+
-- Part of Artisanal Reskins: Bob's Mods
3+
--
4+
-- See LICENSE.md in the project directory for license information.
5+
6+
-- Check to see if reskinning needs to be done.
7+
if not mods["bobrevamp"] then return end
8+
9+
-- Setup inputs
10+
local inputs = {
11+
directory = reskins.bobs.directory,
12+
mod = "bobs",
13+
group = "revamp",
14+
}
15+
16+
-- Setup input defaults
17+
reskins.lib.parse_inputs(inputs)
18+
19+
local intermediaries = {
20+
["brine"] = {type = "fluid", subfolder = "fluids"},
21+
["ammoniated-brine"] = {type = "fluid", subfolder = "fluids"},
22+
}
23+
24+
-- Items and recipes shared with other mods within Bob's suite
25+
if not mods["bobplates"] then
26+
intermediaries["solid-fuel-from-sour-gas"] = {type = "recipe", folder = "plates", subfolder = "recipes"}
27+
end
28+
29+
reskins.lib.create_icons_from_list(intermediaries, inputs)

prototypes/technology/greenhouse.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- Copyright (c) 2020 Kirazy
2+
-- Part of Artisanal Reskins: Bob's Mods
3+
--
4+
-- See LICENSE.md in the project directory for license information.
5+
6+
-- Check to see if reskinning needs to be done.
7+
if not mods["bobgreenhouse"] then return end
8+
9+
-- Setup inputs
10+
local inputs = {
11+
directory = reskins.bobs.directory,
12+
mod = "bobs",
13+
group = "greenhouse",
14+
type = "technology",
15+
}
16+
17+
-- Setup input defaults
18+
reskins.lib.parse_inputs(inputs)
19+
20+
local technology = {
21+
["bob-fertiliser"] = {subfolder = "fertiliser", image = "fertiliser"}
22+
}
23+
24+
reskins.lib.create_icons_from_list(technology, inputs, true)

shiny-bob-compatibility.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@
55

66
-- When compatibility with ShinyBobGFX is finally dropped, the contents of this file will be moved to data.lua
77

8+
----------------------------------------------------------------------------------------------------
9+
-- TECHNOLOGIES
10+
----------------------------------------------------------------------------------------------------
11+
require("prototypes.technology.greenhouse")
12+
813
----------------------------------------------------------------------------------------------------
914
-- ITEMS
1015
----------------------------------------------------------------------------------------------------
1116
require("prototypes.item.electronics")
17+
require("prototypes.item.greenhouse")
1218
require("prototypes.item.logistics")
1319
require("prototypes.item.modules")
20+
require("prototypes.item.ores")
1421
require("prototypes.item.plates")
22+
require("prototypes.item.revamp")
1523
require("prototypes.item.technology")
1624
require("prototypes.item.warfare")
1725

0 commit comments

Comments
 (0)