home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disallow picking up thing already carried by other player.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 7d2747e75be9fa5478aca4ff461b1c2993efff7e..42b0362a4504aaed05882693cdbd05ead1c51171 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-126,8
+126,8
@@
keyboard input/control: <span id="keyboard_control"></span>
</div>
<script>
"use strict";
</div>
<script>
"use strict";
-
//
let websocket_location = "wss://plomlompom.com/rogue_chat/";
-let websocket_location = "ws://localhost:8000/";
+let websocket_location = "wss://plomlompom.com/rogue_chat/";
+
//
let websocket_location = "ws://localhost:8000/";
let mode_helps = {
'play': {
let mode_helps = {
'play': {
@@
-1686,13
+1686,16
@@
document.getElementById("teleport").onclick = function() {
game.teleport();
};
for (const move_button of document.querySelectorAll('[id*="_move_"]')) {
game.teleport();
};
for (const move_button of document.querySelectorAll('[id*="_move_"]')) {
+ if (move_button.id.startsWith('key_')) { // not a move button
+ continue;
+ };
let direction = move_button.id.split('_')[2].toUpperCase();
move_button.onclick = function() {
let direction = move_button.id.split('_')[2].toUpperCase();
move_button.onclick = function() {
- if (tui.mode.available_actions.includes("move")
- || tui.mode.available_actions.includes("move_explorer")) {
+ if (tui.mode.available_actions.includes("move")) {
server.send(['TASK:MOVE', direction]);
server.send(['TASK:MOVE', direction]);
- } else {
+ } else
if (tui.mode.available_actions.includes("move_explorer"))
{
explorer.move(direction);
explorer.move(direction);
+ tui.full_refresh();
};
};
};
};
};
};