Skip to content

Commit 1917641

Browse files
Merge updates
1 parent 0fe0a8b commit 1917641

File tree

6 files changed

+63
-53
lines changed

6 files changed

+63
-53
lines changed

SeaBlock/data-final-fixes/SpaceMod.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,24 @@ if settings.startup["SpaceX-ignore-tech-multiplier"] then
3838
end
3939
end
4040

41+
local recipes = {
42+
"low-density-structure",
43+
"rocket-control-unit",
44+
"assembly-robot",
45+
"satellite",
46+
"drydock-assembly",
47+
"fusion-reactor",
48+
"hull-component",
49+
"protection-field",
50+
"space-thruster",
51+
"fuel-cell",
52+
"habitation",
53+
"life-support",
54+
"command",
55+
"astrometrics",
56+
"ftl-drive",
57+
}
58+
4159
local techs = {
4260
"space-assembly",
4361
"space-construction",

SeaBlock/data-final-fixes/unobtainable_items.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ local function updateline(line)
2222

2323
end
2424
for _, recipe in pairs(data.raw.recipe) do
25-
for _, v in pairs(recipe.ingredients) do
25+
for _, v in pairs(recipe.ingredients or {}) do
2626
updateline(v)
2727
end
2828

SeaBlock/data-updates/startup.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ local function consumes_startup_item(recipe)
133133
["copper-cable"] = true,
134134
["stone-furnace"] = true,
135135
}
136-
for k, v in pairs(recipe.ingredients) do
136+
for k, v in pairs(recipe.ingredients or {}) do
137137
if ironnames[v.name] then
138138
found = true
139139
break

SeaBlock/data-updates/thermal-extractor.lua

Lines changed: 41 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ extractor.crafting_categories = { "sb-thermal-extractor" }
8989
extractor.fixed_recipe = "sb-thermal-extractor-water"
9090
bobmods.lib.tech.add_recipe_unlock("angels-thermal-water-extraction-2", "sb-thermal-extractor-water")
9191
move_item("angels-thermal-extractor", "angels-water-treatment-building", "f[thermal-extractor]-b[extractor]", "item")
92-
bobmods.lib.recipe.add_ingredient(
93-
"angels-thermal-extractor",
94-
{ type = "item", name = "angels-thermal-bore", amount = 1 }
95-
)
92+
bobmods.lib.recipe.add_ingredient("angels-thermal-extractor", { type = "item", name = "angels-thermal-bore", amount = 1 })
93+
extractor.vector_to_place_result = nil -- remove the yellow arrow of the mining drill
9694

9795
local bore = data.raw["mining-drill"]["angels-thermal-bore"]
9896
data.raw["mining-drill"]["angels-thermal-bore"] = nil
@@ -104,56 +102,49 @@ bore.fluid_boxes = {
104102
{
105103
production_type = "output",
106104
base_area = 1,
107-
base_level = 1,
108-
pipe_covers = pipecoverspictures(),
109-
pipe_connections = {
110-
{
111-
type = "output",
112-
position = { -5, -3 },
113-
},
114-
},
105+
volume = 500,
106+
pipe_covers = bore.output_fluid_box.pipe_covers,
107+
pipe_connections = bore.output_fluid_box.pipe_connections
115108
},
116109
}
117-
bore.animation = {
118-
north = makeextractorlayers(false, false),
119-
east = makeextractorlayers(true, true),
120-
south = makeextractorlayers(false, false),
121-
west = makeextractorlayers(true, true),
122-
}
123-
bore.crafting_categories = { "sb-thermal-bore" }
124-
bore.fixed_recipe = "sb-thermal-bore-water"
110+
bore.vector_to_place_result = nil
125111

126-
local function makesheet(sheet, count, d)
127-
local r = table.deepcopy(sheet)
128-
r.stripes = makestripes(r.filename, count)
129-
r.frame_count = count
130-
r.filename = nil
131-
r.x = r.width * d
132-
if r.hr_version then
133-
r.hr_version = makesheet(r.hr_version, count, d)
134-
end
135-
return r
136-
end
137-
local function makeborelayers(d)
138-
return {
112+
-- This is needed for the animation below
113+
bore.base_picture.sheet.line_length = 1
114+
bore.base_picture.sheet.repeat_count = 16
115+
116+
-- Edit animation to include output pipe facing north and south
117+
local working_animation = table.deepcopy(bore.graphics_set.animation.north)
118+
119+
--- This animation is a translation of the mining_drill but for an assembling_machine
120+
--- This is done because an assembling_machine has no base_picture so the northern and southern pipe extentions have to be added via animation
121+
bore.graphics_set.animation = {
122+
north = {
139123
layers = {
140-
makesheet(bore.base_picture.sheets[1], bore.animations.north.layers[1].frame_count, d),
141-
makesheet(bore.base_picture.sheets[2], bore.animations.north.layers[1].frame_count, d),
142-
bore.animations.north.layers[1],
143-
bore.animations.north.layers[2],
144-
},
145-
}
146-
end
147-
bore.animation = {
148-
north = makeborelayers(0),
149-
east = makeborelayers(1),
150-
south = makeborelayers(2),
151-
west = makeborelayers(3),
124+
table.deepcopy(bore.base_picture.sheet),
125+
working_animation
126+
}
127+
},
128+
east = working_animation,
129+
south = {
130+
layers = {
131+
table.deepcopy(bore.base_picture.sheet),
132+
working_animation
133+
}
134+
},
135+
west = working_animation,
152136
}
153-
bore.crafting_categories = { "thermal-bore" }
154-
bore.fixed_recipe = "thermal-bore-water"
155-
bobmods.lib.tech.add_recipe_unlock("thermal-water-extraction", "thermal-bore-water")
156-
move_item("thermal-bore", "water-treatment-building", "f[thermal-extractor]-a[bore]", "item")
137+
138+
-- Shift animation to make other pipe visible
139+
bore.graphics_set.animation.south.layers[1].x = 576
140+
141+
-- Reset animation speed for directions without additional layers
142+
bore.graphics_set.animation.east.animation_speed = 1
143+
bore.graphics_set.animation.west.animation_speed = 1
144+
145+
bore.crafting_categories = { "sb-thermal-bore" }
146+
bore.fixed_recipe = "sb-thermal-bore-water"
147+
bobmods.lib.tech.add_recipe_unlock("angels-thermal-water-extraction", "sb-thermal-bore-water")
157148
move_item("angels-thermal-bore", "angels-water-treatment-building", "f[thermal-extractor]-a[bore]", "item")
158149

159150
-- Fish Pressing requires thermal water so add a prerequisite
@@ -162,4 +153,4 @@ if data.raw.technology["angels-bio-pressing-fish"] then
162153
else
163154
bobmods.lib.tech.add_prerequisite("angels-bio-pressing-fish-1", "angels-thermal-water-extraction")
164155
end
165-
bobmods.lib.tech.add_prerequisite("angels-thermal-water-extraction", "angels-bio-processing-brown")
156+
bobmods.lib.tech.add_prerequisite("angels-thermal-water-extraction", "angels-bio-processing-brown")

SeaBlock/lib.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ function seablock.lib.substresult(name, from, to, count)
209209
end
210210
end
211211
end
212-
seablock.lib.recipeforeach(name, from, dosubst, "results")
213212
else
214213
log("Warning : seablock.lib.substresult - can't find recipe : " .. name)
215214
log(debug.traceback())

SeaBlock/migrations/SeaBlock_0.6.0.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local angelsmods = require("__angelsrefining__/prototypes/migration-functions")
2+
13
for _, surface in pairs(game.surfaces) do
24
for chunk in surface.get_chunks() do
35
angelsmods.migration.replace_item(surface.find_entities(chunk.area), {

0 commit comments

Comments
 (0)