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
3bcff3ca
Commit
3bcff3ca
authored
9 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
When mousing over a zone change there will be a minimum level indicator in the tooltip
parent
496d0186
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/Grid.lua
+24
-0
24 additions, 0 deletions
game/modules/tome/class/Grid.lua
with
24 additions
and
0 deletions
game/modules/tome/class/Grid.lua
+
24
−
0
View file @
3bcff3ca
...
...
@@ -176,6 +176,30 @@ function _M:tooltip(x, y)
tstr
:
add
(
true
)
end
if
self
.
change_zone
then
-- Lets make very very sure that funky weird zone files dont explode things
local
ok
,
data
=
pcall
(
function
()
local
fakezone
=
{
short_name
=
self
.
change_zone
}
local
base
=
engine
.
Zone
.
getBaseName
(
fakezone
)
local
f
=
loadfile
(
base
..
"/zone.lua"
)
if
f
then
setfenv
(
f
,
setmetatable
({
self
=
fakezone
,
short_name
=
fakezone
.
short_name
},
{
__index
=
_G
}))
local
ok
,
z
=
pcall
(
f
)
return
z
end
end
)
if
ok
and
data
then
if
data
.
level_range
then
local
p
=
game
:
getPlayer
(
true
)
local
color
=
"AQUAMARINE"
if
p
.
level
<=
data
.
level_range
[
1
]
-
10
then
color
=
"CRIMSON"
elseif
p
.
level
<=
data
.
level_range
[
1
]
-
4
then
color
=
"ORANGE"
end
tstr
:
add
(
true
,
{
"font"
,
"bold"
},
{
"color"
,
color
},
"Min.level: "
..
data
.
level_range
[
1
],
{
"color"
,
"LAST"
},
{
"font"
,
"normal"
},
true
)
end
end
end
if
game
.
level
.
entrance_glow
and
self
.
change_zone
and
not
game
.
visited_zones
[
self
.
change_zone
]
then
tstr
:
add
(
true
,
{
"font"
,
"bold"
},
{
"color"
,
"CRIMSON"
},
"Never visited yet"
,
{
"color"
,
"LAST"
},
{
"font"
,
"normal"
},
true
)
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