Skip to content

Commit b4de7ed

Browse files
committed
Misc fixes
1 parent 7195f48 commit b4de7ed

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

data-final-fixes.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require "__FreightForwarding__.prototypes.fuel-categories"
22

3-
do return end -- TODO 2.0 collision
4-
3+
--[[ TODO 2.0 collision
54
local collision_mask_util = require "__core__.lualib.collision-mask-util"
65
76
data.raw["resource"]["ff-seamount"].collision_mask = { "resource-layer", non_deep_water_mask, "ground-tile" }
@@ -70,6 +69,7 @@ for _, tile in pairs(data.raw.tile) do
7069
end
7170
end
7271
collision_mask_util.add_layer(data.raw.pipe["ff-underwater-pipe"].collision_mask, underwater_pipe_layer)
72+
]]
7373

7474
-- Science
7575
for _, tech in pairs(data.raw.technology) do

prototypes/offshore-tank.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ data:extend{
9393
pipe_connections =
9494
{
9595
{ flow_direction = "input-output", direction = defines.direction.north, position = {0, -2} },
96-
{ flow_direction = "input-output", direction = defines.direction.east, position = {0, 2} },
97-
{ flow_direction = "input-output", direction = defines.direction.south, position = {-2, 0} },
98-
{ flow_direction = "input-output", direction = defines.direction.west, position = {2, 0} },
96+
{ flow_direction = "input-output", direction = defines.direction.south, position = {0, 2} },
97+
{ flow_direction = "input-output", direction = defines.direction.west, position = {-2, 0} },
98+
{ flow_direction = "input-output", direction = defines.direction.east, position = {2, 0} },
9999
},
100100
production_type = "input-output",
101101
},

prototypes/recipe.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ x_util.replace_ingredient("lex-flying-gunship", "steel-plate", "titanium-plate")
2727
x_util.replace_ingredient("lex-flying-cargo", "steel-plate", "titanium-plate")
2828
x_util.replace_ingredient("lex-flying-heavyship", "steel-plate", "titanium-plate")
2929

30-
--x_util.add_ingredient("rocket-control-unit", "ff-charged-battery-pack", 1)
30+
--x_util.add_ingredient("rocket-control-unit", "ff-charged-battery-pack", 1) -- TODO 2.0 RCU?
3131
--x_util.add_prerequisite("rocket-control-unit", "ff-battery-pack")
3232

3333
x_util.replace_ingredient("satellite", "accumulator", "ff-charged-battery-pack")
34-
x_util.add_prerequisite("space-science-pack", "ff-battery-pack")
34+
x_util.add_prerequisite("rocket-silo", "ff-battery-pack")

prototypes/sonar-buoy.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ data:extend({
103103
filter = "crude-oil",
104104
pipe_connections = {
105105
{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} },
106-
{ flow_direction = "input", direction = defines.direction.east, position = {0, 1} },
107-
{ flow_direction = "input", direction = defines.direction.south, position = {-1, 0} },
108-
{ flow_direction = "input", direction = defines.direction.west, position = {1, 0} },
106+
{ flow_direction = "input", direction = defines.direction.south, position = {0, 1} },
107+
{ flow_direction = "input", direction = defines.direction.west, position = {-1, 0} },
108+
{ flow_direction = "input", direction = defines.direction.east, position = {1, 0} },
109109
}
110110
}
111111
},

scripts/chunk-util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ end
4040
function ChunkUtil.is_chunk_land(chunk_position, surface)
4141
-- 1024 tiles in a chunk
4242
local area = ChunkUtil.chunk_position_to_area(chunk_position)
43-
local ground_tiles = surface.count_tiles_filtered { area = area, collision_mask = {layers={ground_tile=true}}}
43+
local ground_tiles = surface.count_tiles_filtered { area = area, collision_mask = {ground_tile=true}}
4444
return ground_tiles > 64
4545
end
4646

scripts/life-ring.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ end
4949

5050
local function on_tick()
5151
for _, player in pairs(game.players) do
52-
local tile = player.surface.get_tile(player.position.x, player.position.y)
52+
local tile = player.surface.get_tile(player.physical_position.x, player.physical_position.y)
5353
if not tile or not tile.valid then goto continue end
5454
local tile_name = tile.name
5555
if (tile_name == "water" or tile_name == "deepwater")
@@ -114,7 +114,7 @@ local function on_tick()
114114
for _, splash_position in pairs(splash_positions) do
115115
player.surface.create_entity{
116116
name = "ff-life-ring-splash",
117-
position = add_offset(add_offset(player.position, splash_position), offset),
117+
position = add_offset(add_offset(player.physical_position, splash_position), offset),
118118
}
119119
end
120120
else

scripts/seismic-scanning.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ local function on_scanner_built(event)
7676

7777
scanner.backer_name = ""
7878
local surface = scanner.surface
79-
local water_tile_count = surface.count_tiles_filtered { position = scanner.position, radius = min_tiles_from_water, collision_mask = {layers={water_tile = true}}, limit = 1 }
79+
local water_tile_count = surface.count_tiles_filtered { position = scanner.position, radius = min_tiles_from_water, collision_mask = {water_tile = true}, limit = 1 }
8080
if water_tile_count > 0 then
8181
scanner.active = false
8282
if event.player_index then

0 commit comments

Comments
 (0)