1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-03 14:53:01 +02:00

Merge pull request #730 from linaori/fix-retailer-on-death

Fixes a crash when updating coin label after GUI is closed
This commit is contained in:
Lynn 2019-02-02 13:47:14 +01:00 committed by GitHub
commit b04aa7b5c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,6 +567,7 @@ Gui.on_click(item_button_name, function (event)
redraw_market_items(data)
PlayerStats.change_coin_spent(player.index, cost)
do_coin_label(coin_count - cost, data.coin_label)
raise_event(Retailer.events.on_market_purchase, {
item = item,
@ -574,8 +575,6 @@ Gui.on_click(item_button_name, function (event)
player = player,
group_name = market_group,
})
do_coin_label(coin_count - cost, data.coin_label)
end)
---Add a market to the group_name retailer.