Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed docs

  • Loading branch information...
commit 3f40f77cb604e9f4a970e354108e8983e67344a5 1 parent 96b0b8a
Raynos (Jake Verbaten) authored
Showing with 12 additions and 2 deletions.
  1. +4 −1 browser/ui/index.js
  2. +5 −0 help.json
  3. +3 −1 logic.js
5 browser/ui/index.js
View
@@ -13,7 +13,10 @@ module.exports = UI
function UI(doc) {
var world = World(doc)
var source = "// I am a wizard \n// self.say(self.id())" +
- "\n// self.say(Object.keys(self))"
+ "\n// self.say(Object.keys(self))" +
+ "\n// self.hear(function (message) {" +
+ "\n// self.say(message)" +
+ "\n// })"
var player = {
id: "wizard:" + NAME.name
5 help.json
View
@@ -51,4 +51,9 @@
, "will need to be near them and your"
, "callback gets called with message and"
, "id"
+ , ""
+ , "If you want to be an echo player try"
+ , "self.hear(function (message) {"
+ , " self.say(message)"
+ , "})"
]
4 logic.js
View
@@ -168,7 +168,9 @@ function api (row) {
hear: createListener('say', function (f) {
return function (message, id) {
- if(self.whatDist(id).length < 1000) f(message, id)
+ if(self.whatDist(id).length < 1000 && id !== self.id()) {
+ f(message, id)
+ }
}
}),
Please sign in to comment.
Something went wrong with that request. Please try again.