From 0d5cd1c1fc8d38f233aae799d50290f2b54ca7a1 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 13 Nov 2017 02:04:25 -0500 Subject: Render sombrio shared world messages --- lib/render-msg.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/lib/render-msg.js b/lib/render-msg.js index 9153178..509bc8f 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -263,6 +263,9 @@ RenderMsg.prototype.message = function (cb) { case 'npm-prebuilds': return this.npmPrebuilds(cb) case 'acme-challenges-http-01': return this.acmeChallengesHttp01(cb) case 'bookclub': return this.bookclub(cb) + case 'macaco_maluco-sombrio-wall': return this.sombrioWall(cb) + case 'macaco_maluco-sombrio-tombstone': return this.sombrioTombstone(cb) + case 'macaco_maluco-sombrio-score': return this.sombrioScore(cb) default: return this.object(cb) } } @@ -1354,3 +1357,31 @@ RenderMsg.prototype.bookclubTitle = function (cb) { var props = this.c.common || this.c cb(null, props.title || 'book') } + +RenderMsg.prototype.sombrioPosition = function () { + return h('span', '[' + this.c.position + ']') +} + +RenderMsg.prototype.sombrioWall = function (cb) { + var self = this + self.wrapMini(h('span', + self.sombrioPosition(), + ' wall' + ), cb) +} + +RenderMsg.prototype.sombrioTombstone = function (cb) { + var self = this + self.wrapMini(h('span', + self.sombrioPosition(), + ' tombstone' + ), cb) +} + +RenderMsg.prototype.sombrioScore = function (cb) { + var self = this + self.wrapMini(h('span', + 'scored ', + h('ins', self.c.score) + ), cb) +} -- cgit v1.2.3