Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
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
pregmodfan
fc-pregmod
Commits
3f7f180b
Commit
3f7f180b
authored
5 years ago
by
lowercasedonkey
Browse files
Options
Downloads
Patches
Plain Diff
improve isClothingAvailable search HT svorn
parent
eb51432d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6135
Use setup for wardrobe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/js/itemAvailability.js
+31
-40
31 additions, 40 deletions
src/js/itemAvailability.js
with
31 additions
and
40 deletions
src/js/itemAvailability.js
+
31
−
40
View file @
3f7f180b
...
@@ -205,51 +205,42 @@ window.isClothingAccessible = function(string) {
...
@@ -205,51 +205,42 @@ window.isClothingAccessible = function(string) {
return
true
;
return
true
;
}
}
let
success
=
0
;
const
item
=
setup
.
clothes
.
find
((
i
)
=>
i
.
value
===
string
);
if
(
!
item
)
{
setup
.
clothes
.
forEach
(
item
=>
{
console
.
log
(
`
${
string
}
is not a registered piece of clothing! Check App.Data.Misc.`
);
if
(
item
.
value
===
string
)
{
return
false
;
/* couldn't be found */
if
(
!
(
item
.
hasOwnProperty
(
"
unlock
"
))
&&
!
(
item
.
hasOwnProperty
(
"
fs
"
)))
{
}
console
.
log
(
`
${
string
}
is free for everyone!`
);
if
(
!
(
item
.
hasOwnProperty
(
"
unlock
"
))
&&
!
(
item
.
hasOwnProperty
(
"
fs
"
)))
{
success
=
1
;
console
.
log
(
`
${
string
}
is free for everyone!`
);
return
true
;
}
if
(
item
.
hasOwnProperty
(
"
fs
"
))
{
if
(
V
.
arcologies
[
0
][
item
.
fs
]
>
0
)
{
console
.
log
(
`
${
string
}
is in FS!`
);
return
true
;
}
}
if
(
item
.
hasOwnProperty
(
"
unlock
"
))
{
let
keys
=
Object
.
keys
(
item
.
unlock
);
for
(
let
key
in
keys
)
{
if
(
keys
[
key
]
===
"
continent
"
&&
V
.
continent
===
item
.
unlock
[
keys
[
key
]])
{
console
.
log
(
`
${
string
}
is in continent!`
);
return
true
;
}
else
if
(
V
[
keys
[
key
]]
>
0
)
{
console
.
log
(
`
${
string
}
because
${
keys
[
key
]}
is true for us!`
);
return
true
;
return
true
;
}
}
if
(
item
.
hasOwnProperty
(
"
fs
"
))
{
}
if
(
V
.
arcologies
[
0
][
item
.
fs
]
>
0
)
{
// special case where they must both be true
console
.
log
(
`
${
string
}
is in FS!`
);
if
(
item
.
unlock
.
clothesBoughtSports
&&
item
.
unlock
.
clothesBoughtCasual
)
{
success
=
1
;
if
(
V
.
clothesBoughtSports
&&
V
.
clothesBoughtCasual
)
{
return
true
;
return
true
;
}
}
if
(
item
.
hasOwnProperty
(
"
unlock
"
))
{
let
keys
=
Object
.
keys
(
item
.
unlock
);
for
(
let
key
in
keys
)
{
if
(
keys
[
key
]
===
"
continent
"
&&
V
.
continent
===
item
.
unlock
[
keys
[
key
]])
{
console
.
log
(
`
${
string
}
is in continent!`
);
success
=
1
;
return
true
;
}
else
if
(
V
[
keys
[
key
]]
>
0
)
{
console
.
log
(
`
${
string
}
because
${
keys
[
key
]}
is true for us!`
);
success
=
1
;
return
true
;
}
}
// special case where they must both be true
if
(
item
.
unlock
.
clothesBoughtSports
&&
item
.
unlock
.
clothesBoughtCasual
)
{
if
(
V
.
clothesBoughtSports
&&
V
.
clothesBoughtCasual
)
{
success
=
1
;
return
true
;
}
}
}
}
console
.
log
(
"
this sucks, we couldn't get:
"
);
console
.
log
(
item
);
}
}
return
false
;
});
if
(
success
===
1
)
{
return
true
;
}
}
console
.
log
(
"
this sucks, we couldn't get:
"
);
console
.
log
(
item
);
return
false
;
};
};
/**
/**
...
...
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