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

Don't build near gates

This commit is contained in:
blubFisch 2022-10-08 16:58:45 +01:00
parent c381b29724
commit 70f872f460
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ local table_insert = table.insert
local table_size = table.size
local ScenarioTable = require 'maps.scrap_towny_ffa.table'
local town_zoning_entity_types = { "wall", "electric-pole", "ammo-turret", "electric-turret", "fluid-turret"}
local town_zoning_entity_types = { "wall", "gate", "electric-pole", "ammo-turret", "electric-turret", "fluid-turret"}
-- these should be allowed to place inside any base by anyone as neutral
local neutral_whitelist = {

View File

@ -809,7 +809,9 @@ local function kill_force(force_name, cause)
for _, e in pairs(surface.find_entities_filtered({force = force_name})) do
if e.valid then
e.force = game.forces['neutral']
e.create_ghost_on_death = false
if e.create_ghost_on_death ~= nil then
e.create_ghost_on_death = false
end
local damage = math_random() * 2.5 - 0.5
if damage > 0 then
if damage >= 1 or e.health == nil then