Added some more functionality to the copy method of objects, as well as some minor fixes.

This commit is contained in:
Griatch 2012-09-11 23:47:29 +02:00
parent 3c96dc9cc9
commit cc6fa079b6
3 changed files with 30 additions and 20 deletions

View file

@ -389,15 +389,14 @@ class Object(TypeClass):
# controller, for example)
dbref = self.dbobj.dbref
self.locks.add("control:perm(Immortals)") # edit locks/permissions, delete
self.locks.add("examine:perm(Builders)") # examine properties
self.locks.add("view:all()") # look at object (visibility)
self.locks.add("edit:perm(Wizards)") # edit properties/attributes
self.locks.add("delete:perm(Wizards)") # delete object
self.locks.add("get:all()") # pick up object
self.locks.add("call:true()") # allow to call commands on this object
self.locks.add("puppet:id(%s) or perm(Immortals) or pperm(Immortals)" % dbref) # restricts puppeting of this object
self.locks.add(";".join("control:perm(Immortals)", # edit locks/permissions, delete
"examine:perm(Builders)", # examine properties
"view:all()", # look at object (visibility)
"edit:perm(Wizards)", # edit properties/attributes
"delete:perm(Wizards)", # delete object
"get:all()", # pick up object
"call:true()", # allow to call commands on this object
"puppet:id(%s) or perm(Immortals) or pperm(Immortals)" % dbref)) # restricts puppeting of this object
def basetype_posthook_setup(self):
"""
@ -721,9 +720,8 @@ class Character(Object):
overload the defaults (it is called after this one).
"""
super(Character, self).basetype_setup()
self.locks.add("get:false()") # noone can pick up the character
self.locks.add("call:false()") # no commands can be called on character from outside
self.locks.add(";".join("get:false()", # noone can pick up the character
"call:false()")) # no commands can be called on character from outside
# add the default cmdset
from settings import CMDSET_DEFAULT
self.cmdset.add_default(CMDSET_DEFAULT, permanent=True)
@ -790,10 +788,10 @@ class Room(Object):
"""
super(Room, self).basetype_setup()
self.locks.add("get:false();puppet:false()") # would be weird to puppet a room ...
self.locks.add(";".join("get:false()",
"puppet:false()")) # would be weird to puppet a room ...
self.location = None
#
# Exits
#
@ -886,9 +884,9 @@ class Exit(Object):
super(Exit, self).basetype_setup()
# setting default locks (overload these in at_object_creation()
self.locks.add("puppet:false()") # would be weird to puppet an exit ...
self.locks.add("traverse:all()") # who can pass through exit by default
self.locks.add("get:false()") # noone can pick up the exit
self.locks.add(";".join("puppet:false()", # would be weird to puppet an exit ...
"traverse:all()", # who can pass through exit by default
"get:false()")) # noone can pick up the exit
# an exit should have a destination (this is replaced at creation time)
if self.dbobj.location: