1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-20 03:29:26 +02:00

Fix directions

This commit is contained in:
RedRafe 2024-10-26 11:42:46 +02:00
parent 3a4a6e5d0f
commit b13820e713
9 changed files with 22 additions and 23 deletions

View File

@ -40,7 +40,6 @@ Event.add(defines.events.on_player_deconstructed_area, function(event)
-- check if the player has given the decon planner an icon. This is how we will determine their intention
if not cursor_stack.preview_icons or not cursor_stack.preview_icons[1] or not cursor_stack.preview_icons[1].signal.name then
log(cursor_stack.preview_icons[1].signal.name)
return
end

View File

@ -872,9 +872,9 @@ function Public.make_4_way(data)
local dir = entity.direction or 0
set_entity(north, i, entity)
set_entity(east, i2, change_direction(entity, (dir + 2) % 8))
set_entity(south, i3, change_direction(entity, (dir + 4) % 8))
set_entity(west, i4, change_direction(entity, (dir + 6) % 8))
set_entity(east, i2, change_direction(entity, (dir + 4) % 16))
set_entity(south, i3, change_direction(entity, (dir + 8) % 16))
set_entity(west, i4, change_direction(entity, (dir + 12) % 16))
end
end
end

View File

@ -12,7 +12,7 @@ return ob.make_1_way {
[8] = {entity = {name = 'artillery-turret', callback = 'turret'}, tile = 'refined-concrete'},
[9] = {tile = 'refined-concrete'},
[10] = {tile = 'refined-concrete'},
[11] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 2}, tile = 'refined-concrete'},
[11] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 4}, tile = 'refined-concrete'},
[12] = {tile = 'refined-concrete'},
[13] = {tile = 'refined-concrete'},
[14] = {tile = 'refined-concrete'},
@ -27,10 +27,10 @@ return ob.make_1_way {
[23] = {tile = 'refined-concrete'},
[24] = {tile = 'refined-concrete'},
[25] = {tile = 'refined-concrete'},
[26] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 6}, tile = 'refined-concrete'},
[26] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 12}, tile = 'refined-concrete'},
[27] = {tile = 'refined-concrete'},
[28] = {tile = 'refined-concrete'},
[29] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 4}, tile = 'refined-concrete'},
[29] = {entity = {name = 'artillery-turret', callback = 'turret', direction = 8}, tile = 'refined-concrete'},
[30] = {tile = 'refined-concrete'},
[31] = {tile = 'refined-concrete'},
[32] = {tile = 'refined-concrete'},

View File

@ -59,7 +59,7 @@ local level3 =
[12] = {tile = 'refined-concrete'},
[13] = {tile = 'refined-concrete'},
[14] = {tile = 'refined-concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 4, callback = 'factory'}, tile = 'refined-concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 8, callback = 'factory'}, tile = 'refined-concrete'},
[16] = {tile = 'refined-concrete'},
[17] = {tile = 'refined-concrete'},
[18] = {tile = 'refined-concrete'},

View File

@ -87,7 +87,7 @@ return ob.make_walls{
[25] = {entity = {name = 'stone-wall'}},
[26] = {tile = 'refined-hazard-concrete-left'},
[27] = {
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 6, offset = 2},
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 12, offset = 2},
tile = 'refined-hazard-concrete-left'
},
[28] = {tile = 'refined-hazard-concrete-left'},
@ -114,7 +114,7 @@ return ob.make_walls{
[9] = {tile = 'refined-hazard-concrete-left'},
[10] = {tile = 'refined-hazard-concrete-left'},
[11] = {
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 6, offset = 2},
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 12, offset = 2},
tile = 'refined-hazard-concrete-left'
},
[12] = {tile = 'refined-hazard-concrete-left'},

View File

@ -78,7 +78,7 @@ return ob.make_walls{
},
[16] = {tile = 'refined-hazard-concrete-left'},
[17] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[18] = {tile = 'refined-hazard-concrete-left'},
@ -91,7 +91,7 @@ return ob.make_walls{
[25] = {entity = {name = 'stone-wall'}},
[26] = {entity = {name = 'stone-wall'}},
[27] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[28] = {tile = 'refined-hazard-concrete-left'},
@ -109,12 +109,12 @@ return ob.make_walls{
[1] = {entity = {name = 'stone-wall'}},
[2] = {entity = {name = 'stone-wall'}},
[3] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[4] = {tile = 'refined-hazard-concrete-left'},
[5] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[6] = {tile = 'refined-hazard-concrete-left'},
@ -125,17 +125,17 @@ return ob.make_walls{
[11] = {tile = 'refined-hazard-concrete-left'},
[12] = {tile = 'refined-hazard-concrete-left'},
[13] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[14] = {tile = 'refined-hazard-concrete-left'},
[15] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[16] = {tile = 'refined-hazard-concrete-left'},
[17] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[18] = {tile = 'refined-hazard-concrete-left'},
@ -146,12 +146,12 @@ return ob.make_walls{
[23] = {tile = 'refined-hazard-concrete-left'},
[24] = {tile = 'refined-hazard-concrete-left'},
[25] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[26] = {tile = 'refined-hazard-concrete-left'},
[27] = {
entity = {name = 'laser-turret', callback = 'turret', direction = 2, offset = 3},
entity = {name = 'laser-turret', callback = 'turret', direction = 4, offset = 3},
tile = 'refined-hazard-concrete-left'
},
[28] = {tile = 'refined-hazard-concrete-left'},

View File

@ -75,7 +75,7 @@ return ob.make_walls{
[25] = {entity = {name = 'stone-wall'}},
[26] = {tile = 'hazard-concrete-left'},
[27] = {
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 6, offset = 2},
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 12, offset = 2},
tile = 'hazard-concrete-left'
},
[28] = {tile = 'hazard-concrete-left'},
@ -102,7 +102,7 @@ return ob.make_walls{
[9] = {tile = 'hazard-concrete-left'},
[10] = {tile = 'concrete'},
[11] = {
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 6, offset = 2},
entity = {name = 'flamethrower-turret', callback = 'flame_turret', direction = 12, offset = 2},
tile = 'concrete'
},
[12] = {tile = 'concrete'},

View File

@ -59,7 +59,7 @@ local level3 =
[12] = {tile = 'concrete'},
[13] = {tile = 'refined-concrete'},
[14] = {tile = 'refined-concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 4, callback = 'factory'}, tile = 'refined-concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 8, callback = 'factory'}, tile = 'refined-concrete'},
[16] = {tile = 'refined-concrete'},
[17] = {tile = 'refined-concrete'},
[18] = {tile = 'concrete'},

View File

@ -59,7 +59,7 @@ local level3 =
[12] = {tile = 'stone-path'},
[13] = {tile = 'concrete'},
[14] = {tile = 'concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 4, callback = 'factory'}, tile = 'concrete'},
[15] = {entity = {name = 'oil-refinery', direction = 8, callback = 'factory'}, tile = 'concrete'},
[16] = {tile = 'concrete'},
[17] = {tile = 'concrete'},
[18] = {tile = 'stone-path'},