Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
868f35e2
Commit
868f35e2
authored
11 years ago
by
sapier
Committed by
PilzAdam
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replace worldlist by generic filterlist implementation
parent
5c7ecdb7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
builtin/mainmenu.lua
+50
-28
50 additions, 28 deletions
builtin/mainmenu.lua
builtin/mainmenu_worldlist.lua
+122
-93
122 additions, 93 deletions
builtin/mainmenu_worldlist.lua
with
172 additions
and
121 deletions
builtin/mainmenu.lua
+
50
−
28
View file @
868f35e2
...
...
@@ -10,6 +10,7 @@ dofile(scriptpath .. DIR_DELIM .. "gamemgr.lua")
local
menu
=
{}
local
tabbuilder
=
{}
local
menubar
=
{}
local
worldlist
=
nil
--------------------------------------------------------------------------------
function
render_favourite
(
spec
,
render_details
)
...
...
@@ -166,7 +167,7 @@ function menu.update_gametype()
local
gamedetails
=
menu
.
lastgame
()
engine
.
set_topleft_text
(
gamedetails
.
name
)
world
list
.
set_
game
filter
(
gamedetails
.
id
)
filter
list
.
set_filter
criteria
(
worldlist
,
gamedetails
.
id
)
--background
local
background_set
=
false
...
...
@@ -208,7 +209,7 @@ end
--------------------------------------------------------------------------------
function
menu
.
reset_gametype
()
world
list
.
set_
game
filter
(
nil
)
filter
list
.
set_filter
criteria
(
worldlist
,
nil
)
menu
.
game_last_check
=
nil
local
path_background_texture
=
menu
.
basetexturedir
..
"menu_background.png"
...
...
@@ -246,6 +247,27 @@ end
function
init_globals
()
--init gamedata
gamedata
.
worldindex
=
0
worldlist
=
filterlist
.
create
(
engine
.
get_worlds
,
compare_worlds
,
function
(
element
,
uid
)
if
element
.
name
==
uid
then
return
true
end
return
false
end
,
--unique id compare fct
function
(
element
,
gameid
)
if
element
.
gameid
==
gameid
then
return
true
end
return
false
end
--filter fct
)
filterlist
.
add_sort_mechanism
(
worldlist
,
"alphabetic"
,
sort_worlds_alphabetic
)
filterlist
.
set_sortmode
(
worldlist
,
"alphabetic"
)
end
--------------------------------------------------------------------------------
...
...
@@ -309,7 +331,7 @@ end
function
menu
.
render_world_list
()
local
retval
=
""
local
current_worldlist
=
world
list
.
get_list
()
local
current_worldlist
=
filter
list
.
get_list
(
worldlist
)
for
i
,
v
in
ipairs
(
current_worldlist
)
do
if
retval
~=
""
then
...
...
@@ -371,7 +393,7 @@ end
--------------------------------------------------------------------------------
function
menu
.
update_last_game
()
local
current_world
=
world
list
.
get_raw_
world
(
local
current_world
=
filter
list
.
get_raw_
element
(
worldlist
,
engine
.
setting_get
(
"mainmenu_last_selected_world"
)
)
...
...
@@ -397,17 +419,17 @@ function menu.handle_key_up_down(fields,textlist,settingname)
if
oldidx
>
1
then
local
newidx
=
oldidx
-
1
engine
.
setting_set
(
settingname
,
world
list
.
get_engine_index
(
newidx
))
filter
list
.
get_engine_index
(
worldlist
,
newidx
))
end
end
if
fields
[
"key_down"
]
then
local
oldidx
=
engine
.
get_textlist_index
(
textlist
)
if
oldidx
<
world
list
.
size
()
then
if
oldidx
<
filter
list
.
size
(
worldlist
)
then
local
newidx
=
oldidx
+
1
engine
.
setting_set
(
settingname
,
world
list
.
get_engine_index
(
newidx
))
filter
list
.
get_engine_index
(
worldlist
,
newidx
))
end
end
end
...
...
@@ -508,7 +530,7 @@ end
--------------------------------------------------------------------------------
function
tabbuilder
.
dialog_delete_world
()
return
"label[2,2;Delete World \"" ..
world
list.get_raw_list()[menu.world_to_del].name .. "
\
"?]"
..
return
"label[2,2;Delete World \"" ..
filter
list.get_raw_list(
worldlist
)[menu.world_to_del].name .. "
\
"?]"
..
"button[3.5,4.2;2.6,0.5;world_delete_confirm;Yes]"
..
"button[6,4.2;2.8,0.5;world_delete_cancel;No]"
end
...
...
@@ -570,7 +592,7 @@ function tabbuilder.handle_create_world_buttons(fields)
local
message
=
nil
if
not
world
list
.
exists
(
worldname
)
then
if
not
filter
list
.
uid_
exists
(
worldlist
,
worldname
)
then
engine
.
setting_set
(
"mg_name"
,
fields
[
"dd_mapgen"
])
message
=
engine
.
create_world
(
worldname
,
gameindex
)
else
...
...
@@ -583,9 +605,9 @@ function tabbuilder.handle_create_world_buttons(fields)
menu
.
last_game
=
gameindex
engine
.
setting_set
(
"main_menu_last_game_idx"
,
gameindex
)
world
list
.
refresh
()
filter
list
.
refresh
(
worldlist
)
engine
.
setting_set
(
"mainmenu_last_selected_world"
,
world
list
.
engine_index_by_
name
(
worldname
))
filter
list
.
engine_index_by_
uid
(
worldlist
,
worldname
))
end
else
gamedata
.
errormessage
=
"No worldname given or no game selected"
...
...
@@ -608,10 +630,10 @@ function tabbuilder.handle_delete_world_buttons(fields)
if
fields
[
"world_delete_confirm"
]
then
if
menu
.
world_to_del
>
0
and
menu
.
world_to_del
<=
#
world
list
.
get_raw_list
()
then
menu
.
world_to_del
<=
#
filter
list
.
get_raw_list
(
worldlist
)
then
engine
.
delete_world
(
menu
.
world_to_del
)
menu
.
world_to_del
=
0
world
list
.
refresh
()
filter
list
.
refresh
(
worldlist
)
end
end
...
...
@@ -756,7 +778,7 @@ function tabbuilder.handle_server_buttons(fields)
end
if
event
.
typ
==
"CHG"
then
engine
.
setting_set
(
"mainmenu_last_selected_world"
,
world
list
.
get_engine_index
(
engine
.
get_textlist_index
(
"srv_worlds"
)))
filter
list
.
get_engine_index
(
worldlist
,
engine
.
get_textlist_index
(
"srv_worlds"
)))
end
end
...
...
@@ -783,7 +805,7 @@ function tabbuilder.handle_server_buttons(fields)
gamedata
.
password
=
fields
[
"te_passwd"
]
gamedata
.
port
=
fields
[
"te_serverport"
]
gamedata
.
address
=
""
gamedata
.
selected_world
=
world
list
.
get_engine_index
(
selected
)
gamedata
.
selected_world
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
menu
.
update_last_game
(
gamedata
.
selected_world
)
engine
.
start
()
...
...
@@ -799,12 +821,12 @@ function tabbuilder.handle_server_buttons(fields)
if
fields
[
"world_delete"
]
~=
nil
then
local
selected
=
engine
.
get_textlist_index
(
"srv_worlds"
)
if
selected
>
0
and
selected
<=
world
list
.
size
()
then
local
world
=
world
list
.
get_list
()[
selected
]
selected
<=
filter
list
.
size
(
worldlist
)
then
local
world
=
filter
list
.
get_list
(
worldlist
)[
selected
]
if
world
~=
nil
and
world
.
name
~=
nil
and
world
.
name
~=
""
then
menu
.
world_to_del
=
world
list
.
get_engine_index
(
selected
)
menu
.
world_to_del
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
tabbuilder
.
current_tab
=
"dialog_delete_world"
tabbuilder
.
is_dialog
=
true
tabbuilder
.
show_buttons
=
false
...
...
@@ -817,7 +839,7 @@ function tabbuilder.handle_server_buttons(fields)
if
fields
[
"world_configure"
]
~=
nil
then
selected
=
engine
.
get_textlist_index
(
"srv_worlds"
)
if
selected
>
0
then
modmgr
.
world_config_selected_world
=
world
list
.
get_engine_index
(
selected
)
modmgr
.
world_config_selected_world
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
if
modmgr
.
init_worldconfig
()
then
tabbuilder
.
current_tab
=
"dialog_configure_world"
tabbuilder
.
is_dialog
=
true
...
...
@@ -897,7 +919,7 @@ function tabbuilder.handle_singleplayer_buttons(fields)
if
event
.
typ
==
"CHG"
then
engine
.
setting_set
(
"mainmenu_last_selected_world"
,
world
list
.
get_engine_index
(
engine
.
get_textlist_index
(
"sp_worlds"
)))
filter
list
.
get_engine_index
(
worldlist
,
engine
.
get_textlist_index
(
"sp_worlds"
)))
end
end
...
...
@@ -916,7 +938,7 @@ function tabbuilder.handle_singleplayer_buttons(fields)
fields
[
"key_enter"
]
then
local
selected
=
engine
.
get_textlist_index
(
"sp_worlds"
)
if
selected
>
0
then
gamedata
.
selected_world
=
world
list
.
get_engine_index
(
selected
)
gamedata
.
selected_world
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
gamedata
.
singleplayer
=
true
menu
.
update_last_game
(
gamedata
.
selected_world
)
...
...
@@ -934,12 +956,12 @@ function tabbuilder.handle_singleplayer_buttons(fields)
if
fields
[
"world_delete"
]
~=
nil
then
local
selected
=
engine
.
get_textlist_index
(
"sp_worlds"
)
if
selected
>
0
and
selected
<=
world
list
.
size
()
then
local
world
=
world
list
.
get_list
()[
selected
]
selected
<=
filter
list
.
size
(
worldlist
)
then
local
world
=
filter
list
.
get_list
(
worldlist
)[
selected
]
if
world
~=
nil
and
world
.
name
~=
nil
and
world
.
name
~=
""
then
menu
.
world_to_del
=
world
list
.
get_engine_index
(
selected
)
menu
.
world_to_del
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
tabbuilder
.
current_tab
=
"dialog_delete_world"
tabbuilder
.
is_dialog
=
true
tabbuilder
.
show_buttons
=
false
...
...
@@ -952,7 +974,7 @@ function tabbuilder.handle_singleplayer_buttons(fields)
if
fields
[
"world_configure"
]
~=
nil
then
selected
=
engine
.
get_textlist_index
(
"sp_worlds"
)
if
selected
>
0
then
modmgr
.
world_config_selected_world
=
world
list
.
get_engine_index
(
selected
)
modmgr
.
world_config_selected_world
=
filter
list
.
get_engine_index
(
worldlist
,
selected
)
if
modmgr
.
init_worldconfig
()
then
tabbuilder
.
current_tab
=
"dialog_configure_world"
tabbuilder
.
is_dialog
=
true
...
...
@@ -1102,7 +1124,7 @@ end
--------------------------------------------------------------------------------
function
tabbuilder
.
tab_server
()
local
index
=
world
list
.
get_current_index
(
local
index
=
filter
list
.
get_current_index
(
worldlist
,
tonumber
(
engine
.
setting_get
(
"mainmenu_last_selected_world"
))
)
...
...
@@ -1154,7 +1176,7 @@ end
--------------------------------------------------------------------------------
function
tabbuilder
.
tab_singleplayer
()
local
index
=
world
list
.
get_current_index
(
local
index
=
filter
list
.
get_current_index
(
worldlist
,
tonumber
(
engine
.
setting_get
(
"mainmenu_last_selected_world"
))
)
...
...
@@ -1300,6 +1322,7 @@ engine.event_handler = function(event)
tabbuilder
.
is_dialog
=
false
tabbuilder
.
show_buttons
=
true
tabbuilder
.
current_tab
=
engine
.
setting_get
(
"main_menu_tab"
)
menu
.
update_gametype
()
update_menu
()
else
engine
.
close
()
...
...
@@ -1313,7 +1336,6 @@ end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
init_globals
()
worldlist
.
init
()
menu
.
init
()
tabbuilder
.
init
()
menubar
.
refresh
()
...
...
This diff is collapsed.
Click to expand it.
builtin/mainmenu_worldlist.lua
+
122
−
93
View file @
868f35e2
worldlist
=
{}
--------------------------------------------------------------------------------
-- Generic implementation of a filter/sortable list --
--------------------------------------------------------------------------------
filterlist
=
{}
--------------------------------------------------------------------------------
function
world
list
.
refresh
()
worldl
is
t
.
m_raw_
world
list
=
engine
.
get_worlds
()
world
list
.
process
()
function
filter
list
.
refresh
(
this
)
th
is
.
m_raw_list
=
this
.
m_raw_list_fct
()
filter
list
.
process
(
this
)
end
--------------------------------------------------------------------------------
function
worldlist
.
init
()
worldlist
.
m_gamefilter
=
nil
worldlist
.
m_sortmode
=
"alphabetic"
function
filterlist
.
create
(
raw_fct
,
compare_fct
,
uid_match_fct
,
filter_fct
)
assert
((
raw_fct
~=
nil
)
and
(
type
(
raw_fct
)
==
"function"
))
assert
((
compare_fct
~=
nil
)
and
(
type
(
compare_fct
)
==
"function"
))
local
this
=
{}
this
.
m_raw_list_fct
=
raw_fct
this
.
m_compare_fct
=
compare_fct
this
.
m_filter_fct
=
filter_fct
this
.
m_uid_match_fct
=
uid_match_fct
this
.
m_filtercriteria
=
nil
this
.
m_sortmode
=
"none"
this
.
m_sort_list
=
{}
worldl
is
t
.
m_processed_
world
list
=
nil
worldl
is
t
.
m_raw_
world
list
=
engine
.
get_worlds
()
th
is
.
m_processed_list
=
nil
th
is
.
m_raw_list
=
this
.
m_raw_list_fct
()
worldlist
.
process
()
filterlist
.
process
(
this
)
return
this
end
--------------------------------------------------------------------------------
function
worldlist
.
set_gamefilter
(
gameid
)
if
gameid
==
worldlist
.
m_gamefilter
then
function
filterlist
.
add_sort_mechanism
(
this
,
name
,
fct
)
this
.
m_sort_list
[
name
]
=
fct
end
--------------------------------------------------------------------------------
function
filterlist
.
set_filtercriteria
(
this
,
criteria
)
if
criteria
==
this
.
m_filtercriteria
then
return
end
worldl
is
t
.
m_
game
filter
=
gameid
world
list
.
process
()
th
is
.
m_filter
criteria
=
criteria
filter
list
.
process
(
this
)
end
--------------------------------------------------------------------------------
function
world
list
.
get_
game
filter
(
)
return
worldl
is
t
.
m_
game
filter
function
filter
list
.
get_filter
criteria
(
this
)
return
th
is
.
m_filter
criteria
end
--------------------------------------------------------------------------------
--supported sort mode "alphabetic|none"
function
world
list
.
set_sortmode
(
mode
)
if
(
mode
==
worldl
is
t
.
m_sortmode
)
then
function
filter
list
.
set_sortmode
(
this
,
mode
)
if
(
mode
==
th
is
.
m_sortmode
)
then
return
end
worldl
is
t
.
m_sortmode
=
mode
world
list
.
process
()
th
is
.
m_sortmode
=
mode
filter
list
.
process
(
this
)
end
--------------------------------------------------------------------------------
function
world
list
.
get_list
()
return
worldl
is
t
.
m_processed_
world
list
function
filter
list
.
get_list
(
this
)
return
th
is
.
m_processed_list
end
--------------------------------------------------------------------------------
function
world
list
.
get_raw_list
()
return
worldl
is
t
.
m_raw_
world
list
function
filter
list
.
get_raw_list
(
this
)
return
th
is
.
m_raw_list
end
--------------------------------------------------------------------------------
function
world
list
.
get_raw_
world
(
idx
)
function
filter
list
.
get_raw_
element
(
this
,
idx
)
if
type
(
idx
)
~=
"number"
then
idx
=
tonumber
(
idx
)
end
if
idx
~=
nil
and
idx
>
0
and
idx
<
#
worldl
is
t
.
m_raw_
world
list
then
return
worldl
is
t
.
m_raw_
world
list
[
idx
]
if
idx
~=
nil
and
idx
>
0
and
idx
<
#
th
is
.
m_raw_list
then
return
th
is
.
m_raw_list
[
idx
]
end
return
nil
end
--------------------------------------------------------------------------------
function
world
list
.
get_engine_index
(
world
listindex
)
assert
(
worldl
is
t
.
m_processed_
world
list
~=
nil
)
function
filter
list
.
get_engine_index
(
this
,
listindex
)
assert
(
th
is
.
m_processed_list
~=
nil
)
if
world
listindex
~=
nil
and
world
listindex
>
0
and
world
listindex
<=
#
worldl
is
t
.
m_processed_
world
list
then
local
entry
=
worldl
is
t
.
m_processed_
worldlist
[
world
listindex
]
if
listindex
~=
nil
and
listindex
>
0
and
listindex
<=
#
th
is
.
m_processed_list
then
local
entry
=
th
is
.
m_processed_
list
[
listindex
]
for
i
,
v
in
ipairs
(
worldl
is
t
.
m_raw_
world
list
)
do
for
i
,
v
in
ipairs
(
th
is
.
m_raw_list
)
do
if
worldlist
.
compare
(
v
,
entry
)
then
if
this
.
m_
compare
_fct
(
v
,
entry
)
then
return
i
end
end
...
...
@@ -84,16 +109,16 @@ function worldlist.get_engine_index(worldlistindex)
end
--------------------------------------------------------------------------------
function
world
list
.
get_current_index
(
world
listindex
)
assert
(
worldl
is
t
.
m_processed_
world
list
~=
nil
)
function
filter
list
.
get_current_index
(
this
,
listindex
)
assert
(
th
is
.
m_processed_list
~=
nil
)
if
world
listindex
~=
nil
and
world
listindex
>
0
and
world
listindex
<=
#
worldl
is
t
.
m_raw_
world
list
then
local
entry
=
worldl
is
t
.
m_raw_
worldlist
[
world
listindex
]
if
listindex
~=
nil
and
listindex
>
0
and
listindex
<=
#
th
is
.
m_raw_list
then
local
entry
=
th
is
.
m_raw_
list
[
listindex
]
for
i
,
v
in
ipairs
(
worldl
is
t
.
m_processed_
world
list
)
do
for
i
,
v
in
ipairs
(
th
is
.
m_processed_list
)
do
if
worldlist
.
compare
(
v
,
entry
)
then
if
this
.
m_
compare
_fct
(
v
,
entry
)
then
return
i
end
end
...
...
@@ -103,98 +128,102 @@ function worldlist.get_current_index(worldlistindex)
end
--------------------------------------------------------------------------------
function
world
list
.
process
()
assert
(
worldl
is
t
.
m_raw_
world
list
~=
nil
)
function
filter
list
.
process
(
this
)
assert
(
th
is
.
m_raw_list
~=
nil
)
if
worldl
is
t
.
m_sortmode
==
"none"
and
worldl
is
t
.
m_
game
filter
==
nil
then
worldl
is
t
.
m_processed_
world
list
=
worldl
is
t
.
m_raw_
world
list
if
th
is
.
m_sortmode
==
"none"
and
th
is
.
m_filter
criteria
==
nil
then
th
is
.
m_processed_list
=
th
is
.
m_raw_list
return
end
worldl
is
t
.
m_processed_
world
list
=
{}
th
is
.
m_processed_list
=
{}
for
i
,
v
in
ipairs
(
worldl
is
t
.
m_raw_
world
list
)
do
for
i
,
v
in
ipairs
(
th
is
.
m_raw_list
)
do
if
worldl
is
t
.
m_
game
filter
==
nil
or
v
.
gameid
==
worldl
is
t
.
m_
game
filter
then
table.insert
(
worldl
is
t
.
m_processed_
world
list
,
v
)
if
th
is
.
m_filter
criteria
==
nil
or
this
.
m_filter_fct
(
v
,
th
is
.
m_filter
criteria
)
then
table.insert
(
th
is
.
m_processed_list
,
v
)
end
end
if
worldl
is
t
.
m_sortmode
==
"none"
then
if
th
is
.
m_sortmode
==
"none"
then
return
end
if
worldlist
.
m_sortmode
==
"alphabetic"
then
worldlist
.
sort_alphabetic
()
end
end
--------------------------------------------------------------------------------
function
worldlist
.
compare
(
world1
,
world2
)
if
world1
.
path
~=
world2
.
path
then
return
false
end
if
world1
.
name
~=
world2
.
name
then
return
false
end
if
world1
.
gameid
~=
world2
.
gameid
then
return
false
if
this
.
m_sort_list
[
this
.
m_sortmode
]
~=
nil
and
type
(
this
.
m_sort_list
[
this
.
m_sortmode
])
==
"function"
then
this
.
m_sort_list
[
this
.
m_sortmode
](
this
)
end
return
true
end
--------------------------------------------------------------------------------
function
world
list
.
size
()
if
worldl
is
t
.
m_processed_
world
list
==
nil
then
function
filter
list
.
size
(
this
)
if
th
is
.
m_processed_list
==
nil
then
return
0
end
return
#
worldl
is
t
.
m_processed_
world
list
return
#
th
is
.
m_processed_list
end
--------------------------------------------------------------------------------
function
world
list
.
exists
(
worldname
)
for
i
,
v
in
ipairs
(
worldl
is
t
.
m_raw_
world
list
)
do
if
v
.
name
==
worldname
then
function
filter
list
.
uid_
exists
_raw
(
this
,
uid
)
for
i
,
v
in
ipairs
(
th
is
.
m_raw_list
)
do
if
this
.
m_uid_match_fct
(
v
,
uid
)
then
return
true
end
end
return
false
end
--------------------------------------------------------------------------------
function
world
list
.
engine_index_by_
name
(
worldname
)
local
world
count
=
0
local
world
idx
=
0
for
i
,
v
in
ipairs
(
worldl
is
t
.
m_raw_
world
list
)
do
if
v
.
name
==
worldname
then
world
count
=
world
count
+
1
world
idx
=
i
function
filter
list
.
engine_index_by_
uid
(
this
,
uid
)
local
element
count
=
0
local
element
idx
=
0
for
i
,
v
in
ipairs
(
th
is
.
m_raw_list
)
do
if
this
.
m_uid_match_fct
(
v
,
uid
)
then
element
count
=
element
count
+
1
element
idx
=
i
end
end
-- If there are more
world
s than one with same name
we
can't decide which
-- If there are more
element
s than one with same name
uid
can't decide which
-- one is meant. This shouldn't be possible but just for sure.
if
worldcount
>
1
then
worldidx
=
0
if
elementcount
>
1
then
elementidx
=
0
end
return
elementidx
end
--------------------------------------------------------------------------------
-- COMMON helper functions --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function
compare_worlds
(
world1
,
world2
)
if
world1
.
path
~=
world2
.
path
then
return
false
end
if
world1
.
name
~=
world2
.
name
then
return
false
end
if
world1
.
gameid
~=
world2
.
gameid
then
return
false
end
return
worldidx
return
true
end
--------------------------------------------------------------------------------
function
worldlist
.
sort
_alphabetic
()
function
sort_worlds
_alphabetic
(
this
)
table.sort
(
worldl
is
t
.
m_processed_
world
list
,
function
(
a
,
b
)
table.sort
(
th
is
.
m_processed_list
,
function
(
a
,
b
)
local
n1
=
a
.
name
local
n2
=
b
.
name
local
count
=
math.min
(
#
n1
,
#
n2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment