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
daed93e6
There was a problem fetching the pipeline summary.
Commit
daed93e6
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Added two new hooks "Quest:init" and "Quest:setStatus"
parent
93b597c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/engines/default/engine/Quest.lua
+5
-0
5 additions, 0 deletions
game/engines/default/engine/Quest.lua
with
5 additions
and
0 deletions
game/engines/default/engine/Quest.lua
+
5
−
0
View file @
daed93e6
...
...
@@ -42,6 +42,7 @@ function _M:init(q, who)
self
.
status
=
PENDING
self
.
objectives
=
{}
if
self
:
check
(
"on_grant"
,
who
)
then
self
.
do_not_gain
=
true
end
self
:
triggerHook
{
"Quest:init"
}
end
--- Checks if the quest (or sub-objective) is complete
...
...
@@ -88,6 +89,10 @@ end
-- @param[opt] sub sub-objective
-- @param who who did this??
function
_M
:
setStatus
(
status
,
sub
,
who
)
local
hk
=
{
"Quest:setStatus"
,
status
=
status
,
sub
=
sub
,
who
=
who
,
ret
=
false
}
if
self
:
triggerHook
(
hk
)
then
return
hk
.
ret
end
if
sub
then
if
self
.
objectives
[
sub
]
and
self
.
objectives
[
sub
]
==
status
then
return
false
end
self
.
objectives
[
sub
]
=
status
...
...
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