From 3deb6014ece5bc0e9933cf3340e200b90ee207a5 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Sat, 19 Mar 2005 02:57:26 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/distributed/AccountUD.py | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 direct/src/distributed/AccountUD.py diff --git a/direct/src/distributed/AccountUD.py b/direct/src/distributed/AccountUD.py new file mode 100755 index 0000000000..71a7f581ba --- /dev/null +++ b/direct/src/distributed/AccountUD.py @@ -0,0 +1,39 @@ +""" +Account module: stub to fulfill the Account toon.dc Distributed Class +This is a class Roger needs for the server to be able to display these values +appropriately in the db web interface. +""" + +from direct.directnotify import DirectNotifyGlobal +import DistributedObjectAI + +class AccountUD(DistributedObjectAI.DistributedObjectAI): + if __debug__: + notify = DirectNotifyGlobal.directNotify.newCategory('AccountUD') + + pirateAvatars = [0,0,0,0,0,0] + + def __init__(self, air): + assert air + DistributedObjectAI.DistributedObjectAI.__init__(self, air) + + def setPirate(self, slot, avatarId): + assert self.notify.debugCall() + self.pirateAvatars[slot] = avatarId + assert self.air + self.sendUpdate('pirateAvatars', self.pirateAvatars) + + def getPirate(self, slot): + assert self.notify.debugCall() + return self.pirateAvatars[slot] + + def getSlotLimit(self): + assert self.notify.debugCall() + return 6 + + def may(self, perm): + """ + Ask whether the account has permission to . + """ + assert self.notify.debugCall() + return 1