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 ASCII art drawing mode, pad short lines with whitespace to tolerate them.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 45f04a6ccf70e8e384f2e47d72fa358ce8382c2f..82bfbed97fd8902e48aca9e86bb8ec3e15c109eb 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-1069,9
+1069,13
@@
let tui = {
this.switch_mode('play');
},
enter_ascii_art: function(command) {
this.switch_mode('play');
},
enter_ascii_art: function(command) {
- if (this.inputEl.value.length
!=
6) {
- this.log_msg('? wrong input length, must be 6; try again');
+ if (this.inputEl.value.length
>
6) {
+ this.log_msg('? wrong input length, must be
max
6; try again');
return;
return;
+ } else if (this.inputEl.value.length < 6) {
+ while (this.inputEl.value.length < 6) {
+ this.inputEl.value += ' ';
+ }
}
this.log_msg(' ' + this.inputEl.value);
this.full_ascii_draw += this.inputEl.value;
}
this.log_msg(' ' + this.inputEl.value);
this.full_ascii_draw += this.inputEl.value;