1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-02-09 13:37:05 +02:00

Fix collision layers

This commit is contained in:
RedRafe 2024-10-26 10:39:09 +02:00
parent 26e1c28dc0
commit 9ed64a66a5
33 changed files with 46 additions and 46 deletions

View File

@ -365,7 +365,7 @@ water = b.change_tile(water, true, 'water')
water = b.any {b.rectangle(16, 4), b.rectangle(4, 16), water}
local start = b.if_else(water, b.full_shape)
start = b.change_map_gen_collision_tile(start, 'water-tile', 'grass-1')
start = b.change_map_gen_collision_tile(start, 'water_tile', 'grass-1')
local map = b.choose(ore_circle, start, b.full_shape)

View File

@ -50,7 +50,7 @@ local function build_map()
wave_islands = b.rotate(wave_islands, degrees(45))
local map = b.change_map_gen_collision_tile(wave_islands, 'water-tile', 'grass-1')
local map = b.change_map_gen_collision_tile(wave_islands, 'water_tile', 'grass-1')
map = b.scale(map, 2)
pig = b.scale(pig, 64 / 320)

View File

@ -302,7 +302,7 @@ local map = b.if_else(shape_islands, shape2_islands)
map = b.choose(mediumn_dot, start, map)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.fish(map, 0.0025)

View File

@ -758,7 +758,7 @@ local function to_shape(blocks, part_size, on_init)
return tile
end
return b.change_map_gen_collision_hidden_tile(shape, 'water-tile', 'grass-1')
return b.change_map_gen_collision_hidden_tile(shape, 'water_tile', 'grass-1')
end
Public.to_shape = to_shape

View File

@ -429,7 +429,7 @@ local function init(config)
local start_outpost = outpost_builder:do_outpost(thin_walls, on_init)
start_outpost = b.change_tile(start_outpost, false, true)
start_outpost = b.change_map_gen_collision_tile(start_outpost, 'water-tile', 'grass-1')
start_outpost = b.change_map_gen_collision_tile(start_outpost, 'water_tile', 'grass-1')
local start_patch = b.circle(9)
local start_iron_patch =
@ -944,7 +944,7 @@ local function init(config)
local spawn_shape = outpost_builder.to_shape(spawn, 8, on_init)
spawn_shape = b.change_tile(spawn_shape, false, 'stone-path')
spawn_shape = b.change_map_gen_collision_hidden_tile(spawn_shape, 'water-tile', 'grass-1')
spawn_shape = b.change_map_gen_collision_hidden_tile(spawn_shape, 'water_tile', 'grass-1')
map = b.choose(b.rectangle(16, 16), spawn_shape, map)

View File

@ -16,6 +16,6 @@ local pattern =
local map = b.grid_pattern(pattern, 2, 2, pic.width * scale_factor, pic.height * scale_factor)
map = b.translate(map, 128 * scale_factor, 26 * scale_factor)
map = b.change_map_gen_collision_tile(map, "water-tile", "grass-1")
map = b.change_map_gen_collision_tile(map, "water_tile", "grass-1")
return map

View File

@ -17,7 +17,7 @@ pic = b.decompress(pic)
local shape = b.picture(pic)
--map = b.change_map_gen_collision_tile(map, "water-tile", "grass-1")
--map = b.change_map_gen_collision_tile(map, "water_tile", "grass-1")
local pattern = {
{shape, b.flip_x(shape)},

View File

@ -155,7 +155,7 @@ return function(config)
local main_ores_shape = b.any {raw_spawn_shape, ores_part}
main_ores_shape = b.choose(tree, main_ores_shape, b.empty_shape)
main_ores_shape = b.any {star, baubel_ore, main_ores_shape, sea}
main_ores_shape = b.change_map_gen_collision_tile(main_ores_shape, 'water-tile', 'grass-2')
main_ores_shape = b.change_map_gen_collision_tile(main_ores_shape, 'water_tile', 'grass-2')
return main_ores_shape
end

View File

@ -22,7 +22,7 @@ local function spawn_builder(config)
local start = b.if_else(water, spawn_circle)
start = b.change_tile(start, true, spawn_tile)
return b.change_map_gen_collision_tile(start, 'water-tile', spawn_tile)
return b.change_map_gen_collision_tile(start, 'water_tile', spawn_tile)
end
local function tile_builder_factory(config)

View File

@ -90,7 +90,7 @@ for i = 1, count - 1 do
local c = lines_circle
c = b.apply_entity(c, resources[i])
c = b.change_map_gen_collision_tile(c, 'water-tile', 'grass-1')
c = b.change_map_gen_collision_tile(c, 'water_tile', 'grass-1')
c = b.translate(c, x, 0)
table.insert(lines, c)
@ -156,7 +156,7 @@ local start =
start = b.any {start, big_circle}
map = b.choose(big_circle, start, map)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.scale(map, 5, 5)

View File

@ -244,7 +244,7 @@ start = b.apply_entity(start, b.any {start_iron, start_copper, start_stone, star
map = b.if_else(start, map)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
local sea = b.tile('water')
sea = b.fish(sea, 0.0025)

View File

@ -78,12 +78,12 @@ local coal = b.resource(b.circle(6), 'coal', value(600, 0.6))
local uranium = b.resource(b.circle(4), 'uranium-ore', value(400, 1))
local oil = b.resource(b.throttle_world_xy(b.circle(6), 1, 4, 1, 4), 'crude-oil', value(100000, 50))
--[[ local iron_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, iron), 'water-tile', 'grass-1')
local copper_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, copper), 'water-tile', 'grass-1')
local stone_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, stone), 'water-tile', 'grass-1')
local coal_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, coal), 'water-tile', 'grass-1')
local uranium_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, uranium), 'water-tile', 'grass-1')
local oil_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, oil), 'water-tile', 'grass-1') ]]
--[[ local iron_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, iron), 'water_tile', 'grass-1')
local copper_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, copper), 'water_tile', 'grass-1')
local stone_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, stone), 'water_tile', 'grass-1')
local coal_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, coal), 'water_tile', 'grass-1')
local uranium_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, uranium), 'water_tile', 'grass-1')
local oil_ball = b.change_map_gen_collision_tile(b.apply_entity(ball, oil), 'water_tile', 'grass-1') ]]
local iron_ball = b.apply_entity(ball, iron)
local copper_ball = b.apply_entity(ball, copper)
local stone_ball = b.apply_entity(ball, stone)
@ -177,7 +177,7 @@ end
map = b.translate(map, 0, -19669)
map = b.scale(map, 2, 2)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.change_tile(map, false, 'water')
map = b.fish(map, 0.0025)

View File

@ -230,7 +230,7 @@ end
local map = b.grid_pattern_full_overlap(pattern, p_cols, p_rows, 128, 128)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
local sea = b.change_tile(b.full_shape, true, 'water')
sea = b.fish(sea, 0.00125)

View File

@ -42,6 +42,6 @@ map = b.translate(map, -20, 20)
map = b.scale(map, 4, 4)
map = b.change_tile(map, false, "water")
map = b.change_map_gen_collision_tile(map, "water-tile", "grass-1")
map = b.change_map_gen_collision_tile(map, "water_tile", "grass-1")
return map

View File

@ -114,6 +114,6 @@ local pattern =
}
local map = b.grid_pattern(pattern, 2, 2, pic.width, pic.height + t - 105)
map = b.change_map_gen_collision_tile(map,"water-tile", "water-green")
map = b.change_map_gen_collision_tile(map, "water_tile", "water-green")
return map

View File

@ -316,7 +316,7 @@ map = b.apply_entity(map, enemy)
map = b.any {map, paths, resource_islands, sea}
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
local function on_init()
local surface = RS.get_surface()

View File

@ -194,7 +194,7 @@ local paths =
local sea = b.tile('deepwater')
sea = b.fish(sea, 0.0025)
map = b.any {map, paths, sea}
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
-- Disable landfill technology
local function on_init()

View File

@ -194,7 +194,7 @@ sea = b.fish(sea, 0.0025)
map = b.any {map, paths, sea}
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.rotate(map,degrees(45))

View File

@ -176,7 +176,7 @@ map = b.scale(map, scale_factor, scale_factor)
-- make starting area
local start_region = b.rectangle(block_length * scale_factor, block_width * scale_factor)
map = b.subtract(map, start_region)
start_region = b.change_map_gen_collision_tile(start_region, 'water-tile', 'landfill')
start_region = b.change_map_gen_collision_tile(start_region, 'water_tile', 'landfill')
start_region = b.remove_map_gen_resources(start_region)
local start_water = b.change_tile(b.circle(5), true, 'water')
map = b.any {start_water, start_region, map}

View File

@ -41,15 +41,15 @@ walk_spiral2 = b.choose(b.circle(72), b.empty_shape, walk_spiral2)
local map = b.circular_spiral_grow_pattern(16, 32, 512, {tree, iron, stone, coal, rock, copper, uranium, oil})
local start_cirle = b.circle(64)
start_cirle = b.change_map_gen_collision_tile(start_cirle, 'water-tile', 'grass-1')
local start_circle = b.circle(64)
start_circle = b.change_map_gen_collision_tile(start_circle, 'water_tile', 'grass-1')
local spawn_water = b.circle(4)
spawn_water = b.translate(spawn_water, 0, 6)
spawn_water = b.change_tile(spawn_water, true, 'water')
spawn_water = b.fish(spawn_water, 1)
start_cirle = b.any {spawn_water, start_cirle}
start_circle = b.any {spawn_water, start_circle}
map = b.any {start_cirle, walk_spiral1, map, walk_spiral2}
map = b.any {start_circle, walk_spiral1, map, walk_spiral2}
local worm_names = {
'small-worm-turret',

View File

@ -155,7 +155,7 @@ start_circle = b.translate(start_circle, -32, -0)
map = b.any {start_circle, map}
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.scale(map, 3, 3)

View File

@ -191,7 +191,7 @@ local function build_map()
local start_coal = b.resource(small_circle, ores[4].resource, constant(700))
local start_segmented = b.segment_pattern({start_iron, start_copper, start_stone, start_coal})
local start_shape = b.change_map_gen_collision_tile(small_circle, 'water-tile', 'grass-1')
local start_shape = b.change_map_gen_collision_tile(small_circle, 'water_tile', 'grass-1')
start_shape = b.apply_entity(start_shape, start_segmented)
start_shape = b.translate(start_shape, 0, 48)
start_shape = b.any {start_shape, b.full_shape}

View File

@ -328,7 +328,7 @@ for _ = 1, number_blocks do
end
local map = b.grid_pattern(blocks_pattern, number_blocks, number_blocks, blocks_size, blocks_size)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.fish(map, 0.00125)
map = b.translate(map, 191, -1825)

View File

@ -15,7 +15,7 @@ pic = b.decompress(pic)
local shape = b.picture(pic)
local map = b.single_pattern(shape, pic.width, pic.height)
map = b.change_map_gen_collision_tile(map, "water-tile", "grass-1")
map = b.change_map_gen_collision_tile(map, "water_tile", "grass-1")
map = b.change_tile(map, false, "water")
map = b.scale(map, 5, 5)

View File

@ -383,7 +383,7 @@ end
local map = b.grid_pattern_full_overlap(pattern, p_cols, p_rows, 500, 500)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
local sea = b.change_tile(apple, false, 'water')
sea = b.fish(sea, 0.005)

View File

@ -75,8 +75,8 @@ local function no_rocks(_, _, world, tile)
end
local start = b.full_shape
start = b.change_map_gen_collision_tile(start, 'ground-tile', 'refined-concrete')
start = b.change_map_gen_collision_hidden_tile(start, 'ground-tile', 'lab-dark-2')
start = b.change_map_gen_collision_tile(start, 'ground_tile', 'refined-concrete')
start = b.change_map_gen_collision_hidden_tile(start, 'ground_tile', 'lab-dark-2')
local map = b.if_else(start, b.full_shape)
map = b.apply_effect(map, no_rocks)

View File

@ -99,7 +99,7 @@ landfill_water = b.translate(landfill_water, -(width_2 / 2 + width_3 / 2), 0)
landfill_water = b.remove_map_gen_enemies(landfill_water)
landfill_water = b.change_map_gen_collision_tile(landfill_water, 'water-tile', 'landfill')
landfill_water = b.change_map_gen_collision_tile(landfill_water, 'water_tile', 'landfill')
landfill_water = b.subtract(landfill_water, b.translate(b.rectangle(256, 256), -256, 0))
-- landfill_water = b.change_tile(landfill_water, true, 'lab-white')

View File

@ -17,7 +17,7 @@ landfill_water = b.translate(landfill_water, safe_zone_width/2, 0)
landfill_water = b.remove_map_gen_enemies(landfill_water)
landfill_water = b.change_map_gen_collision_tile(landfill_water, 'water-tile', 'landfill')
landfill_water = b.change_map_gen_collision_tile(landfill_water, 'water_tile', 'landfill')
-- landfill_water = b.change_tile(landfill_water, true, 'lab-white')
@ -53,7 +53,7 @@ water = b.translate(water, -35, 0)
start_resources = b.add(start_resources, water)
start_resources = b.translate(start_resources, (safe_zone_width/2 - 60), 0)
start_resources = b.change_map_gen_collision_tile(start_resources, 'water-tile', 'landfill')
start_resources = b.change_map_gen_collision_tile(start_resources, 'water_tile', 'landfill')
start_resources = b.remove_map_gen_enemies(start_resources)
limited_safe_zone = b.add(start_resources, limited_safe_zone)

View File

@ -183,7 +183,7 @@ end
map = b.apply_entity(map, resources_shape)
map = b.apply_entity(map, worms)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
map = b.change_tile(map, false, 'water')
map = b.fish(map, 0.0025)

View File

@ -103,7 +103,7 @@ start_spiral = b.translate(start_spiral, 0, -5)
map = b.choose(b.rectangle(96), start_spiral, map)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
local sea = b.tile('water')
sea = b.fish(sea, 0.00125)

View File

@ -84,7 +84,7 @@ local centre =b.circle(18)
--local centre = b.rectangle(5,5)
--local centre = b.scale(chamfer, 0.08,0.08)
map = b.if_else(centre, map)
centre = b.change_map_gen_collision_tile(centre, 'ground-tile', 'stone-path')
centre = b.change_map_gen_collision_tile(centre, 'ground_tile', 'stone-path')
-- the coordinates at which the standard market and spawn will be created
local startx = 0
local starty = 0

View File

@ -260,7 +260,7 @@ water = b.change_tile(water, true, 'water-green')
water = b.any {b.rectangle(16, 4), b.rectangle(4, 16), water}
local start = b.if_else(water, b.full_shape)
start = b.change_map_gen_collision_tile(start, 'water-tile', 'grass-1')
start = b.change_map_gen_collision_tile(start, 'water_tile', 'grass-1')
local map = b.choose(ore_circle, start, b.full_shape)

View File

@ -363,6 +363,6 @@ map = b.apply_entity(map, ore_shape)
map = b.apply_entity(map, loot)
map = b.apply_entity(map, enemy)
map = b.change_map_gen_collision_tile(map, 'water-tile', 'grass-1')
map = b.change_map_gen_collision_tile(map, 'water_tile', 'grass-1')
return map