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
4d91b966
Commit
4d91b966
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Fixed achievements borders ingame for various difficulties
parent
e9b7671c
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/interface/WorldAchievements.lua
+16
-5
16 additions, 5 deletions
game/modules/tome/class/interface/WorldAchievements.lua
with
16 additions
and
5 deletions
game/modules/tome/class/interface/WorldAchievements.lua
+
16
−
5
View file @
4d91b966
...
...
@@ -33,16 +33,19 @@ local PERMADEATH_INFINITE = 1
local
PERMADEATH_MANY
=
2
local
PERMADEATH_ONE
=
3
--- Make a new achievement with a name and desc
function
_M
:
newAchievement
(
t
)
t
.
id
=
t
.
id
or
t
.
name
t
.
id
=
t
.
id
:
upper
():
gsub
(
"
[
]
"
,
"_"
)
local
function
findTile
(
t
)
if
not
fs
.
exists
(
"/data/gfx/achievements/"
..
t
.
id
:
lower
()
..
".png"
)
then
t
.
image
=
"trophy_gold.png"
print
(
"Achievement with default image not found"
,
t
.
id
,
"/data/gfx/achievements/"
..
t
.
id
:
lower
()
..
".png"
)
else
t
.
image
=
"achievements/"
..
t
.
id
:
lower
()
..
".png"
end
end
--- Make a new achievement with a name and desc
function
_M
:
newAchievement
(
t
)
t
.
id
=
t
.
id
or
t
.
name
t
.
id
=
t
.
id
:
upper
():
gsub
(
"
[
]
"
,
"_"
)
findTile
(
t
)
WA
.
newAchievement
(
self
,
t
)
...
...
@@ -53,6 +56,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Roguelike)"
t2
.
difficulty
=
DIFFICULTY_NORMAL
t2
.
permadeath
=
PERMADEATH_ONE
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
-- Exploration
...
...
@@ -60,6 +64,7 @@ function _M:newAchievement(t)
t2
.
id
=
"EXPLORATION_"
..
t2
.
id
t2
.
name
=
t2
.
name
..
" (Exploration mode)"
t2
.
permadeath
=
PERMADEATH_INFINITE
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
-- Nightmare
...
...
@@ -68,6 +73,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Nightmare (Adventure) difficulty)"
t2
.
difficulty
=
DIFFICULTY_NIGHTMARE
t2
.
permadeath
=
PERMADEATH_MANY
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
local
t2
=
table
.
clone
(
t
)
...
...
@@ -75,6 +81,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Nightmare (Roguelike) difficulty)"
t2
.
difficulty
=
DIFFICULTY_NIGHTMARE
t2
.
permadeath
=
PERMADEATH_ONE
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
-- Insane
...
...
@@ -83,6 +90,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Insane (Adventure) difficulty)"
t2
.
difficulty
=
DIFFICULTY_INSANE
t2
.
permadeath
=
PERMADEATH_MANY
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
local
t2
=
table
.
clone
(
t
)
...
...
@@ -90,6 +98,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Insane (Roguelike) difficulty)"
t2
.
difficulty
=
DIFFICULTY_INSANE
t2
.
permadeath
=
PERMADEATH_ONE
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
-- Madness
...
...
@@ -98,6 +107,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Madness (Adventure) difficulty)"
t2
.
difficulty
=
DIFFICULTY_MADNESS
t2
.
permadeath
=
PERMADEATH_MANY
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
local
t2
=
table
.
clone
(
t
)
...
...
@@ -105,6 +115,7 @@ function _M:newAchievement(t)
t2
.
name
=
t2
.
name
..
" (Madness (Roguelike) difficulty)"
t2
.
difficulty
=
DIFFICULTY_MADNESS
t2
.
permadeath
=
PERMADEATH_ONE
findTile
(
t2
)
WA
.
newAchievement
(
self
,
t2
)
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