notherbase-fs 1.1.18 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/the-front.js +2 -0
- package/package.json +1 -1
- package/test/test-index.js +50 -0
- package/test/views/index.ejs +9 -0
- package/views/explorer.ejs +2 -2
- package/views/inventory.ejs +26 -24
package/controllers/the-front.js
CHANGED
|
@@ -52,6 +52,7 @@ let front = function front(detail) {
|
|
|
52
52
|
externalStyles: detail.options.externalStyles,
|
|
53
53
|
main: detail.options.main,
|
|
54
54
|
scripts: detail.options.scripts,
|
|
55
|
+
inventory: foundInventory,
|
|
55
56
|
query: req.query
|
|
56
57
|
});
|
|
57
58
|
}
|
|
@@ -63,6 +64,7 @@ let front = function front(detail) {
|
|
|
63
64
|
externalStyles: detail.options.externalStyles,
|
|
64
65
|
main: detail.options.main,
|
|
65
66
|
scripts: detail.options.scripts,
|
|
67
|
+
inventory: foundInventory,
|
|
66
68
|
query: req.query
|
|
67
69
|
});
|
|
68
70
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const notherbase = require("../index");
|
|
2
|
+
|
|
3
|
+
const world = {
|
|
4
|
+
explorer: {
|
|
5
|
+
name: "explorer",
|
|
6
|
+
dirname: __dirname,
|
|
7
|
+
options: {},
|
|
8
|
+
void: "void",
|
|
9
|
+
regions: [
|
|
10
|
+
{
|
|
11
|
+
name: "coast",
|
|
12
|
+
dirname: __dirname,
|
|
13
|
+
options: {},
|
|
14
|
+
areas: [
|
|
15
|
+
{
|
|
16
|
+
name: "tall-beach",
|
|
17
|
+
dirname: __dirname,
|
|
18
|
+
options: {},
|
|
19
|
+
pois: [
|
|
20
|
+
{
|
|
21
|
+
name: "nono-cove",
|
|
22
|
+
dirname: __dirname,
|
|
23
|
+
options: {},
|
|
24
|
+
details: [
|
|
25
|
+
{
|
|
26
|
+
name: "",
|
|
27
|
+
options: {}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
theFront: {
|
|
38
|
+
name: "the-front",
|
|
39
|
+
dirname: __dirname,
|
|
40
|
+
options: {},
|
|
41
|
+
details: [
|
|
42
|
+
{
|
|
43
|
+
name: "",
|
|
44
|
+
options: {}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
notherbase.start(world);
|
package/views/explorer.ejs
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
<main class="override">
|
|
13
13
|
<%- include(`${main}.ejs`); %>
|
|
14
14
|
|
|
15
|
-
<%- include(
|
|
15
|
+
<%- include("./inventory.ejs", {inventory: inventory}); %>
|
|
16
16
|
|
|
17
|
-
<%- include(
|
|
17
|
+
<%- include("./contact.ejs"); %>
|
|
18
18
|
</main>
|
|
19
19
|
|
|
20
20
|
<script>
|
package/views/inventory.ejs
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
<% if (inventory
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<% if (inventory) { %>
|
|
2
|
+
<% if (inventory.items) { %>
|
|
3
|
+
<div class="inventory invisible">
|
|
4
|
+
<% if (user.authLevels.length > 0) {
|
|
5
|
+
for (let i = 0; i < user.authLevels.length; i++) {
|
|
6
|
+
if (user.authLevels[i] === "Creator") { %>
|
|
7
|
+
|
|
8
|
+
<div class="item-spawner">
|
|
9
|
+
<input type="text" class="search">
|
|
10
|
+
<div class="search-results">
|
|
11
|
+
|
|
12
|
+
</div>
|
|
11
13
|
</div>
|
|
12
|
-
</div>
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
<% break;
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
|
-
}
|
|
17
|
-
} %>
|
|
18
|
+
} %>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
<div class="item-list">
|
|
21
|
+
</div>
|
|
20
22
|
</div>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
|
|
24
|
+
<button id="inventory-button">
|
|
25
|
+
<i class="fas fa-database"></i>
|
|
26
|
+
</button>
|
|
27
|
+
<% } else { %>
|
|
28
|
+
<button id="inventory-button">
|
|
29
|
+
ERR
|
|
30
|
+
</button>
|
|
31
|
+
<% } %>
|
|
30
32
|
<% } %>
|
|
31
33
|
|
|
32
34
|
<script>
|