Up to Main Index Up to Journal for January, 2017 JOURNAL FOR SUNDAY 29TH JANUARY, 2017 ______________________________________________________________________________ SUBJECT: Woolly thinking about commands DATE: Sun 29 Jan 19:51:44 GMT 2017 Let me start this journal entry with a clarification, as I seem to have confused some people. WolfMUD has had working vetoes for quite a while. What it did not have were vetoes that could be defined via .wrj files, such as zone files. With definable vetoes I've been revisiting the currently implemented commands as some of them did not have checks for veto attributes. While revisiting commands I also ended up going down a bit of a rabbit hole. It seems that when I was restructuring things a while ago I left some methods exported that should not be - I think. The reason I say ‘I think’ is because I seem to remember I was exporting some methods just for documentation purposes and godoc usage. As I write this it’s probably not the best time to dwell on these things as I have a lousy head cold and my thinking is very woolly :( I've also been looking at implementing different classes of commands. WolfMUD already has normal player commands such as GET and DROP. In my development version I also have implementer commands such as #DUMP - the ‘#’ denotes the command as not for use by normal players[1]. I’ve also been tinkering with commands that should only be available in a scripting context. So far I have a new @POOF command to use when placing players into the world: package cmd import ( "code.wolfmud.org/WolfMUD.git/attr" ) // Syntax: @POOF func init() { AddHandler(Poof, "@POOF") } func Poof(s *state) { name := attr.FindName(s.actor).Name("Someone") s.msg.Observer.SendGood("There is a cloud of smoke from which ", name, " emerges coughing and spluttering."); s.scriptActor("LOOK") } I’m not sure if I prefer @POOF, %POOF or even $POOF yet. The ‘$’ symbol incorporates an ‘S’ - for scripting - so I might go with that. Actually what I just said is daft. I can just add a scope method to commands and eliminate the need for a special prefix. Damn this woolly thinking :( I’m thinking scope rather than context as Go already has contexts which are totally different beasties. Right, that’s enough for now before I go off on one of my meaningless rambling tangents. Time to nurse my head in a dark corner. -- Diddymus [1] The #DUMP command is not available in the Git repository yet as it is a little fragile and its use is not restricted yet. Up to Main Index Up to Journal for January, 2017