Merge.
This commit is contained in:
commit
98a5f11159
2 changed files with 6 additions and 6 deletions
|
|
@ -29,7 +29,7 @@ following line to the end of OOCCmdSet's at_cmdset_creation():
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from ev import Command, create_object, utils
|
from ev import Command, create_object, utils
|
||||||
from ev import default_cmds, db_objects
|
from ev import default_cmds, managers
|
||||||
|
|
||||||
CHARACTER_TYPECLASS = settings.BASE_CHARACTER_TYPECLASS
|
CHARACTER_TYPECLASS = settings.BASE_CHARACTER_TYPECLASS
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ class CmdOOCLook(default_cmds.CmdLook):
|
||||||
if not avail_chars:
|
if not avail_chars:
|
||||||
self.caller.msg("You have no characters to look at. Why not create one?")
|
self.caller.msg("You have no characters to look at. Why not create one?")
|
||||||
return
|
return
|
||||||
objs = db_objects.get_objs_with_key_and_typeclass(self.args.strip(), CHARACTER_TYPECLASS)
|
objs = managers.objects.get_objs_with_key_and_typeclass(self.args.strip(), CHARACTER_TYPECLASS)
|
||||||
objs = [obj for obj in objs if obj.id in avail_chars]
|
objs = [obj for obj in objs if obj.id in avail_chars]
|
||||||
if not objs:
|
if not objs:
|
||||||
self.caller.msg("You cannot see this Character.")
|
self.caller.msg("You cannot see this Character.")
|
||||||
|
|
@ -97,7 +97,7 @@ class CmdOOCLook(default_cmds.CmdLook):
|
||||||
charnames = []
|
charnames = []
|
||||||
if self.caller.db._character_dbrefs:
|
if self.caller.db._character_dbrefs:
|
||||||
dbrefs = self.caller.db._character_dbrefs
|
dbrefs = self.caller.db._character_dbrefs
|
||||||
charobjs = [db_objects.get_id(dbref) for dbref in dbrefs]
|
charobjs = [managers.objects.get_id(dbref) for dbref in dbrefs]
|
||||||
charnames = [charobj.key for charobj in charobjs if charobj]
|
charnames = [charobj.key for charobj in charobjs if charobj]
|
||||||
if charnames:
|
if charnames:
|
||||||
charlist = "The following Character(s) are available:\n\n"
|
charlist = "The following Character(s) are available:\n\n"
|
||||||
|
|
@ -154,7 +154,7 @@ class CmdOOCCharacterCreate(Command):
|
||||||
self.caller.msg("Usage: create <character name>")
|
self.caller.msg("Usage: create <character name>")
|
||||||
return
|
return
|
||||||
charname = self.args.strip()
|
charname = self.args.strip()
|
||||||
old_char = db_objects.get_objs_with_key_and_typeclass(charname, CHARACTER_TYPECLASS)
|
old_char = managers.objects.get_objs_with_key_and_typeclass(charname, CHARACTER_TYPECLASS)
|
||||||
if old_char:
|
if old_char:
|
||||||
self.caller.msg("Character {c%s{n already exists." % charname)
|
self.caller.msg("Character {c%s{n already exists." % charname)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ These all return True after successful execution, which makes
|
||||||
especially the msg* functions easier to use in a conditional. Let's
|
especially the msg* functions easier to use in a conditional. Let's
|
||||||
try it.
|
try it.
|
||||||
|
|
||||||
@code crate/look = if caller.key=='Superman' and evl.msg("Your gaze burns a small hole.") or evl.msg("Looks robust!")
|
@code crate/look = caller.key=='Superman' and evl.msg("Your gaze burns a small hole.") or evl.msg("Looks robust!")
|
||||||
|
|
||||||
Now look at the crate. :)
|
Now look at the crate. :)
|
||||||
|
|
||||||
|
|
@ -105,5 +105,5 @@ You can (in evlang) use evl.list() to get a list of all methods currently stored
|
||||||
use the same look slot on the crate again. But this time we'll use the /debug mode of @code, which means the script
|
use the same look slot on the crate again. But this time we'll use the /debug mode of @code, which means the script
|
||||||
will be auto-run immediately and we don't have to look at the create to get a result when developing.
|
will be auto-run immediately and we don't have to look at the create to get a result when developing.
|
||||||
|
|
||||||
@code/debug create/look = evl.msg(evl.list())
|
@code/debug crate/look = evl.msg(evl.list())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue