chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78e504c
)
better handling for leave game
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 29 Nov 2020 20:00:24 +0000
(20:00 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 29 Nov 2020 20:00:24 +0000
(20:00 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 1284ff0e93cccc80682bc71faa2f5df634873fa1..893a869dd5eb50e10ba48f0b6dd418b143153483 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-1166,6
+1166,9
@@
function startup() {
es.addEventListener('player-gone', function(event) {
console.log('PLAYER-GONE', event);
status_node.innerHTML = (event as any).data;
+ add_log_message('<strong>You are no longer in the game</strong>');
+ space.removeEventListener('mousedown', some_mousedown);
+ document.removeEventListener('keydown', some_keydown);
es.close();
});
es.addEventListener('updates-expired', function(event) {