Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
yutio888
Tales of MajEyal
Commits
a5986dc6
Commit
a5986dc6
authored
13 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
better
git-svn-id:
http://svn.net-core.org/repos/t-engine4@4242
51575b47-30f0-44d4-a5cc-537603b46e54
parent
7bdd1c58
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
game/engines/default/engine/Module.lua
+11
-4
11 additions, 4 deletions
game/engines/default/engine/Module.lua
game/engines/default/engine/interface/ActorTalents.lua
+2
-3
2 additions, 3 deletions
game/engines/default/engine/interface/ActorTalents.lua
with
13 additions
and
7 deletions
game/engines/default/engine/Module.lua
+
11
−
4
View file @
a5986dc6
...
...
@@ -238,6 +238,7 @@ end
--- List all available addons
function
_M
:
loadAddons
(
mod
)
local
adds
=
{}
local
load
=
function
(
dir
)
local
add_def
=
loadfile
(
team
and
(
dir
..
"/mod/init.lua"
)
or
(
dir
..
"/init.lua"
))
if
add_def
then
...
...
@@ -246,14 +247,12 @@ function _M:loadAddons(mod)
add_def
()
if
engine
.
version_string
(
add
.
version
)
==
engine
.
version_string
(
mod
.
version
)
and
add
.
for_module
==
mod
.
short_name
then
print
(
"Binding addon"
,
add
.
long_name
)
if
add
.
superload
then
fs
.
mount
(
fs
.
getRealPath
(
dir
)
..
"/superload"
,
"/mod/addons/"
..
add
.
short_name
..
"/superload"
,
false
)
print
(
" * with superload"
)
end
if
add
.
overload
then
fs
.
mount
(
fs
.
getRealPath
(
dir
)
..
"/overload"
,
"/"
,
true
)
print
(
" * with overload"
)
end
add
.
dir
=
dir
adds
[
#
adds
+
1
]
=
add
end
end
end
local
adds
=
{}
for
i
,
short_name
in
ipairs
(
fs
.
list
(
"/addons/"
))
do
if
short_name
:
find
(
"^"
..
mod
.
short_name
..
"%-"
)
then
local
dir
=
"/addons/"
..
short_name
print
(
"Checking addon"
,
short_name
,
":: (as dir)"
,
fs
.
exists
(
dir
..
"/init.lua"
),
":: (as teaa)"
,
short_name
:
find
(
".teaa$"
),
""
)
...
...
@@ -262,6 +261,14 @@ function _M:loadAddons(mod)
elseif
short_name
:
find
(
".team$"
)
then
end
end
end
table.sort
(
adds
,
function
(
a
,
b
)
return
a
.
weight
<
b
.
weight
end
)
for
i
,
add
in
ipairs
(
adds
)
do
print
(
"Binding addon"
,
add
.
long_name
)
if
add
.
superload
then
fs
.
mount
(
fs
.
getRealPath
(
add
.
dir
)
..
"/superload"
,
"/mod/addons/"
..
add
.
short_name
..
"/superload"
,
false
)
print
(
" * with superload"
)
end
if
add
.
overload
then
fs
.
mount
(
fs
.
getRealPath
(
add
.
dir
)
..
"/overload"
,
"/"
,
true
)
print
(
" * with overload"
)
end
end
end
--- Make a module loadscreen
...
...
This diff is collapsed.
Click to expand it.
game/engines/default/engine/interface/ActorTalents.lua
+
2
−
3
View file @
a5986dc6
...
...
@@ -28,9 +28,7 @@ _M.talents_types_def = {}
--- Defines actor talents
-- Static!
function
_M
:
loadDefinition
(
file
,
env
)
local
f
,
err
=
loadfile
(
file
)
if
not
f
and
err
then
error
(
err
)
end
setfenv
(
f
,
setmetatable
(
env
or
{
local
f
,
err
=
util
.
loadfilemods
(
file
,
setmetatable
(
env
or
{
DamageType
=
require
(
"engine.DamageType"
),
Particles
=
require
(
"engine.Particles"
),
Talents
=
self
,
...
...
@@ -39,6 +37,7 @@ function _M:loadDefinition(file, env)
newTalentType
=
function
(
t
)
self
:
newTalentType
(
t
)
end
,
load
=
function
(
f
)
self
:
loadDefinition
(
f
,
getfenv
(
2
))
end
},
{
__index
=
_G
}))
if
not
f
and
err
then
error
(
err
)
end
f
()
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