mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
undo land-mine change
This commit is contained in:
parent
1f04171a7c
commit
5d2bb86e8f
@ -342,13 +342,13 @@ local function spawn_unit_group()
|
||||
set_group_spawn_position(surface)
|
||||
local pos = wave_defense_table.spawn_position
|
||||
if not surface.can_place_entity({name = "small-biter", position = pos}) then return end
|
||||
--local radius = 10
|
||||
--local area = {left_top = {pos.x - radius, pos.y - radius}, right_bottom = {pos.x + radius, pos.y + radius}}
|
||||
|
||||
local radius = 10
|
||||
local area = {left_top = {pos.x - radius, pos.y - radius}, right_bottom = {pos.x + radius, pos.y + radius}}
|
||||
for k,v in pairs(surface.find_entities_filtered{area = area, name = "land-mine"}) do if v and v.valid then v.die() end end
|
||||
|
||||
BiterRolls.wave_defense_set_unit_raffle(wave_defense_table.wave_number)
|
||||
|
||||
--for k,v in pairs(surface.find_entities_filtered{area = area, name = "land-mine"}) do if v and v.valid then v.die() end end
|
||||
|
||||
debug_print("Spawning unit group at x" .. wave_defense_table.spawn_position.x .." y" .. wave_defense_table.spawn_position.y)
|
||||
local unit_group = surface.create_unit_group({position = wave_defense_table.spawn_position, force = "enemy"})
|
||||
local group_size = math_floor(wave_defense_table.average_unit_group_size * group_size_modifier_raffle[math_random(1, group_size_modifier_raffle_size)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user