[0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Sat Feb 08, 2020 1:25 am
by GregoriusT
I am just wtf about this. Look at that Screenshot. The Dead Biters are me just nuking ones I already made, and then I created more somehow by placing Ghost Landfill, and the Landfill doesn't even get placed.
I have no Idea if or which Mods cause this or if this is Vanilla.
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Sat Feb 08, 2020 3:34 am
by Honktown
Mind doing a log(serpent.block(data.raw)) in the last-loaded mod's data-final-fixes and posting the factorio-current.log?
Edit: nvm, we're on the same version, I'll run through and see if there's anything fun
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
function struct_construction_denial(entity, event)
if not (entity and entity.valid) then return end
if entity.force.name == "neutral" or entity.force.name == "enemy" or entity.force.get_friend(game.forces["enemy"]) then return end
if entity.type ~= "entity-ghost" and entity.type ~= "car" then
local area = {{
entity.position.x - construction_denial_range,
entity.position.y - construction_denial_range
}, {
entity.position.x + construction_denial_range,
entity.position.y + construction_denial_range
}}
local enemies = entity.surface.find_entities_filtered{
area= area,
force="enemy"}
for _, enemy in pairs(enemies) do
if (enemy.type == "unit-spawner" or enemy.type == "turret") and Util.vectors_delta_length(entity.position, enemy.position) < construction_denial_range then
-- deny construction
if entity.prototype.mineable_properties
and entity.prototype.mineable_properties.products
and entity.prototype.mineable_properties.products[1]
and entity.prototype.mineable_properties.products[1].type == "item" then
local stack = {name=entity.prototype.mineable_properties.products[1].name, amount=1}
if event and event.name == "on_dolly_moved" and event.start_pos and event.player_index then
entity.teleport(event.start_pos)
game.players[event.player_index].print{"construction_denied_by_enemy"}
return
elseif event
and event.name == defines.events.on_built_entity
and event.player_index
and game.players[event.player_index]
and game.players[event.player_index].connected
and game.players[event.player_index].can_insert(stack) then
local player = game.players[event.player_index];
player.print{"construction_denied_by_enemy"}
player.insert(stack)
-- fix foa autofill adding items before removal
-- don't do other inventories, fuel includes turret ammo slots for some reason
Util.transfer_inventory_loose(entity, player, defines.inventory.fuel)
else
entity.surface.create_entity{
name = "item-on-ground",
position = entity.position,
stack = stack}
end
end
if math.random() < 0.05 then
local spawn_type = math.random() < 0.25 and "small-spitter" or "small-biter"
entity.surface.create_entity{
name = spawn_type,
position = entity.position,
force="enemy"}
end
entity.destroy()
return
end
end
end
end
You're near enemy bugs, so it's making bugs.
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Sat Feb 08, 2020 5:20 am
by GregoriusT
Thank you for clarifying what exactly happened. So I will assume it is a Feature of the Mod of sorts? Not sure about that. XD
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Sat Feb 08, 2020 6:03 am
by Honktown
GregoriusT wrote: Sat Feb 08, 2020 5:20 am
Thank you for clarifying what exactly happened. So I will assume it is a Feature of the Mod of sorts? Not sure about that. XD
It's possible the author didn't realize tile-ghosts are actually entities of the type ghost-tile. It's a feature, not a bugbugs. I'd suggest reporting it since someone else is going to "???" if they run into it
do svidaniya
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Sat Feb 08, 2020 9:20 am
by Zanostra
I saw this happening a lot in my games,
never realised it's not a feature.
I always thought it was vanilla intended behavior to give te player a panelty for keep trying to build something near alien nests
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Thu Feb 13, 2020 12:40 pm
by mrvn
Zanostra wrote: Sat Feb 08, 2020 9:20 am
I saw this happening a lot in my games,
never realised it's not a feature.
I always thought it was vanilla intended behavior to give te player a panelty for keep trying to build something near alien nests
That's fine. The bug is that it happens for ghosts. It should only happen once a construction bot comes along and tries to build. Or blueprinting should simply fail from the start.
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Thu Feb 13, 2020 12:48 pm
by GregoriusT
Blueprinting DOES fail from the start (and still spawns Biters), just wanted to mention that.
Re: [0.17.79] Uhh I don't know how placing Landfill Ghosts causes Biters to magically show up
Posted: Thu Feb 13, 2020 3:28 pm
by mrvn
GregoriusT wrote: Thu Feb 13, 2020 12:48 pm
Blueprinting DOES fail from the start (and still spawns Biters), just wanted to mention that.
I mend fail without biter. The code that creates the bitter makes the blueprint fail as it misinterprets it as actual building.