mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Merge pull request #1175 from Refactorio/fix_coin_spill
Fixed coin pickup on entity death
This commit is contained in:
commit
5d35e50e27
@ -447,6 +447,7 @@ local function do_coin_drop(entity_name, entity, cause)
|
|||||||
if player and player.valid then
|
if player and player.valid then
|
||||||
local coins = {name = "coin", count = count}
|
local coins = {name = "coin", count = count}
|
||||||
if player.can_insert(coins) then
|
if player.can_insert(coins) then
|
||||||
|
player.insert(coins)
|
||||||
entity.surface.create_entity{name="flying-text", position = {position.x - 1, position.y}, text = "+" .. count .. " [img=item.coin]", color = {1, 0.8, 0, 0.5}, render_player_index = player.index}
|
entity.surface.create_entity{name="flying-text", position = {position.x - 1, position.y}, text = "+" .. count .. " [img=item.coin]", color = {1, 0.8, 0, 0.5}, render_player_index = player.index}
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user