1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Autoloot coins in diggy that are dropped

This commit is contained in:
Lynn 2018-12-10 22:09:21 +01:00
parent c20aad6e78
commit 6549ad7c12

View File

@ -161,11 +161,15 @@ function CoinGathering.register(config)
ceil(5 * evolution_multiplier * modifier) ceil(5 * evolution_multiplier * modifier)
) )
entity.surface.create_entity({ local coin = entity.surface.create_entity({
name = 'item-on-ground', name = 'item-on-ground',
position = entity.position, position = entity.position,
stack = {name = 'coin', count = count} stack = {name = 'coin', count = count}
}) })
if coin and coin.valid then
coin.to_be_looted = true
end
end) end)
local mining_coin_chance = config.mining_coin_chance local mining_coin_chance = config.mining_coin_chance
@ -181,11 +185,15 @@ function CoinGathering.register(config)
return return
end end
entity.surface.create_entity({ local coin = entity.surface.create_entity({
name = 'item-on-ground', name = 'item-on-ground',
position = entity.position, position = entity.position,
stack = {name = 'coin', count = random(mining_coin_amount_min, mining_coin_amount_max)} stack = {name = 'coin', count = random(mining_coin_amount_min, mining_coin_amount_max)}
}) })
if coin and coin.valid then
coin.to_be_looted = true
end
end) end)
if config.display_chest_locations then if config.display_chest_locations then