1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-28 23:06:38 +02:00

mtn fortress changes

This commit is contained in:
Gerkiz 2020-10-30 10:45:12 +01:00
parent 3e35376e50
commit 24831460d3
3 changed files with 7 additions and 4 deletions

View File

@ -401,6 +401,9 @@ local function on_player_mined_entity(event)
return
end
hidden_biter_pet(event)
hidden_treasure(event)
if random(1, 32) == 1 then
hidden_biter(event.entity)
entity.destroy()
@ -415,8 +418,7 @@ local function on_player_mined_entity(event)
Traps(entity.surface, entity.position)
return
end
hidden_biter_pet(event)
hidden_treasure(event)
angry_tree(event.entity, game.players[event.player_index].character)
entity.destroy()
end

View File

@ -14,6 +14,7 @@ local blacklist = {
['locomotive'] = true,
['artillery-wagon'] = true,
['artillery-turret'] = true,
['landfill'] = true,
['fluid-wagon'] = true
}

View File

@ -797,7 +797,7 @@ Event.add(
defines.events.on_player_joined_game,
function(event)
local player = Game.get_player_by_index(event.player_index)
if not player then
if not player or not player.valid then
return
end
@ -809,7 +809,7 @@ Event.add(
defines.events.on_player_left_game,
function(event)
local player = Game.get_player_by_index(event.player_index)
if not player then
if not player or not player.valid then
return
end