Open ProjectMoon opened 14 years ago
Commands are now "asynchronous." Now need to deal with adding command template capabilities.
It may be useful to generalize CommandResult out to a "ServerMessage" class. This implies that the CommandResult is not tied to any one part of the system, but rather is used for sending data back to the client from anywhere.
CommandTemplate thoughts: Expose a CommandTemplate annotation that takes as a single parameter a list entries. Each entry has the following:
Each variable to be bound in the syntax can either scoped ($) or unscoped (:). A variable declared with $name will use the Scope object defined in the third parameter as its source for WorldObjectSearch. A variable declared with :name will require its Scope to be defined in the bind list.
@CommandTemplate([
{ "get $item", [ Item.class ], Scope.ROOM },
{"get :item from $bag", [{Item.class, Scope.LOCAL}, { Inventory.class}, Scope.ROOM}
])
Command Template system has been finished. Now to update all the commands.
The Commands API needs to be updated:
Templates will have some generic form of command types, similar to what exists now. May need to use strings for passing options. shudder