1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-08 00:39:30 +02:00

walls to player force

This commit is contained in:
MewMew 2019-10-26 15:36:13 +02:00
parent f0ca6ef6ff
commit b453cd3301
2 changed files with 4 additions and 4 deletions

View File

@ -590,12 +590,12 @@ local function wall(surface, left_top, seed)
if y < 5 or y > 26 then
if y <= 15 then
if math_random(1, y + 1) == 1 then
local e = surface.create_entity({name = "stone-wall", position = p, force = "neutral"})
local e = surface.create_entity({name = "stone-wall", position = p, force = "player"})
e.minable = false
end
else
if math_random(1, 32 - y) == 1 then
local e = surface.create_entity({name = "stone-wall", position = p, force = "neutral"})
local e = surface.create_entity({name = "stone-wall", position = p, force = "player"})
e.minable = false
end
end

View File

@ -298,7 +298,7 @@ local function get_commmands(group)
for i = 1, steps, 1 do
group_position.x = group_position.x + vector[1]
group_position.y = group_position.y + vector[2]
local position = group.surface.find_non_colliding_position("small-biter", group_position, 64, 2)
local position = group.surface.find_non_colliding_position("small-biter", group_position, step_length, 2)
if position then
commands[#commands + 1] = {
type = defines.command.attack_area,
@ -331,7 +331,7 @@ local function get_commmands(group)
for i = 1, steps, 1 do
group_position.x = group_position.x + vector[1]
group_position.y = group_position.y + vector[2]
local position = group.surface.find_non_colliding_position("small-biter", group_position, 64, 1)
local position = group.surface.find_non_colliding_position("small-biter", group_position, step_length, 1)
if position then
commands[#commands + 1] = {
type = defines.command.attack_area,