1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-13 13:49:33 +02:00

fix for admin log bug which was always going back to mutagen log using dropdown

This commit is contained in:
Masamune 2020-02-08 09:40:28 +01:00
parent e24d8547f5
commit 864eb97e88

View File

@ -206,20 +206,23 @@ end)
local function on_gui_selection_state_changed(event) local function on_gui_selection_state_changed(event)
local player = game.players[event.player_index] local player = game.players[event.player_index]
if not event.element.valid then return end
local name = event.element.name local name = event.element.name
if global.dropdown_users_choice_force == nil then if global.dropdown_users_choice_force == nil then
initialize_dropdown_users_choice() initialize_dropdown_users_choice()
end end
if name == "dropdown-force" then if name == "dropdown-force" then
global.dropdown_users_choice_force[player.name] = event.element.selected_index global.dropdown_users_choice_force[player.name] = event.element.selected_index
build_config_gui(player, frame_sciencelogs)
end end
if name == "dropdown-science" then if name == "dropdown-science" then
global.dropdown_users_choice_science[player.name] = event.element.selected_index global.dropdown_users_choice_science[player.name] = event.element.selected_index
build_config_gui(player, frame_sciencelogs)
end end
if name == "dropdown-evofilter" then if name == "dropdown-evofilter" then
global.dropdown_users_choice_evo_filter[player.name] = event.element.selected_index global.dropdown_users_choice_evo_filter[player.name] = event.element.selected_index
build_config_gui(player, frame_sciencelogs)
end end
build_config_gui(player, frame_sciencelogs)
end end
event.add(defines.events.on_gui_selection_state_changed, on_gui_selection_state_changed) event.add(defines.events.on_gui_selection_state_changed, on_gui_selection_state_changed)