{"action":"created","issue":{"url":"https://api.github.com/repos/shawncplus/ranviermud/issues/325","repository_url":"https://api.github.com/repos/shawncplus/ranviermud","labels_url":"https://api.github.com/repos/shawncplus/ranviermud/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/shawncplus/ranviermud/issues/325/comments","events_url":"https://api.github.com/repos/shawncplus/ranviermud/issues/325/events","html_url":"https://github.com/shawncplus/ranviermud/issues/325","id":310591332,"number":325,"title":"Add 'settings' type objects to Commands for customization","user":{"login":"shawncplus","id":162674,"avatar_url":"https://avatars0.githubusercontent.com/u/162674?v=4","gravatar_id":"","url":"https://api.github.com/users/shawncplus","html_url":"https://github.com/shawncplus","followers_url":"https://api.github.com/users/shawncplus/followers","following_url":"https://api.github.com/users/shawncplus/following{/other_user}","gists_url":"https://api.github.com/users/shawncplus/gists{/gist_id}","starred_url":"https://api.github.com/users/shawncplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawncplus/subscriptions","organizations_url":"https://api.github.com/users/shawncplus/orgs","repos_url":"https://api.github.com/users/shawncplus/repos","events_url":"https://api.github.com/users/shawncplus/events{/privacy}","received_events_url":"https://api.github.com/users/shawncplus/received_events","type":"User","site_admin":false},"labels":[{"id":514987274,"url":"https://api.github.com/repos/shawncplus/ranviermud/labels/Commands","name":"Commands","color":"bfd4f2","default":false},{"id":514986888,"url":"https://api.github.com/repos/shawncplus/ranviermud/labels/Core","name":"Core","color":"bfd4f2","default":false},{"id":667591000,"url":"https://api.github.com/repos/shawncplus/ranviermud/labels/help%20wanted","name":"help wanted","color":"0e8a16","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-02T19:58:41Z","updated_at":"2018-04-26T15:25:05Z","closed_at":null,"author_association":"OWNER","body":"Commands currently lack a place to put extra data about them that bundles might want to set/access. Imagine there are `sit/sleep/stand` commands and the developer wants to stop certain commands from being used while the player is sleeping, there is currently no place to put that info.\r\n\r\n### Details\r\n\r\nAdd a `config` property to `Command` defaulting to an empty object. Bundles will be free to place whatever data they want in there and access it via the `Command` instance retrieved from `CommandManager`"},"comment":{"url":"https://api.github.com/repos/shawncplus/ranviermud/issues/comments/384682570","html_url":"https://github.com/shawncplus/ranviermud/issues/325#issuecomment-384682570","issue_url":"https://api.github.com/repos/shawncplus/ranviermud/issues/325","id":384682570,"user":{"login":"shawncplus","id":162674,"avatar_url":"https://avatars0.githubusercontent.com/u/162674?v=4","gravatar_id":"","url":"https://api.github.com/users/shawncplus","html_url":"https://github.com/shawncplus","followers_url":"https://api.github.com/users/shawncplus/followers","following_url":"https://api.github.com/users/shawncplus/following{/other_user}","gists_url":"https://api.github.com/users/shawncplus/gists{/gist_id}","starred_url":"https://api.github.com/users/shawncplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawncplus/subscriptions","organizations_url":"https://api.github.com/users/shawncplus/orgs","repos_url":"https://api.github.com/users/shawncplus/repos","events_url":"https://api.github.com/users/shawncplus/events{/privacy}","received_events_url":"https://api.github.com/users/shawncplus/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T15:25:05Z","updated_at":"2018-04-26T15:25:05Z","author_association":"OWNER","body":"That's two sides of the same coin. `Command` would have some \"settings\" property that a programmer could define a list of valid statuses and then the `Character` would have a current status property. The code for the check for whether a player can execute a command based on their given status, in my opinion, wouldn't happen in either the `Character` or the `Command` class. It'd happen wherever commands get executed, e.g., `input-events/commands.js` like\r\n\r\n```js\r\nif (command.config.allowedStatuses.includes(player.status)) { /* do stuff */ }\r\n```"}}
{"actor":{"display_login":"shawncplus"}}