Skip to content

Commit

Permalink
ensure receive correct events
Browse files Browse the repository at this point in the history
  • Loading branch information
lmst2 committed Oct 29, 2024
1 parent 542b0b3 commit 4cbf0f1
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2793,19 +2793,21 @@ local function on_gui_selection_state_changed(event)

local trader = player_mem.opened_trader

if trader and nix ~= nil then
if prefix == "dpn_blkmkt_qlt_" then

if trader and nix ~= nil then


local order = trader.orders[nix]

if order then
order.quality = event.element.selected_index
local order = trader.orders[nix]

if order then
order.quality = event.element.selected_index
end

compute_trader_data(trader,true)
-- update_menu_trader(player,player_mem,true)
end

compute_trader_data(trader,true)
-- update_menu_trader(player,player_mem,true)
end

end

script.on_event(defines.events.on_gui_selection_state_changed, on_gui_selection_state_changed)
Expand Down

0 comments on commit 4cbf0f1

Please sign in to comment.