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:
parent
c20aad6e78
commit
6549ad7c12
@ -161,11 +161,15 @@ function CoinGathering.register(config)
|
||||
ceil(5 * evolution_multiplier * modifier)
|
||||
)
|
||||
|
||||
entity.surface.create_entity({
|
||||
local coin = entity.surface.create_entity({
|
||||
name = 'item-on-ground',
|
||||
position = entity.position,
|
||||
stack = {name = 'coin', count = count}
|
||||
})
|
||||
|
||||
if coin and coin.valid then
|
||||
coin.to_be_looted = true
|
||||
end
|
||||
end)
|
||||
|
||||
local mining_coin_chance = config.mining_coin_chance
|
||||
@ -181,11 +185,15 @@ function CoinGathering.register(config)
|
||||
return
|
||||
end
|
||||
|
||||
entity.surface.create_entity({
|
||||
local coin = entity.surface.create_entity({
|
||||
name = 'item-on-ground',
|
||||
position = entity.position,
|
||||
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)
|
||||
|
||||
if config.display_chest_locations then
|
||||
|
Loading…
Reference in New Issue
Block a user