notherbase-fs 1.1.21 → 1.1.25
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/authCheck.js +1 -1
- package/controllers/user.js +1 -1
- package/package.json +1 -1
- package/server.js +1 -0
- package/test/test-index.js +50 -0
- package/test/views/index.ejs +9 -0
- package/views/inventory.ejs +26 -24
package/controllers/authCheck.js
CHANGED
package/controllers/user.js
CHANGED
|
@@ -3,7 +3,7 @@ const router = express.Router();
|
|
|
3
3
|
const bcrypt = require("bcrypt");
|
|
4
4
|
|
|
5
5
|
// Import my Data
|
|
6
|
-
const User = require("../models/user")
|
|
6
|
+
const User = require("../models/user");
|
|
7
7
|
const inventory = require("../models/inventory");
|
|
8
8
|
|
|
9
9
|
const authCheck = require("./authCheck");
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -27,6 +27,7 @@ module.exports = function start(frontRouter, exploreRouter) {
|
|
|
27
27
|
|
|
28
28
|
// allows us to get static files like css
|
|
29
29
|
app.use(express.static('public'));
|
|
30
|
+
app.use(express.static(`${__dirname}/public`));
|
|
30
31
|
|
|
31
32
|
// sets the favicon image
|
|
32
33
|
const favicon = require('serve-favicon');
|
|
@@ -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/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>
|