From 3771c1ac6667858fcc8fc79d85a1750659c08110 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Sat, 27 May 2023 17:43:18 +0200 Subject: [PATCH] Mtn v3 - fix coin bug --- maps/mountain_fortress_v3/entities.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maps/mountain_fortress_v3/entities.lua b/maps/mountain_fortress_v3/entities.lua index 1d573d12..28123ef1 100644 --- a/maps/mountain_fortress_v3/entities.lua +++ b/maps/mountain_fortress_v3/entities.lua @@ -742,10 +742,12 @@ local function on_player_mined_entity(event) if random(1, 3) == 1 then give_coin(player) end - else + elseif entity.type == 'simple-entity-with-owner' then if random(1, 6) == 1 then give_coin(player) end + else + give_coin(player) end if rpg_char.stone_path then entity.surface.set_tiles({{name = 'stone-path', position = entity.position}}, true)