home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In hat and face edit, use existing value as default input.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 4285ded541ea1912fd83f36ba37337761407f074..d86eec5ee65d4c3e06f43b55ac351a22cb13f225 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-794,15
+794,15
@@
let tui = {
}
this.draw_face = false;
this.tile_draw = false;
}
this.draw_face = false;
this.tile_draw = false;
-
if (mode_name == 'command_thing' && (!game.player.carrying
-
|| !game.player.carrying.commandable)) {
+ if (mode_name == 'command_thing' && (!game.player.carrying
+ || !game.player.carrying.commandable)) {
return fail('not carrying anything commandable', 'play');
return fail('not carrying anything commandable', 'play');
- };
- if (mode_name == 'take_thing' && game.player.carrying) {
+ } else if (mode_name == 'take_thing' && game.player.carrying) {
return fail('already carrying something', 'play');
return fail('already carrying something', 'play');
- };
- if (mode_name == 'drop_thing' && !game.player.carrying) {
+ } else if (mode_name == 'drop_thing' && !game.player.carrying) {
return fail('not carrying anything droppable', 'play');
return fail('not carrying anything droppable', 'play');
+ } else if (mode_name == 'enter_hat' && !game.player.hat) {
+ return fail('not wearing hat to edit', 'edit');
}
if (mode_name == 'admin_enter' && this.is_admin) {
mode_name = 'admin';
}
if (mode_name == 'admin_enter' && this.is_admin) {
mode_name = 'admin';
@@
-953,6
+953,10
@@
let tui = {
if (t && t.protection) {
this.inputEl.value = t.protection;
}
if (t && t.protection) {
this.inputEl.value = t.protection;
}
+ } else if (this.mode.name == 'enter_face' && game.player.face) {
+ this.inputEl.value = game.player.face;
+ } else if (this.mode.name == 'enter_hat' && game.player.hat) {
+ this.inputEl.value = game.player.hat;
}
},
recalc_input_lines: function() {
}
},
recalc_input_lines: function() {