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
K'van
Tales of MajEyal
Commits
8ee5c99c
Commit
8ee5c99c
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Add range to the map tooltip
parent
f7dbe5af
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
+12
-3
12 additions, 3 deletions
game/modules/tome/class/Grid.lua
with
12 additions
and
3 deletions
game/modules/tome/class/Grid.lua
+
12
−
3
View file @
8ee5c99c
...
...
@@ -125,15 +125,23 @@ end
function
_M
:
tooltip
(
x
,
y
)
local
tstr
local
dist
=
nil
if
game
.
player
.
x
and
game
.
player
.
y
then
dist
=
tstring
{
" (range: "
,
{
"font"
,
"italic"
},
{
"color"
,
"LIGHT_GREEN"
},
tostring
(
core
.
fov
.
distance
(
game
.
player
.
x
,
game
.
player
.
y
,
x
,
y
)),
{
"color"
,
"LAST"
},
{
"font"
,
"normal"
},
")"
}
end
if
self
.
show_tooltip
then
local
name
=
((
self
.
show_tooltip
==
true
)
and
self
.
name
or
self
.
show_tooltip
)
if
self
.
desc
then
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
name
,
true
,
self
.
desc
,
true
}
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
name
}
if
dist
then
tstr
:
merge
(
dist
)
end
tstr
:
add
(
true
,
self
.
desc
,
true
)
else
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
name
,
true
}
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
name
}
if
dist
then
tstr
:
merge
(
dist
)
end
tstr
:
add
(
true
)
end
else
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
self
.
name
,
true
}
tstr
=
tstring
{{
"uid"
,
self
.
uid
},
self
.
name
}
if
dist
then
tstr
:
merge
(
dist
)
end
tstr
:
add
(
true
)
end
if
game
.
level
.
entrance_glow
and
self
.
change_zone
and
not
game
.
visited_zones
[
self
.
change_zone
]
then
...
...
@@ -147,6 +155,7 @@ function _M:tooltip(x, y)
if
self
:
attr
(
"air_level"
)
and
self
:
attr
(
"air_level"
)
<
0
then
tstr
:
add
({
"color"
,
"LIGHT_BLUE"
},
"Special breathing method required"
,
{
"color"
,
"LAST"
},
true
)
end
if
self
:
attr
(
"dig"
)
then
tstr
:
add
({
"color"
,
"LIGHT_UMBER"
},
"Diggable"
,
{
"color"
,
"LAST"
},
true
)
end
if
game
.
level
.
map
.
attrs
(
x
,
y
,
"no_teleport"
)
then
tstr
:
add
({
"color"
,
"VIOLET"
},
"Cannot teleport to this place"
,
{
"color"
,
"LAST"
},
true
)
end
if
config
.
settings
.
cheat
then
tstr
:
add
(
true
,
tostring
(
rawget
(
self
,
"type"
)),
" / "
,
tostring
(
rawget
(
self
,
"subtype"
)))
...
...
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