notherbase-fs 1.1.20 → 1.1.24

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.
@@ -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").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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "1.1.20",
3
+ "version": "1.1.24",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "main": "index.js",
6
6
  "scripts": {
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);
@@ -0,0 +1,9 @@
1
+ <p>
2
+ A random nono washes up on shore. Will you solve it?
3
+ </p>
4
+
5
+ <hr>
6
+
7
+ <a class="return" href="/forest/pond/tower">
8
+ Back to the Wizard's Tower
9
+ </a>
@@ -12,7 +12,7 @@
12
12
  <main class="override">
13
13
  <%- include(`${main}.ejs`); %>
14
14
 
15
- <%- include("./inventory.ejs"); %>
15
+ <%- include("./inventory.ejs", {inventory: inventory}); %>
16
16
 
17
17
  <%- include("./contact.ejs"); %>
18
18
  </main>
@@ -1,32 +1,34 @@
1
- <% if (inventory.items) { %>
2
- <div class="inventory invisible">
3
- <% if (user.authLevels.length > 0) {
4
- for (let i = 0; i < user.authLevels.length; i++) {
5
- if (user.authLevels[i] === "Creator") { %>
6
-
7
- <div class="item-spawner">
8
- <input type="text" class="search">
9
- <div class="search-results">
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
- <% break;
15
+ <% break;
16
+ }
15
17
  }
16
- }
17
- } %>
18
+ } %>
18
19
 
19
- <div class="item-list">
20
+ <div class="item-list">
21
+ </div>
20
22
  </div>
21
- </div>
22
-
23
- <button id="inventory-button">
24
- <i class="fas fa-database"></i>
25
- </button>
26
- <% } else { %>
27
- <button id="inventory-button">
28
- ERR
29
- </button>
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>