notherbase-fs 1.2.15 → 1.2.16
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/package.json
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
<hr>
|
|
13
13
|
|
|
14
|
+
<button onclick="tradeForDoll()">Trade 5g for a doll</button>
|
|
15
|
+
|
|
16
|
+
<hr>
|
|
17
|
+
|
|
14
18
|
<section class="floor" id="items">
|
|
15
19
|
<h2>Items</h2>
|
|
16
20
|
<button id="toggle">Toggle</button>
|
|
@@ -61,4 +65,10 @@
|
|
|
61
65
|
|
|
62
66
|
<a href="/coast/tall-beach/nono-cove/nono-og" class="to">
|
|
63
67
|
Go to Nono Cove
|
|
64
|
-
</a>
|
|
68
|
+
</a>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
let tradeForDoll = async function tradeForDoll() {
|
|
72
|
+
if (await playerInventory.change(itemIDs[0], -5)) await playerInventory.change(itemIDs[1], 1);
|
|
73
|
+
}
|
|
74
|
+
</script>
|
package/test/test-index.js
CHANGED
package/views/inventory.ejs
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
amount: amount
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
try {
|
|
48
|
+
await $.post("/inventory", change, (data, status) => {
|
|
49
49
|
let holding = false;
|
|
50
50
|
|
|
51
51
|
for (let i = 0; i < this.items.length; i++) {
|
|
@@ -62,9 +62,14 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
this.render();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
catch(err) {
|
|
70
|
+
console.log(err);
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
async getData() {
|