Quieted message

This commit is contained in:
Devine Lu Linvega 2019-07-18 11:15:18 +09:00
parent c1594dd4cc
commit 998a2db53e
2 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,9 @@ function Commander (ronin) {
} }
this.setStatus = function (msg) { this.setStatus = function (msg) {
if (!msg) { return } if (!msg || msg === this._status.textContent) { return }
this._status.textContent = `${(msg + '').substr(0, 40)}` this._status.textContent = `${(msg + '').substr(0, 40)}`
console.log(...msg)
} }
this.update = function () { this.update = function () {

View File

@ -52,7 +52,6 @@ function Ronin () {
} }
this.log = function (...msg) { this.log = function (...msg) {
console.log(...msg)
this.commander.setStatus(msg.reduce((acc, val) => { return acc + val + ' ' }, '')) this.commander.setStatus(msg.reduce((acc, val) => { return acc + val + ' ' }, ''))
} }