actually use the state pointer

This commit is contained in:
FaceDeer 2023-01-07 15:11:14 -07:00
parent 725ddd9b8c
commit 9550a6000b

View File

@ -574,14 +574,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local refresh = false local refresh = false
local state = formspec_state[player_name] local state = formspec_state[player_name]
if fields.type_select then if fields.type_select then
formspec_state[player_name].selected_type = fields.type_select state.selected_type = fields.type_select
refresh = true refresh = true
end end
if fields.waypoint_table then if fields.waypoint_table then
local table_event = minetest.explode_table_event(fields.waypoint_table) local table_event = minetest.explode_table_event(fields.waypoint_table)
if table_event.type == "CHG" then if table_event.type == "CHG" then
formspec_state[player_name].row_index = table_event.row state.row_index = table_event.row
refresh = true refresh = true
end end
end end