home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't send anyone's bladder data to everyone.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index b9673a1320b1ad3eac182cefae95004690989413..291a98c341431c6c6cedf5bce2c966c2a63c30aa 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-16,7
+16,7
@@
terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
</div>
<div style="position: relative; display: inline-block;">
<pre id="terminal"></pre>
</div>
<div style="position: relative; display: inline-block;">
<pre id="terminal"></pre>
-<textarea id="input" style="position: absolute; left: 0; height: 100%; width: 100%; opacity: 0"></textarea>
+<textarea id="input" style="position: absolute; left: 0; height: 100%; width: 100%; opacity: 0
; z-index: -1;
"></textarea>
</div>
<h3>button controls for hard-to-remember keybindings</h3>
<table id="move_table" style="float: left">
</div>
<h3>button controls for hard-to-remember keybindings</h3>
<table id="move_table" style="float: left">
@@
-129,8
+129,8
@@
terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
</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': {
@@
-485,11
+485,12
@@
let server = {
let tokens = parser.tokenize(event.data);
if (tokens[0] === 'TURN') {
game.turn_complete = false;
let tokens = parser.tokenize(event.data);
if (tokens[0] === 'TURN') {
game.turn_complete = false;
- game.turn = parseInt(tokens[1]);
} else if (tokens[0] === 'OTHER_WIPE') {
game.portals_new = {};
explorer.annotations_new = {};
game.things_new = [];
} else if (tokens[0] === 'OTHER_WIPE') {
game.portals_new = {};
explorer.annotations_new = {};
game.things_new = [];
+ } else if (tokens[0] === 'BLADDER_PRESSURE') {
+ game.bladder_pressure_new = parseInt(tokens[1])
} else if (tokens[0] === 'THING') {
let t = game.get_thing_temp(tokens[4], true);
t.position = parser.parse_yx(tokens[1]);
} else if (tokens[0] === 'THING') {
let t = game.get_thing_temp(tokens[4], true);
t.position = parser.parse_yx(tokens[1]);
@@
-546,6
+547,7
@@
let server = {
game.things = game.things_new;
game.player = game.things[game.player_id];
game.players_hat_chars = game.players_hat_chars_new;
game.things = game.things_new;
game.player = game.things[game.player_id];
game.players_hat_chars = game.players_hat_chars_new;
+ game.bladder_pressure = game.bladder_pressure_new
game.turn_complete = true;
if (tui.mode.name == 'post_login_wait') {
tui.switch_mode('play');
game.turn_complete = true;
if (tui.mode.name == 'post_login_wait') {
tui.switch_mode('play');
@@
-1210,10
+1212,8
@@
let tui = {
}
terminal.write(0, this.window_width, 'MODE: ' + this.mode.short_desc + ' – ' + help);
},
}
terminal.write(0, this.window_width, 'MODE: ' + this.mode.short_desc + ' – ' + help);
},
- draw_turn_line: function(n) {
- if (game.turn_complete) {
- terminal.write(1, this.window_width, 'TURN: ' + game.turn);
- }
+ draw_stats_line: function(n) {
+ terminal.write(1, this.window_width, 'BLADDER: ' + game.bladder_pressure);
},
draw_history: function() {
let log_display_lines = [];
},
draw_history: function() {
let log_display_lines = [];
@@
-1328,7
+1328,7
@@
let tui = {
this.draw_input();
} else {
this.draw_map();
this.draw_input();
} else {
this.draw_map();
- this.draw_
turn
_line();
+ this.draw_
stats
_line();
this.draw_mode_line();
if (this.mode.shows_info) {
this.draw_info();
this.draw_mode_line();
if (this.mode.shows_info) {
this.draw_info();
@@
-1368,6
+1368,8
@@
let game = {
this.portals = {};
this.portals_new = {};
this.players_hat_chars = "";
this.portals = {};
this.portals_new = {};
this.players_hat_chars = "";
+ this.bladder_pressure = 0;
+ this.bladder_pressure_new = 0;
},
get_thing_temp: function(id_, create_if_not_found=false) {
if (id_ in game.things_new) {
},
get_thing_temp: function(id_, create_if_not_found=false) {
if (id_ in game.things_new) {