Other small bugfixes, fixes to @dig to properly call creation hooks of all newly created objects (it was not setting anything before). Also fixed some of the annoying bugs around using several of the building commands that didn't properly handle spaces around the separator = symbol.
/Griatch
of any desired attribute. Default is searching by name, as before. This
makes it easy for admins to search for objects and also for using other
attributes than names as primary identifiers (short descriptions comes to
mind).
/Griatch
This uses exact-match-first fuzzy matching as discussed in previous commits. It also
use the match order to present a list of options to narrow the selection down - the user can
then specify the choice by appending the correct number to the query.
Example: objects: [box,box]; searching for "box" gives a multiple match error, which presents
a list looking like "1-box, 2-box". The user can now just write "2-box" to choose the second
box. Showing dbrefs is perhaps even more universal, but revealing the underlying data structure
to the normal user is not really good practice - dbrefs is only something builders and admins
should have to know about ... (IMHO).
/Griatch
For example, before the fix, you could face the following issue: Create a bunch of boxes with @create:
box, box1, box2, box3 ... Now try to examine 'box'. This would not work - the game would tell you that there
were multiple matches - it just found "box" in all entries and went with that. So despite there only being one
thing named solely "box", you could not target it! This fix resolves this by giving precedence to exact matches
whenever they exist. I have only done it for the support routine behind local_and_global_search() though, there
are other search functions that uses django directly for fuzzy __in searches. I don't know how to add a similar
functionality to them.
/Griatch
GLOBAL_STATE_TABLE.add_state() before adding commands to it. The state can now be much more configured by including as much or as
little of the normal default commands into it as wanted (so you can now have states which are almost as normal, except some
commands are missing or change their behaviour ... illness or darkness comes to mind). The possibilities here are limitless.
* States now also optionally allow traversing exits as well as using command tables defined on objects.
* States now better handle error messages (so if you try 'look' in a state which does not contain a look command you will no
longer get the 'Huh?' but will be told that the command is not available at the moment).
* All examples in commands/examples/ have been updated to use the new State system. Also added a @test_state function for trying out
the functionality.
* Added hooks at_before_move() and at_after_move(), useful for character based move-restrictions and checks (e.g. movement speed)
* Minor tweaks to the event system; avoiding the counters to go negative should they hit an uncaught traceback.
* Small fixes of typos and minor extra safety checks.
/Griatch
- Set up a global cleaner event to clean all @destroyed objects every 30 minutes (makes their dbrefs available).
- Added the @recover command for recovering @destroyed objects up until the point that the cleaner runs and actually destroys them. This can recover @destroyed objects, rooms and exits to the same state as before @destroy. It could easily be made to recover player objects too, but I'm thinking this would be a security issue.
- Added to @dig in order to allow for creating rooms with a particular parent. Also auto-creates exits in each room if desired. The only things that is not implemented is the aliases of the exits, I don't really know how to do that.
- Changed the @create command format to match the @dig (it uses : to mark the parent instead of = now, since MUX' @dig reserve = to the exit list.)
- Added extra security in the example event to guard against the bug that causes the whole scheduler to freak out if the event_function() gives a traceback.
- Changed many instances of type to point to the defines_global.OTYPE instead of giving the integer explicitly.
/Starkiel
- Made it so user #1 is also affected by the on_player_creation() function.
- Added an event folder for custom events, including a working example
- Expanded the example commands and parents to include the changes to how they should be initialized.
- Added an optional ansi scheme (not active by default)
NOTE: You will need to syncdb and re-create any channels you may have had. Sorry for the inconvenience, we're still early enough in development where breakages like this may happen once in a blue moon.
As a side-effect of all of this, logging in more than once acts as behaves now. Also, this will allow things/rooms/exits (IE: not players) or un-logged in players to run commands or be forced to run them via @fo. All of this will bring us more in-line with MUX behavior.