Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spnati
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPNATI Utilities Bot
spnati
Commits
040c5a6a
Commit
040c5a6a
authored
6 years ago
by
FarawayVision
Browse files
Options
Downloads
Patches
Plain Diff
Add not-markers attribute to epilogue tag
parent
368033ea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/spniEpilogue.js
+14
-2
14 additions, 2 deletions
js/spniEpilogue.js
with
14 additions
and
2 deletions
js/spniEpilogue.js
+
14
−
2
View file @
040c5a6a
...
@@ -81,7 +81,7 @@ function loadEpilogueData(player){
...
@@ -81,7 +81,7 @@ function loadEpilogueData(player){
}
}
}
}
/* 'markers' attribute: the epilogue will only be selectable if the character has ALL markers within the attribute set. */
/* 'markers' attribute: the epilogue will only be selectable if the character has ALL markers
listed
within the attribute set. */
var
all_marker_attr
=
$
(
this
).
attr
(
'
markers
'
);
var
all_marker_attr
=
$
(
this
).
attr
(
'
markers
'
);
if
(
all_marker_attr
)
{
if
(
all_marker_attr
)
{
var
must_match_markers
=
all_marker_attr
.
split
(
'
'
);
var
must_match_markers
=
all_marker_attr
.
split
(
'
'
);
...
@@ -93,7 +93,19 @@ function loadEpilogueData(player){
...
@@ -93,7 +93,19 @@ function loadEpilogueData(player){
}
}
}
}
/* 'any-markers' attribute: the epilogue will only be selectable if the character has at least ONE of the markers within the attribute set. */
/* 'not-markers' attribute: the epilogue will only be selectable if the character has NO markers listed within the attribute set. */
var
no_marker_attr
=
$
(
this
).
attr
(
'
not-markers
'
);
if
(
no_marker_attr
)
{
var
must_not_match_markers
=
no_marker_attr
.
split
(
'
'
);
for
(
let
marker
of
must_not_match_markers
)
{
if
(
marker
in
players
[
player
].
markers
)
{
// if the given marker is present, don't make this epilogue selectable
return
false
;
}
}
}
/* 'any-markers' attribute: the epilogue will only be selectable if the character has at least ONE of the markers listed within the attribute set. */
var
any_marker_attr
=
$
(
this
).
attr
(
'
any-markers
'
);
var
any_marker_attr
=
$
(
this
).
attr
(
'
any-markers
'
);
if
(
any_marker_attr
)
{
if
(
any_marker_attr
)
{
var
one_must_match_markers
=
any_marker_attr
.
split
(
'
'
);
var
one_must_match_markers
=
any_marker_attr
.
split
(
'
'
);
...
...
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