notherbase-fs 3.2.21 → 3.3.0

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.
@@ -0,0 +1,135 @@
1
+ .menu {
2
+ width: 75%;
3
+ height: 50%;
4
+ border: 1px solid var(--textColor);
5
+ color: var(--textColor);
6
+ position: fixed;
7
+ left: 12.5%;
8
+ top: 5%;
9
+ background-color: var(--bgColor);
10
+ backdrop-filter: blur(3px);
11
+ border-radius: 5px;
12
+ z-index: 500;
13
+ padding: 0;
14
+ }
15
+
16
+ .menu hr {
17
+ margin: 0;
18
+ }
19
+
20
+ .ui .fade {
21
+ background-color: var(--veryDarkBgColorTransparent);
22
+ backdrop-filter: blur(3px);
23
+ width: 100%;
24
+ height: 130%;
25
+ position: fixed;
26
+ left: 0;
27
+ top: 0;
28
+ z-index: 400;
29
+ }
30
+
31
+ .ui button {
32
+ background-color: var(--bgColor);
33
+ border: 1px solid var(--textColor);
34
+ margin: 0;
35
+
36
+ }
37
+
38
+ .ui button:hover {
39
+ border: 1px solid var(--textColorBright);
40
+ color: var(--textColorBright);
41
+ cursor: pointer;
42
+ }
43
+
44
+ .ui button#menu {
45
+ position: fixed;
46
+ bottom: 15px;
47
+ right: 15px;
48
+ width: 64px;
49
+ height: 64px;
50
+ border-radius: 5px;
51
+ z-index: 100;
52
+ padding: var(--padding);
53
+ }
54
+
55
+ .menu button#close {
56
+ top: 0;
57
+ right: 0;
58
+ width: 32px;
59
+ height: 30px;
60
+ position: fixed;
61
+ border-radius: 0;
62
+ padding: 0 3px;
63
+ }
64
+
65
+ .menu .tabs {
66
+ width: 100%;
67
+ height: 30px;
68
+ border: 1px solid var(--textColor);
69
+ border-top: none;
70
+ padding: 0;
71
+ margin: 0;
72
+ display: flex;
73
+ }
74
+
75
+ .menu .tabs button {
76
+ height: 30px;
77
+ border-radius: 0;
78
+ padding: 0 10px;
79
+ }
80
+
81
+ .menu .tabs .selected {
82
+ border: 2px solid var(--textColorBright);
83
+ }
84
+
85
+ .menu #content-window {
86
+ width: var(--fillFromMargin);
87
+ margin: var(--margin);
88
+ height: calc(100% - 30px - 2 * var(--margin));
89
+ border: 1px solid var(--textColor);
90
+ overflow: auto;
91
+ padding: 0;
92
+ }
93
+
94
+ .menu .content {
95
+ border: none;
96
+ color: var(--textColor);
97
+ width: 100%;
98
+ height: 100%;
99
+ padding: 0;
100
+ z-index: 500;
101
+ overflow: auto;
102
+ }
103
+
104
+ .menu a {
105
+ margin: 0;
106
+ padding: 5px;
107
+ }
108
+
109
+ .menu #logout {
110
+ position: absolute;
111
+ width: 50%;
112
+ height: 40px;
113
+ bottom: -40px;
114
+ left: calc(25%);
115
+ background-color: var(--bgColor);
116
+ border: var(--standardBorder);
117
+ border-top: none;
118
+ border-radius: 0 0 5px 5px;
119
+ text-align: center;
120
+ padding: 5px;
121
+ }
122
+
123
+ @media only screen and (max-width: 1300px) {
124
+ .menu {
125
+ width: 100%;
126
+ height: 80vh;
127
+ top: 0;
128
+ left: 0;
129
+ }
130
+
131
+ .ui button#menu {
132
+ bottom: 5px;
133
+ right: 5px;
134
+ }
135
+ }
@@ -0,0 +1,17 @@
1
+ .content#more {
2
+ padding: 10px;
3
+ position: relative;
4
+ height: 100%;
5
+ overflow: auto;
6
+ }
7
+
8
+ .content#more h4 {
9
+ padding: 10px;
10
+ font-size: xx-large;
11
+ }
12
+
13
+ .content#more button {
14
+ position: absolute;
15
+ bottom: 5px;
16
+ right: 5px;
17
+ }
@@ -0,0 +1,36 @@
1
+ .content#player {
2
+ padding: 10px;
3
+ display: flex;
4
+ align-items: center;
5
+ flex-wrap: wrap;
6
+ justify-content: space-around;
7
+ }
8
+
9
+ .content#player h3 {
10
+ width: 100%;
11
+ text-transform: capitalize;
12
+ border: 1px solid var(--textColor);
13
+ padding: 5px 30px;
14
+ height: 100px;
15
+ position: relative;
16
+ font-size: 25px;
17
+ display: flex;
18
+ align-items: center;
19
+ }
20
+
21
+ .content#player input {
22
+ width: 100px;
23
+ text-transform: capitalize;
24
+ position: absolute;
25
+ right: 0;
26
+ top: 0;
27
+ margin: 2px;
28
+ }
29
+
30
+ .content#player h3 button {
31
+ width: 100px;
32
+ position: absolute;
33
+ right: 0;
34
+ bottom: 0;
35
+ margin: 2px;
36
+ }
@@ -20,7 +20,6 @@
20
20
  Go to Nono Cove
21
21
  </a>
22
22
 
23
- <script src="/js/chat-box.js"></script>
24
23
  <script>
25
24
  let chatTest = new ChatBox("<%= user.username %>", "test-chat");
26
25
  let chatTest2 = new ChatBox("<%= user.username %>", "test-chat-2");
@@ -1,36 +1,5 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Test</title>
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <!-- font-family: 'Roboto' or 'Roboto Condensed', sans-serif; -->
11
- <link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Condensed:wght@700&display=swap" rel="stylesheet">
12
- <!-- 'Redacted Script', cursive; -->
13
- <link href="https://fonts.googleapis.com/css2?family=Redacted+Script:wght@300&display=swap" rel="stylesheet">
14
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
15
- <link rel="stylesheet" href="/styles/main.css">
16
- <link rel="stylesheet" href="/styles/menu.css">
17
- <link rel="stylesheet" href="/styles/inventory.css">
18
- <link rel="stylesheet" href="/styles/player.css">
19
- <link rel="stylesheet" href="/styles/account.css">
20
- <link rel="stylesheet" href="/styles/more.css">
21
- <link rel="stylesheet" href="/styles/chat.css">
22
- <script src="/js/base.js"></script>
23
- </head>
24
- <script>
25
- const currentRoute = "<%- route %>";
26
- </script>
27
1
  <style>
28
2
  <%- include("./void.css"); %>
29
3
  </style>
30
4
 
31
- <body>
32
- <main>
33
- <a href="/">Leave the Void</a>
34
- </main>
35
- </body>
36
- </html>
5
+ <a href="/">Leave the Void</a>
@@ -0,0 +1,23 @@
1
+ export default async (req, user) => {
2
+ let gold = await req.db.Item.recallOne("Gold Coin");
3
+ if (!gold) {
4
+ //console.log(gold);
5
+ await req.db.Item.create("Gold Coin", "Gold Coin", "Long Gold Coin");
6
+ }
7
+
8
+ await user.offsetItem("Gold Coin", 15);
9
+
10
+ // await req.db.Spirit.delete("gold");
11
+
12
+ let local = await req.db.Spirit.recallOne("gold", user.id);
13
+
14
+ if (!local.memory.data.gold) local.memory.data.gold = 0;
15
+ local.memory.data.gold += 15;
16
+ await local.commit();
17
+
18
+ let global = await req.db.Spirit.recallOne("gold");
19
+
20
+ if (!global.memory.data.gold) global.memory.data.gold = 0;
21
+ global.memory.data.gold += 15;
22
+ await global.commit();
23
+ }
@@ -0,0 +1,3 @@
1
+ export default async (req, user) => {
2
+ await user.offsetItem("Gold Coin", 3);
3
+ }
@@ -5,5 +5,7 @@ export default async function emailTime(req, user) {
5
5
  'sdntndtjln l'
6
6
  );
7
7
 
8
+ console.log(req.body);
9
+
8
10
  return "Sent";
9
11
  }
@@ -25,7 +25,7 @@
25
25
  base.load("test-save3").then((res) => {
26
26
  if (res.text) $inp.attr("placeholder", res.text);
27
27
  else $inp.attr("placeholder", "No Input Saved");
28
- });
28
+ })
29
29
 
30
30
  const saveInput = function saveInput() {
31
31
  let inp = $inp.val();
@@ -0,0 +1,3 @@
1
+ export default async (req, user) => {
2
+ await user.offsetItem("Gold Coin", -30);
3
+ }
@@ -0,0 +1,11 @@
1
+ export default async function emailTime(req, user) {
2
+ let goldCheck = req.db.Item.recall("Gold Coin");
3
+
4
+ if (!goldCheck) req.db.Item.create("Gold Coin", "Gold Coin Short", "Gold Coin Long");
5
+
6
+ let inv = user.memory.data.inventory;
7
+
8
+
9
+
10
+ return "Sent";
11
+ }
@@ -0,0 +1,9 @@
1
+ export default async (req, user) => {
2
+ let att = await user.incrementAttribute("translation", 5);
3
+
4
+ console.log(att);
5
+
6
+ let check = await user.checkAttribute("translation", 4);
7
+
8
+ console.log(check);
9
+ }
@@ -23,7 +23,7 @@
23
23
  Go inside
24
24
  </a>
25
25
 
26
- <a href="/check">
26
+ <a href="/the-front/check">
27
27
  Go to The Check
28
28
  </a>
29
29
 
@@ -0,0 +1,2 @@
1
+ </body>
2
+ </html>
@@ -2,6 +2,10 @@
2
2
 
3
3
  <script src="/socket.io/socket.io.js"></script>
4
4
 
5
+ <div class="ui">
6
+ <%- include("./menu.ejs", {user: user}); %>
7
+ </div>
8
+
5
9
  <script src="/js/base.js"></script>
6
10
  <script>
7
11
  const currentRoute = "<%- route %>";
@@ -9,6 +13,8 @@
9
13
  const base = new Base();
10
14
  </script>
11
15
 
16
+
17
+
12
18
  <main class="override">
13
19
  <% if (requireUser && !user) { %>
14
20
  <div class="login-cover">
@@ -30,7 +36,7 @@
30
36
  );
31
37
 
32
38
  if (response.status === "success") location.reload();
33
- $(".login-cover .info").text(response.message);
39
+ $(".login-cover .info").text(response.data);
34
40
  };
35
41
  </script>
36
42
  </div>
@@ -39,8 +45,4 @@
39
45
  <% } %>
40
46
  </main>
41
47
 
42
- <%- include("./footer.ejs"); %>
43
-
44
- <script>
45
- base.createToggleViewButton();
46
- </script>
48
+ <%- include("./footer.ejs"); %>
package/views/footer.ejs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  <footer>
3
- <%- user ? `<p class="login-status">Logged In: ${user.username}</p><button onclick="base.logout()">Logout</button>` : `<p class="login-status">Not Logged In</p>` %>
3
+
4
4
  </footer>
5
5
 
6
6
  </body>
package/views/head.ejs CHANGED
@@ -13,6 +13,12 @@
13
13
  <link href="https://fonts.googleapis.com/css2?family=Redacted+Script:wght@300&display=swap" rel="stylesheet">
14
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
15
15
  <link rel="stylesheet" href="/styles/main.css">
16
+ <link rel="stylesheet" href="/styles/menu.css">
17
+ <link rel="stylesheet" href="/styles/inventory.css">
18
+ <link rel="stylesheet" href="/styles/player.css">
19
+ <link rel="stylesheet" href="/styles/account.css">
20
+ <link rel="stylesheet" href="/styles/more.css">
21
+ <link rel="stylesheet" href="/styles/chat.css">
16
22
  </head>
17
23
 
18
24
  <body>
@@ -0,0 +1,39 @@
1
+ <div id="account" class="invisible content">
2
+ <p id="please-login">Please login to view your account settings.</p>
3
+
4
+ <div class="invisible settings">
5
+ <h3>Email:</h3>
6
+ <div class="setting" id="email">
7
+ <p></p>
8
+ <button onclick="base.playerAccount.editEmail()">Change Email</button>
9
+ </div>
10
+ <div class="edit invisible" id="email">
11
+ <input type="email" name="email">
12
+ <button onclick="base.playerAccount.updateEmail()">Update</button>
13
+ <button onclick="base.playerAccount.cancelEmail()">Cancel</button>
14
+ </div>
15
+
16
+ <hr>
17
+
18
+ <h3>Username:</h3>
19
+ <div class="setting" id="username">
20
+ <p></p>
21
+ <button onclick="base.playerAccount.editUsername()">Change Username</button>
22
+ </div>
23
+ <div class="edit invisible" id="username">
24
+ <input type="text" name="username">
25
+ <button onclick="base.playerAccount.updateUsername()">Update</button>
26
+ <button onclick="base.playerAccount.cancelUsername()">Cancel</button>
27
+ </div>
28
+
29
+ <hr>
30
+
31
+ <h3>Password:</h3>
32
+ <div class="setting" id="password">
33
+ <p>*********</p>
34
+ <p>Visit the Keeper to Change Your Password</p>
35
+ </div>
36
+
37
+ <p id="info"></p>
38
+ </div>
39
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="inventory content invisible" id="inventory">
2
+ <div id="error">
3
+ Please login to view your inventory.
4
+ </div>
5
+
6
+ <div class="item-list">
7
+ </div>
8
+ </div>
@@ -0,0 +1,2 @@
1
+ <div class="content invisible" id="more">
2
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="content invisible" id="player">
2
+ <p id="please-login">Please login to view your player stats.</p>
3
+ </div>
package/views/menu.ejs ADDED
@@ -0,0 +1,43 @@
1
+ <div class="fade invisible" onclick="base.closeMenu()">
2
+
3
+ </div>
4
+
5
+ <div class="menu invisible">
6
+ <div class="tabs">
7
+ <button id="inventory" onclick="base.switchTab('inventory')">
8
+ Inventory
9
+ </button>
10
+ <button id="player" onclick="base.switchTab('player')">
11
+ Player
12
+ </button>
13
+ <button id="account" onclick="base.switchTab('account')">
14
+ Account
15
+ </button>
16
+ <button id="more" onclick="base.switchTab('more')">
17
+ More
18
+ </button>
19
+ </div>
20
+
21
+ <button id="close" onclick="base.closeMenu()">
22
+ X
23
+ </button>
24
+
25
+ <div id="content-window">
26
+ <%- include("./menu/inventory.ejs"); %>
27
+ <%- include("./menu/player.ejs"); %>
28
+ <%- include("./menu/account.ejs", { user: user }); %>
29
+ <%- include("./menu/more.ejs"); %>
30
+ </div>
31
+
32
+ <button id="logout" onclick="logoutViaMenu()">Logout</button>
33
+
34
+ <script>
35
+ const logoutViaMenu = async () => {
36
+ let response = await base.logout();
37
+ console.log(response);
38
+ location.reload();
39
+ }
40
+ </script>
41
+ </div>
42
+
43
+ <button id="menu" onclick="base.openMenu()"><i class="fas fa-cog"></i></button>
@@ -1,105 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Test</title>
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <!-- font-family: 'Roboto' or 'Roboto Condensed', sans-serif; -->
11
- <link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Condensed:wght@700&display=swap" rel="stylesheet">
12
- <!-- 'Redacted Script', cursive; -->
13
- <link href="https://fonts.googleapis.com/css2?family=Redacted+Script:wght@300&display=swap" rel="stylesheet">
14
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
15
- <link rel="stylesheet" href="/styles/main.css">
16
- <link rel="stylesheet" href="/styles/menu.css">
17
- <link rel="stylesheet" href="/styles/inventory.css">
18
- <link rel="stylesheet" href="/styles/player.css">
19
- <link rel="stylesheet" href="/styles/account.css">
20
- <link rel="stylesheet" href="/styles/more.css">
21
- <link rel="stylesheet" href="/styles/chat.css">
22
- <script src="/js/base.js"></script>
23
- </head>
24
- <script>
25
- const currentRoute = "<%- route %>";
26
- </script>
27
-
28
- <body>
29
- <main>
30
- <div class="chatter" id="adam"></div>
31
- <input type="text" id="adam">
32
- <button id="adam">Chat</button>
33
- </main>
34
- </body>
35
-
36
- <script>
37
- class Spirit {
38
- constructor(name) {
39
- this.name = name;
40
- this.children = {};
41
- }
42
-
43
- addChild(child, parent) {
44
- if (!this.children[child.name]) {
45
- this.children[child.name] = 1;
46
- }
47
-
48
- this.children[child.name]++;
49
- }
50
- }
51
-
52
- class Chatter {
53
- constructor(id) {
54
- this.name = id;
55
- this.brain = new Spirit("i");
56
- this.$div = $(`.chatter#${id}`);
57
- this.$input = $(`input#${id}`);
58
- this.$submit = $(`button#${id}`);
59
-
60
- this.$submit.click(() => {
61
- this.listen(this.$input.val());
62
- });
63
- }
64
-
65
- register = (word) => {
66
- if (!this.brain[word]) {
67
- this.brain[word] = new Spirit(word);
68
- }
69
-
70
- return this.brain[word];
71
- }
72
-
73
- think = () => {
74
-
75
- }
76
-
77
- listen = (message) => {
78
- message = message.toLowerCase();
79
- let words = message.split(" ");
80
-
81
- //add words to the dialogue tree
82
- this.register(words[0]);
83
- for (let i = 0; i < words.length; i++) {
84
- if (i < words.length - 1) {
85
- let child = this.register(words[i + 1]);
86
- if (i > 0) this.brain[words[i]].addChild(child, this.brain[words[i - 1]]);
87
- else this.brain[words[i]].addChild(child, null);
88
- }
89
- }
90
-
91
- //think
92
-
93
- this.respond(message);
94
- }
95
-
96
- respond(message) {
97
- this.$div.append(`<p>${this.name}: ${message}</p>`);
98
- }
99
- }
100
-
101
- const adam = new Chatter("adam");
102
- adam.listen(`In the beginning God created the heavens and the earth`);
103
- adam.listen("if i have the first two words in a three word relationship can the third word be guessed")
104
- </script>
105
- </html>