Пример #1
0
 def __sessid_get(self):
     """
     Getter. Allows for value = self.sessid. Since sessid
     is directly related to self.player, we cannot have
     a sessid without a player being connected (but the
     opposite could be true).
     """
     if not get_field_cache(self, "sessid"):
         del_field_cache(self, "sessid")
     return get_field_cache(self, "sessid")
Пример #2
0
 def __player_get(self):
     """
     Getter. Allows for value = self.player.
     We have to be careful here since Player is also
     a TypedObject, so as to not create a loop.
     """
     return get_field_cache(self, "player")
Пример #3
0
 def __player_get(self):
     """
     Getter. Allows for value = self.player.
     We have to be careful here since Player is also
     a TypedObject, so as to not create a loop.
     """
     player = get_field_cache(self, "player")
     if player:
         try:
             return player.typeclass
         except Exception,e:
             print "player_get:", e
Пример #4
0
 def __destination_get(self):
     "Getter. Allows for value = self.destination."
     dest = get_field_cache(self, "destination")
     if dest:
         return _GA(dest, "typeclass")
     return None
Пример #5
0
 def __home_get(self):
     "Getter. Allows for value = self.home"
     home = get_field_cache(self, "home")
     if home:
         return _GA(home, "typeclass")
     return None
Пример #6
0
 def __location_get(self):
     "Getter. Allows for value = self.location."
     loc = get_field_cache(self, "location")
     if loc:
         return _GA(loc, "typeclass")
     return None
Пример #7
0
 def is_connected_get(self):
     "Getter. Allows for value = self.is_connected"
     return get_field_cache(self, "is_connected")
Пример #8
0
 def character_get(self):
     "Getter. Allows for value = self.character"
     return get_field_cache(self, "obj")
Пример #9
0
 def obj_get(self):
     "Getter. Allows for value = self.obj"
     return get_field_cache(self, "obj")