mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
15 lines
No EOL
595 B
Python
Executable file
15 lines
No EOL
595 B
Python
Executable file
from DistributedNPCToonBaseAI import DistributedNPCToonBaseAI
|
|
|
|
class DistributedNPCClerkAI(DistributedNPCToonBaseAI):
|
|
|
|
def setInventory(self, inventory, money):
|
|
av = self.air.doId2do.get(self.air.getAvatarIdFromSender())
|
|
|
|
if not av:
|
|
return
|
|
|
|
av.b_setMoney(money if av.inventory.validatePurchase(av.inventory.makeFromNetString(inventory), av.getMoney(), money) else av.getMoney())
|
|
av.d_setInventory(av.inventory.makeNetString())
|
|
|
|
def setState(self, avId, state):
|
|
self.sendUpdate('setState', [self.air.getAvatarIdFromSender(), state]) |