notherbase-fs 3.2.20 → 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.
- package/controllers/creation.js +8 -8
- package/controllers/spirit-world.js +24 -10
- package/controllers/user.js +8 -31
- package/models/index.js +0 -2
- package/models/spirit.js +56 -19
- package/models/user.js +93 -0
- package/notherbase-fs.js +3 -10
- package/package.json +1 -1
- package/public/js/base.js +237 -32
- package/public/js/chat-box.js +0 -13
- package/public/styles/account.css +45 -0
- package/public/styles/inventory.css +76 -0
- package/public/styles/main.css +143 -288
- package/public/styles/menu.css +135 -0
- package/public/styles/more.css +17 -0
- package/public/styles/player.css +36 -0
- package/test/coast/tall-beach/nono-cove/index.ejs +0 -1
- package/test/pages/void/index.ejs +1 -32
- package/test/the-front/add-gold.js +23 -0
- package/test/the-front/check/add-more-gold.js +3 -0
- package/test/the-front/check/emailTime.js +2 -0
- package/test/the-front/check/index.ejs +1 -1
- package/test/the-front/check/subtract-gold.js +3 -0
- package/test/the-front/checks.js +11 -0
- package/test/the-front/incTranslation.js +9 -0
- package/views/basic-footer.ejs +2 -0
- package/views/explorer.ejs +8 -6
- package/views/footer.ejs +1 -1
- package/views/head.ejs +6 -0
- package/views/menu/account.ejs +39 -0
- package/views/menu/inventory.ejs +8 -0
- package/views/menu/more.ejs +2 -0
- package/views/menu/player.ejs +3 -0
- package/views/menu.ejs +43 -0
|
@@ -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
|
+
}
|
|
@@ -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
|
-
<
|
|
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,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
|
+
}
|
package/views/explorer.ejs
CHANGED
|
@@ -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.
|
|
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
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>
|
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>
|