Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
tome
Tales of MajEyal
Commits
16132bdf
Commit
16132bdf
authored
10 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
fixed display of 0 talents and 0 esps
parent
96cb8239
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
game/modules/tome/class/Object.lua
+10
-10
10 additions, 10 deletions
game/modules/tome/class/Object.lua
with
10 additions
and
10 deletions
game/modules/tome/class/Object.lua
+
10
−
10
View file @
16132bdf
...
...
@@ -1053,12 +1053,12 @@ function _M:getTextualDesc(compare_with, use_actor)
local
any_esp
=
false
local
esps_compare
=
{}
for
i
,
v
in
ipairs
(
compare_with
or
{})
do
if
v
[
field
]
and
v
[
field
].
esp_all
then
if
v
[
field
]
and
v
[
field
].
esp_all
and
v
[
field
].
esp_all
>
0
then
esps_compare
[
"All"
]
=
esps_compare
[
"All"
]
or
{}
esps_compare
[
"All"
][
1
]
=
true
any_esp
=
true
end
for
type
,
i
in
pairs
(
v
[
field
]
and
(
v
[
field
].
esp
or
{})
or
{})
do
for
type
,
i
in
pairs
(
v
[
field
]
and
(
v
[
field
].
esp
or
{})
or
{})
do
if
i
and
i
>
0
then
local
_
,
_
,
t
,
st
=
type
:
find
(
"^([^/]+)/?(.*)$"
)
local
esp
=
""
if
st
and
st
~=
""
then
...
...
@@ -1069,17 +1069,17 @@ function _M:getTextualDesc(compare_with, use_actor)
esps_compare
[
esp
]
=
esps_compare
[
esp
]
or
{}
esps_compare
[
esp
][
1
]
=
true
any_esp
=
true
end
end
end
end
local
esps
=
{}
if
w
.
esp_all
then
if
w
.
esp_all
and
w
.
esp_all
>
0
then
esps
[
#
esps
+
1
]
=
"All"
esps_compare
[
esps
[
#
esps
]]
=
esps_compare
[
esps
[
#
esps
]]
or
{}
esps_compare
[
esps
[
#
esps
]][
2
]
=
true
any_esp
=
true
end
for
type
,
i
in
pairs
(
w
.
esp
or
{})
do
for
type
,
i
in
pairs
(
w
.
esp
or
{})
do
if
i
and
i
>
0
then
local
_
,
_
,
t
,
st
=
type
:
find
(
"^([^/]+)/?(.*)$"
)
if
st
and
st
~=
""
then
esps
[
#
esps
+
1
]
=
t
:
capitalize
()
..
"/"
..
st
:
capitalize
()
...
...
@@ -1089,7 +1089,7 @@ function _M:getTextualDesc(compare_with, use_actor)
esps_compare
[
esps
[
#
esps
]]
=
esps_compare
[
esps
[
#
esps
]]
or
{}
esps_compare
[
esps
[
#
esps
]][
2
]
=
true
any_esp
=
true
end
end
end
if
any_esp
then
desc
:
add
(
"Grants telepathy: "
)
for
esp
,
isin
in
pairs
(
esps_compare
)
do
...
...
@@ -1178,18 +1178,18 @@ function _M:getTextualDesc(compare_with, use_actor)
local
learn_talents
=
{}
for
i
,
v
in
ipairs
(
compare_with
or
{})
do
if
v
[
field
]
and
v
[
field
].
learn_talent
then
for
tid
,
tl
in
pairs
(
v
[
field
].
learn_talent
)
do
for
tid
,
tl
in
pairs
(
v
[
field
].
learn_talent
)
do
if
tl
>
0
then
learn_talents
[
tid
]
=
learn_talents
[
tid
]
or
{}
learn_talents
[
tid
][
1
]
=
tl
any_learn_talent
=
any_learn_talent
+
1
end
end
end
end
end
for
tid
,
tl
in
pairs
(
w
.
learn_talent
or
{})
do
for
tid
,
tl
in
pairs
(
w
.
learn_talent
or
{})
do
if
tl
>
0
then
learn_talents
[
tid
]
=
learn_talents
[
tid
]
or
{}
learn_talents
[
tid
][
2
]
=
tl
any_learn_talent
=
any_learn_talent
+
1
end
end
end
if
any_learn_talent
>
0
then
desc
:
add
((
"Talent%s granted: "
):
format
(
any_learn_talent
>
1
and
"s"
or
""
))
for
tid
,
tl
in
pairs
(
learn_talents
)
do
...
...
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