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
a594963a
Commit
a594963a
authored
9 years ago
by
Diego Martínez
Committed by
ShadowNinja
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix world config menu ignoring `name` in `mod.conf`.
parent
735e3b70
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
builtin/mainmenu/modmgr.lua
+18
-18
18 additions, 18 deletions
builtin/mainmenu/modmgr.lua
with
18 additions
and
18 deletions
builtin/mainmenu/modmgr.lua
+
18
−
18
View file @
a594963a
...
...
@@ -19,29 +19,29 @@
function
get_mods
(
path
,
retval
,
modpack
)
local
mods
=
core
.
get_dir_list
(
path
,
true
)
for
i
=
1
,
#
mods
,
1
do
if
mods
[
i
]:
sub
(
1
,
1
)
~=
"."
then
for
_
,
name
in
ipairs
(
mods
)
do
if
name
:
sub
(
1
,
1
)
~=
"."
then
local
prefix
=
path
..
DIR_DELIM
..
name
..
DIR_DELIM
local
toadd
=
{}
local
modpackfile
=
nil
table.insert
(
retval
,
toadd
)
toadd
.
name
=
mods
[
i
]
toadd
.
path
=
path
..
DIR_DELIM
..
mods
[
i
]
..
DIR_DELIM
if
modpack
~=
nil
and
modpack
~=
""
then
toadd
.
modpack
=
modpack
else
local
filename
=
path
..
DIR_DELIM
..
mods
[
i
]
..
DIR_DELIM
..
"modpack.txt"
local
error
=
nil
modpackfile
,
error
=
io.open
(
filename
,
"r"
)
local
mod_conf
=
Settings
(
prefix
..
"mod.conf"
):
to_table
()
if
mod_conf
.
name
then
name
=
mod_conf
.
name
end
if
modpackfil
e
~
=
n
il
then
modpackfile
:
close
()
toadd
.
is_modpack
=
true
table.insert
(
retval
,
toadd
)
get_mods
(
path
..
DIR_DELIM
..
mods
[
i
],
retval
,
mods
[
i
])
toadd
.
nam
e
=
n
ame
toadd
.
path
=
prefix
if
modpack
~=
nil
and
modpack
~=
""
then
toadd
.
modpack
=
modpack
else
table.insert
(
retval
,
toadd
)
local
modpackfile
=
io.open
(
prefix
..
"modpack.txt"
)
if
modpackfile
then
modpackfile
:
close
()
toadd
.
is_modpack
=
true
get_mods
(
prefix
,
retval
,
name
)
end
end
end
end
...
...
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