Commit graph

69 commits

Author SHA1 Message Date
Greg Taylor
ff98ede98f Moving the logging system to src/ 2008-06-15 20:15:12 +00:00
Greg Taylor
5064d0cacc Moved defines_globals to src/ 2008-06-15 20:04:06 +00:00
Greg Taylor
4bb00013ae Even more death and destruction. A lot more stuff moved to src/. A lot more bugs probably introduced. 2008-06-15 19:38:39 +00:00
Greg Taylor
d3808c1ea2 Committin a 'working' checkpoint before I break more stuff. 2008-06-15 19:06:31 +00:00
Greg Taylor
ccf078b5c8 Getting rid of functions_help in favor of the new manager. Removed an un-needed import from commands/general. 2008-06-15 17:30:42 +00:00
Greg Taylor
d620f3b1f0 The first of many re-arrangements. Eliminated gameconf in favor of using the manager on ConfigValue. Moved some commands while I was at it. There are going to be crash bugs that need to be found and worked out. 2008-06-15 17:21:02 +00:00
Greg Taylor
ed1510c4a7 Splitting web stuff off into a separate apps directory. This stuff will end up being replaced/re-written, it's ancient and really badly done. 2008-06-15 04:40:14 +00:00
Greg Taylor
652c7d57a5 whoops, forgot one, plus updating props. 2008-06-15 03:03:30 +00:00
Greg Taylor
43f0ae6af6 Outlining managers. I know some of these managers sub-modules only have one file in them, but let's keep the convention for consistency. 2008-06-15 03:01:58 +00:00
Greg Taylor
ffe9a563e0 Removing mixins.py, as it's not in use. We now have a separate ConnectScreen model under the config app to store connect screens. ConfigValue's value fields are now CharFields instead of TextFields for the sake of efficiency and sanity. It is strongly recommended that you reset your config app and syncdb to load the fixture. 2008-06-14 03:15:41 +00:00
Greg Taylor
813c50652e Splitting some of the stuff out of settings.py into settings_common.py (new file) to hold directives that need to be versioned. It sucks having to tell people to re-build their settings.py file from settings.py.dist when changes are made. 2008-06-14 02:26:14 +00:00
loki77
3fe644ef17 Indentation change 3-4 spaces.
Possible files that need to be cleanedup;
commands/info.py:cmd_list
commands/general.py:cmd_who
commands/comsys.py:cmd_who

cmdtable.py
ansi.py
2008-06-13 19:52:29 +00:00
loki77
ad009e20ab basicobject.py
---------------
  - Checks for NULL description on objects- if Null, it doesn't print the extra line any more.
  - Made the checks for contents a little less ambiguous

cmdhandler.py
--------------
  - Added new method 'parse_command' which takes a command string and tries to break it up based on common command parsing rules.  Mostly complete, but could use some work on the edge cases.  Check out the docstring on the function- I tried to make it fairly well documented.
  - Changed the check for 'non-standard characters' to just return, rather than throw an Exception.  Not sure if this causes any issues, but I noticed that when you hit enter without entering a command it would trigger this code.  Now it just fails silently.
  - The handle function now calls the parse_command function now and stores the results in parsed_input['parsed_command'].  This then gets put into cdat['uinput'] at the end of handle() like before.  The old data in parsed_input is still there, this is just a new field.
  - Added cdat['raw_input'] to pass the full, untouched command string on.  This is also stored in parsed_input['parsed_command']['raw_command'] so not sure fi this is necessary any longer, probably not.

cmdtable.py
------------
  - Just cleaned it up a bit and straightened out the columns after changing 3-4 space indentation.

apps/objects/models.py
-----------------------
  - set_description now sets the description attribute to 'None' (or Null in the db) when given a blank description.  This is used for the change mentioned above in basicobject.py
  - get_description now returns None if self.description is None
  - used defines_global in the comparison methods like is_player

functions_db.py
----------------
  - Changed import defines_global as defines_global to just 'import defines_global'- wasn't sure why this was this way, if I broke something (I didn't seem to) let me know.
  - renamed player_search to player_name_search.  Removed the use of local_and_global_search inside of it.  local_and_global_search now calls it when it receives a search_string that starts with *.
  - alias_search now only looks at attributes with attr_name == ALIAS.  It used to just look at attr_value, which could match anything, it seemed.
  - added 'dbref_search'
  - local_and_global_search changes:
    - Now uses dbref_search & player_search if the string starts with "#" or "*" respectively
    - Changed when it uses dbref_search to whenever the search_string is a dbref.  It used to check that it was a dbref, and that search_contents & search_location were set, but I *believe* in most MU*'s when you supply a dbref it never fails to find the object.

commands/unloggedin.py
-----------------------
  - removed hardcoded object type #'s and started using defines_global instead
  - when creating a new account, made sure that no object with an alias matching the player name requested exists.  This is behavior from TinyMUSH, and I think most MUSHs follow this, but if not this is easy enough to change back.

commands/general.py
--------------------
  - Rewrote cmd_page:
    - New Features
      - Page by dbref
      - Page multiple people
      - pose (:) and no space pose (;) pages
      - When someone hits page without a target or data, it now will tell the player who they last paged, or say they haven't paged anyone if they don't have a LASTPAGED
    - uses parse_command, made it a lot easier to work through the extra functionality added above
    - When there are multiple words in a page target, it first tries to find a player that matches the entire string.  If that fails, then it goes through each word, assuming each is a separate target, and works out paging them.

commands/objmanip.py
---------------------
  - I started to muck with cmd_name & cmd_page, but decided to hold off for now.  Largely, if everyone is cool with the idea that names & aliases should be totally unique, then we need to go ahead and re-write these.  I'll do that if everyone is cool with it.
2008-06-13 18:15:54 +00:00
Greg Taylor
38f8225a37 Moving application initial data over to JSON and fixtures. This is much better than using those raw SQL files that might not work with all RDBMs. The Objects app needs to be converted to use fixtures as well, but I've got something bad data in there that's causing some issues (which I'm working on hunting down). 2008-02-09 02:49:03 +00:00
Greg Taylor
ea88ace9fa Updating some models to use max_length instead of the deprecated maxlength. 2008-02-09 02:35:28 +00:00
Greg Taylor
4d94132c54 Moved the connect screen to the connect_screen config directive. Made the conf_value field on the configvalue model a TextField so we're not getting truncated at 255 as with a CharField. This means you'll need to delete your config tables and re-sync. 2007-10-27 03:25:42 +00:00
Michael King
74a3a01429 Moved object and exit clearing to the destroy method instead of
the delete method.  This may change later, but for simplicity's sake,
this is how we're doing it for now.
2007-09-14 14:09:25 +00:00
Michael King
684ae521b7 Added @boot.
Currently, @boot will boot the first username match it comes across, if connected.

It will not boot non-player objects, and it will not allow staff to boot other staff.
2007-08-07 19:19:31 +00:00
Michael King
7f3a8870f0 I learned something I didn't know about Django:
Apparently, if you retrieve the same model instance with two different references,
they don't equate with is or ==, you need to compare the id's.  I could be misreading the
symptoms, but this is what I had to do to get it to recognize that the home of the object in
question was its current (going away) location, and act appropriately.
2007-08-07 17:08:31 +00:00
Michael King
0c2648edaa Removed DEFAULT_HOME from settings.py into a server configuration directive via the confg app.
Changed clear_objects to reflect default home changes.
2007-08-07 16:52:47 +00:00
Michael King
8b8099a9db Added DEFAULT_HOME value of 2 to settings.py.dist
Added import of DEFAULT_HOME from settings into defines_global
Removed clear_players()
Removed clear_things()
Created a more general clear_objects():
  * obj.clear_objects()
    * Everything with obj as its location will be moved
      to its home.
    * If the home is the obj, then said objects will be
      moved to DEFAULT_HOME, if it exists.
    * If the said objects do not have a home, they will
      also be moved to DEFAULT_HOME.
2007-08-07 16:28:22 +00:00
Michael King
5f962b69a0 Added clear_things, clear_players and clear_exits to Object class.
* obj.clear_things() relocates all things contained by obj
 * obj.clear_players() relocates all players contained by obj
 * obj.clear_exits() destroys all exits to and from obj
2007-08-06 20:00:41 +00:00
Greg Taylor
be4e0069a6 Adding comments. 2007-07-31 19:32:03 +00:00
Greg Taylor
65e1b85c6f Some cosmetics. Also make searching news match against Title and Body for now. Will eventually have some checkboxes to with the option to do both or only one. 2007-07-31 18:39:48 +00:00
Greg Taylor
85d13fe16b I forgot to add the flatpages templates directory, whoops. Also fix a pluralization cosmetic thing in the admin interface for News entries. 2007-07-31 18:28:42 +00:00
Greg Taylor
613edc774f Yay, the news system is looking good now. We'll re-visit it later to add searching/sorting by news categories and stuff. 2007-07-31 18:25:24 +00:00
Greg Taylor
762e0f83bc The news archives and searching news is now operational. Next up, flatpages. 2007-07-31 14:59:00 +00:00
Greg Taylor
648bee599e Improvements on the news app. It's not nearly done yet, don't bother playing with it for a while unless you're really curious and want to see ugly, un-refined code :) 2007-07-30 20:30:16 +00:00
Greg Taylor
9db148f98c Add a placeholder page, tbi.html, and a tbi view /tbi, that can be used to link to when a particular web feature isn't complete yet rather than leaving dead links. 2007-07-30 15:23:42 +00:00
Greg Taylor
6aab3a4145 Added a view for looking at an individual news entry. It's ugly, one of you artsy people should make it less so :) 2007-07-26 15:50:24 +00:00
Greg Taylor
1afcd6bf99 We've now got a sane template structure. webtemplates/base.html is the parent of all pages. index.html in that directory is the default page, and sub-directories from there will hold the templates for various applications. Notice how in index.html and the file in the news directory are put together. It's really simple, see the Template documentation on djangoproject.com for more in-depth details. 2007-07-26 13:52:46 +00:00
Greg Taylor
a3ac4ff17c Word wrap is messing things up a bit. Disabling it for now until we have more time to check this out. 2007-07-26 12:48:44 +00:00
Greg Taylor
fadf3933af Move the presentation part of the 'look' command out to the new scripting system. You can now make different scripted objects appear vastly different by overriding basicobject's return_appearance (or any of its submethods). Also fixed word wrapping, and we are now wrapping descriptions to 78 characters by default. We'll see how gracefully it handles this, and we might eventually apply it to all output. 2007-07-17 14:39:10 +00:00
Greg Taylor
357ef3a250 Added two new channels: Errors and Info. These will now emit stuff that is sent via log_infomsg and log_errmsg. 2007-07-16 18:49:57 +00:00
Greg Taylor
ebb145654f Some more work towards having a working news module. This isn't anywhere near ready yet! 2007-06-12 03:37:22 +00:00
Greg Taylor
115a420cee The default front webpage now has some good examples on how to add in custom functionality. You'll obviously want to customize this for your game, but it'll be a good start. 2007-06-12 02:35:37 +00:00
Greg Taylor
72ebe9cc7b Finished the Players content block on the default main page. Yay. http://sandbox.evennia.com is the front page for the test site. None of the links work yet, just working on the front page. 2007-06-06 13:49:52 +00:00
Greg Taylor
e2cc754441 Lots of goodies in this one. More work on the default web front page, a few extra utility functions for functions_db as well. Some cleanup in the session code to use some of the new abstraction I added a while back. Player's last login time is now also set on the User object. Issue 28: Forward slashes causing crashes, found by Kuros, fixed by me. 2007-06-06 13:38:13 +00:00
Greg Taylor
270db06820 Making get_configvalue a bit more informative if a config value can't be found. Also actually populating the webcontext's game_name via get_configvalue. 2007-06-06 12:37:34 +00:00
Greg Taylor
e80fa61d03 News app. 2007-06-05 20:07:19 +00:00
Greg Taylor
1e13d94b20 Beginnings of the integrated front-end website. 2007-06-05 20:06:21 +00:00
Greg Taylor
94ceec3719 Scripting support is now in! See cmd_look (the end of it), scripthandler.py, and scripts/basicobject.py for very brief examples. I'm not sure how well this is going to scale, I had to kludge the import a bit due to some oddities with __import__. There has to be a better way to do this, hopefully I'll be able to figure it out. In any case, expect basicobject to start fleshing out. You'll be able to use it directly or sub-class it with your own stuff. 2007-06-04 20:01:03 +00:00
Greg Taylor
7d869dff18 Moving the game port selection to settings.py for simplicity and security. 2007-05-27 22:06:12 +00:00
Greg Taylor
543a9cfe26 Fix for MySQL sillyness. 2007-05-27 21:56:40 +00:00
Greg Taylor
f7d58f16ae Possible MySQL fix. 2007-05-27 20:45:40 +00:00
Greg Taylor
5d066a7839 @description? wtf was I thinking? It's supposed to be @describe. Fixing. Existing games will need to update their alias lists. 2007-05-27 16:43:16 +00:00
Michael King
d2115991f8 * Merged in wipe-command branch into trunk (mking) 2007-05-25 17:31:29 +00:00
Greg Taylor
c7f32f904d Lots of re-arranging of the comsys and near completion of comsys player commands. I'm going to halt further progres on this long enough for me to take a second look at my code and re-factor some things, then go on to work on some of the lesser-used commands. New in this revision: on, off, last, who for channels (pub who, etc.). Make sure you nuke all of your comsys-related tables and re-sync. 2007-05-25 03:24:23 +00:00
Greg Taylor
49b6a0ba57 Minor fix to accomodate some database re-organization. 2007-05-25 00:21:08 +00:00
Greg Taylor
e1dbdba951 We don't really need a members field on the channel object. 2007-05-24 20:20:00 +00:00