From b453cd3301d5ffe7e96ffef6baf35525f40932b3 Mon Sep 17 00:00:00 2001 From: MewMew Date: Sat, 26 Oct 2019 15:36:13 +0200 Subject: [PATCH] walls to player force --- maps/mountain_fortress_v2/terrain.lua | 4 ++-- modules/wave_defense/main.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/maps/mountain_fortress_v2/terrain.lua b/maps/mountain_fortress_v2/terrain.lua index 3eba3d6e..65758de0 100644 --- a/maps/mountain_fortress_v2/terrain.lua +++ b/maps/mountain_fortress_v2/terrain.lua @@ -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 diff --git a/modules/wave_defense/main.lua b/modules/wave_defense/main.lua index 51c55003..0c825a93 100644 --- a/modules/wave_defense/main.lua +++ b/modules/wave_defense/main.lua @@ -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,