mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -06:00
Add clerks to Cog HQs, change their appearences, clerk rewrite, add ~dna showrandom m/f magic word.
This commit is contained in:
parent
9494a47466
commit
9a059f3893
12 changed files with 154 additions and 266 deletions
14
dependencies/astron/dclass/stride.dc
vendored
14
dependencies/astron/dclass/stride.dc
vendored
|
@ -1770,8 +1770,8 @@ dclass DistributedNPCScientist : DistributedNPCToonBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
dclass DistributedNPCClerk : DistributedNPCToonBase {
|
||||||
setMovie(uint8, uint32, uint32, int16) broadcast ram;
|
setState(uint32, uint8) broadcast airecv clsend;
|
||||||
setInventory(blob, int16, uint8) airecv clsend;
|
setInventory(blob, int16) airecv clsend;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedNPCTailor : DistributedNPCToonBase {
|
dclass DistributedNPCTailor : DistributedNPCToonBase {
|
||||||
|
@ -3174,11 +3174,11 @@ dclass TTCodeRedemptionMgr : DistributedObject {
|
||||||
|
|
||||||
struct Friend
|
struct Friend
|
||||||
{
|
{
|
||||||
uint32 doId;
|
uint32 doId;
|
||||||
string name;
|
string name;
|
||||||
blob dna;
|
blob dna;
|
||||||
uint16 adminAccess;
|
uint16 adminAccess;
|
||||||
uint32 petId;
|
uint32 petId;
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass TTSFriendsManager : DistributedObjectGlobal {
|
dclass TTSFriendsManager : DistributedObjectGlobal {
|
||||||
|
|
|
@ -123,7 +123,7 @@ class ToonHood(Hood):
|
||||||
self.purchase.unload()
|
self.purchase.unload()
|
||||||
del self.purchase
|
del self.purchase
|
||||||
|
|
||||||
def handlePurchaseDone(self):
|
def handlePurchaseDone(self, playAgain):
|
||||||
doneStatus = self.purchase.getDoneStatus()
|
doneStatus = self.purchase.getDoneStatus()
|
||||||
if doneStatus['where'] == 'playground':
|
if doneStatus['where'] == 'playground':
|
||||||
self.fsm.request('quietZone', [{'loader': 'safeZoneLoader',
|
self.fsm.request('quietZone', [{'loader': 'safeZoneLoader',
|
||||||
|
|
|
@ -22,7 +22,6 @@ class ClerkPurchase(PurchaseBase):
|
||||||
self.timer.reparentTo(self.frame)
|
self.timer.reparentTo(self.frame)
|
||||||
self.timer.posInTopRightCorner()
|
self.timer.posInTopRightCorner()
|
||||||
purchaseModels.removeNode()
|
purchaseModels.removeNode()
|
||||||
return
|
|
||||||
|
|
||||||
def unload(self):
|
def unload(self):
|
||||||
PurchaseBase.unload(self)
|
PurchaseBase.unload(self)
|
||||||
|
@ -36,7 +35,7 @@ class ClerkPurchase(PurchaseBase):
|
||||||
self.handleDone(0)
|
self.handleDone(0)
|
||||||
|
|
||||||
def __timerExpired(self):
|
def __timerExpired(self):
|
||||||
self.handleDone(0)
|
self.handleDone(1)
|
||||||
|
|
||||||
def enterPurchase(self):
|
def enterPurchase(self):
|
||||||
PurchaseBase.enterPurchase(self)
|
PurchaseBase.enterPurchase(self)
|
||||||
|
|
|
@ -100,7 +100,7 @@ class PurchaseBase(StateData.StateData):
|
||||||
return Task.done
|
return Task.done
|
||||||
|
|
||||||
def handleDone(self, playAgain):
|
def handleDone(self, playAgain):
|
||||||
messenger.send(self.doneEvent)
|
messenger.send(self.doneEvent, [playAgain])
|
||||||
|
|
||||||
def enter(self):
|
def enter(self):
|
||||||
self.fsm.request('purchase')
|
self.fsm.request('purchase')
|
||||||
|
|
|
@ -1,120 +1,100 @@
|
||||||
from direct.interval.IntervalGlobal import Sequence
|
from otp.nametag.NametagConstants import CFSpeech, CFTimeout
|
||||||
from direct.task.Task import Task
|
|
||||||
from panda3d.core import *
|
|
||||||
|
|
||||||
from DistributedNPCToonBase import *
|
|
||||||
import NPCToons
|
|
||||||
from toontown.hood import ZoneUtil
|
|
||||||
from toontown.minigame import ClerkPurchase
|
from toontown.minigame import ClerkPurchase
|
||||||
from toontown.shtiker.PurchaseManagerConstants import *
|
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toon import NPCToons
|
||||||
from otp.nametag.NametagConstants import *
|
from DistributedNPCToonBase import DistributedNPCToonBase
|
||||||
|
import time
|
||||||
|
|
||||||
class DistributedNPCClerk(DistributedNPCToonBase):
|
class DistributedNPCClerk(DistributedNPCToonBase):
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
DistributedNPCToonBase.__init__(self, cr)
|
DistributedNPCToonBase.__init__(self, cr)
|
||||||
|
self.lastCollision = 0
|
||||||
self.purchase = None
|
self.purchaseGui = None
|
||||||
self.isLocalToon = 0
|
|
||||||
self.av = None
|
|
||||||
self.purchaseDoneEvent = 'purchaseDone'
|
|
||||||
|
|
||||||
def disable(self):
|
def disable(self):
|
||||||
self.ignoreAll()
|
self.destroyDialog()
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
|
||||||
if self.purchase:
|
|
||||||
self.purchase.exit()
|
|
||||||
self.purchase.unload()
|
|
||||||
self.purchase = None
|
|
||||||
self.av = None
|
|
||||||
base.localAvatar.posCamera(0, 0)
|
|
||||||
|
|
||||||
DistributedNPCToonBase.disable(self)
|
DistributedNPCToonBase.disable(self)
|
||||||
|
|
||||||
def handleCollisionSphereEnter(self, collEntry):
|
def destroyDialog(self):
|
||||||
base.cr.playGame.getPlace().fsm.request('purchase')
|
|
||||||
self.sendUpdate('avatarEnter', [])
|
|
||||||
|
|
||||||
def __handleUnexpectedExit(self):
|
|
||||||
self.notify.warning('unexpected exit')
|
|
||||||
self.av = None
|
|
||||||
|
|
||||||
def resetClerk(self):
|
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
|
self.clearChat()
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||||
if self.purchase:
|
|
||||||
self.purchase.exit()
|
|
||||||
self.purchase.unload()
|
|
||||||
self.purchase = None
|
|
||||||
self.clearMat()
|
|
||||||
self.startLookAround()
|
|
||||||
self.detectAvatars()
|
|
||||||
if self.isLocalToon:
|
|
||||||
self.showNametag2d()
|
|
||||||
self.freeAvatar()
|
|
||||||
return Task.done
|
|
||||||
|
|
||||||
def setMovie(self, mode, npcId, avId, timestamp):
|
if self.purchaseGui:
|
||||||
timeStamp = ClockDelta.globalClockDelta.localElapsedTime(timestamp)
|
self.purchaseGui.exit()
|
||||||
self.remain = NPCToons.CLERK_COUNTDOWN_TIME - timeStamp
|
self.purchaseGui.unload()
|
||||||
self.isLocalToon = avId == base.localAvatar.doId
|
self.purchaseGui = None
|
||||||
if mode == NPCToons.PURCHASE_MOVIE_CLEAR:
|
|
||||||
|
def initToonState(self):
|
||||||
|
if self.name in NPCToons.ClerkPositions:
|
||||||
|
self.putOnSuit(ToontownGlobals.cogHQZoneId2deptIndex(self.zoneId), rental=True)
|
||||||
|
|
||||||
|
self.setAnimState('neutral', 0.9, None, None)
|
||||||
|
self.updatePosition()
|
||||||
|
|
||||||
|
def updatePosition(self):
|
||||||
|
if self.name in NPCToons.ClerkPositions:
|
||||||
|
pos = NPCToons.ClerkPositions[self.name]
|
||||||
|
self.setPos(*pos[0])
|
||||||
|
self.setH(pos[1])
|
||||||
|
else:
|
||||||
|
DistributedNPCToonBase.initToonState(self)
|
||||||
|
|
||||||
|
def freeAvatar(self):
|
||||||
|
base.localAvatar.posCamera(0, 0)
|
||||||
|
base.cr.playGame.getPlace().fsm.request('walk')
|
||||||
|
|
||||||
|
def handleCollisionSphereEnter(self, collEntry):
|
||||||
|
if self.lastCollision > time.time():
|
||||||
return
|
return
|
||||||
if mode == NPCToons.PURCHASE_MOVIE_TIMEOUT:
|
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
self.lastCollision = time.time() + ToontownGlobals.NPCCollisionDelay
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
|
||||||
if self.isLocalToon:
|
if not base.localAvatar.getMoney():
|
||||||
self.ignore(self.purchaseDoneEvent)
|
|
||||||
if self.purchase:
|
|
||||||
self.__handlePurchaseDone()
|
|
||||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_TOOKTOOLONG, CFSpeech | CFTimeout)
|
|
||||||
self.resetClerk()
|
|
||||||
elif mode == NPCToons.PURCHASE_MOVIE_START:
|
|
||||||
if self.isLocalToon:
|
|
||||||
self.hideNametag2d()
|
|
||||||
self.av = base.cr.doId2do.get(avId)
|
|
||||||
if self.av is None:
|
|
||||||
self.notify.warning('Avatar %d not found in doId' % avId)
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
self.accept(self.av.uniqueName('disable'), self.__handleUnexpectedExit)
|
|
||||||
self.setupAvatars(self.av)
|
|
||||||
if self.isLocalToon:
|
|
||||||
camera.wrtReparentTo(render)
|
|
||||||
seq = Sequence((camera.posQuatInterval(1, Vec3(-5, 9, self.getHeight() - 0.5), Vec3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))))
|
|
||||||
seq.start()
|
|
||||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
|
||||||
if self.isLocalToon:
|
|
||||||
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))
|
|
||||||
elif mode == NPCToons.PURCHASE_MOVIE_COMPLETE:
|
|
||||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_GOODBYE, CFSpeech | CFTimeout)
|
|
||||||
self.resetClerk()
|
|
||||||
elif mode == NPCToons.PURCHASE_MOVIE_NO_MONEY:
|
|
||||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_NEEDJELLYBEANS, CFSpeech | CFTimeout)
|
self.setChatAbsolute(TTLocalizer.STOREOWNER_NEEDJELLYBEANS, CFSpeech | CFTimeout)
|
||||||
self.resetClerk()
|
return
|
||||||
return
|
|
||||||
|
self.d_setState(ToontownGlobals.CLERK_GREETING)
|
||||||
|
base.cr.playGame.getPlace().fsm.request('purchase')
|
||||||
|
camera.wrtReparentTo(render)
|
||||||
|
camera.posQuatInterval(1, Vec3(-5, 9, self.getHeight() - 0.5), Vec3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')).start()
|
||||||
|
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))
|
||||||
|
|
||||||
|
def d_setInventory(self, inventory, money):
|
||||||
|
self.sendUpdate('setInventory', [inventory, money])
|
||||||
|
|
||||||
|
def d_setState(self, state):
|
||||||
|
self.sendUpdate('setState', [0, state])
|
||||||
|
|
||||||
|
def setState(self, avId, state):
|
||||||
|
av = base.cr.doId2do.get(avId)
|
||||||
|
|
||||||
|
if not av:
|
||||||
|
return
|
||||||
|
|
||||||
|
if state == ToontownGlobals.CLERK_GOODBYE:
|
||||||
|
self.setChatAbsolute(TTLocalizer.STOREOWNER_GOODBYE, CFSpeech | CFTimeout)
|
||||||
|
elif state == ToontownGlobals.CLERK_GREETING:
|
||||||
|
self.lookAtAvatar(av)
|
||||||
|
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
||||||
|
return
|
||||||
|
elif state == ToontownGlobals.CLERK_TOOKTOOLONG:
|
||||||
|
self.setChatAbsolute(TTLocalizer.STOREOWNER_TOOKTOOLONG, CFSpeech | CFTimeout)
|
||||||
|
|
||||||
|
self.updatePosition()
|
||||||
|
|
||||||
def popupPurchaseGUI(self, task):
|
def popupPurchaseGUI(self, task):
|
||||||
self.setChatAbsolute('', CFSpeech)
|
self.clearChat()
|
||||||
self.acceptOnce(self.purchaseDoneEvent, self.__handlePurchaseDone)
|
self.acceptOnce('purchaseClerkDone', self.__handlePurchaseDone)
|
||||||
self.accept('boughtGag', self.__handleBoughtGag)
|
self.purchaseGui = ClerkPurchase.ClerkPurchase(base.localAvatar, NPCToons.CLERK_COUNTDOWN_TIME, 'purchaseClerkDone')
|
||||||
self.purchase = ClerkPurchase.ClerkPurchase(base.localAvatar, self.remain, self.purchaseDoneEvent)
|
self.purchaseGui.load()
|
||||||
self.purchase.load()
|
self.purchaseGui.enter()
|
||||||
self.purchase.enter()
|
|
||||||
return Task.done
|
|
||||||
|
|
||||||
def __handleBoughtGag(self):
|
def __handlePurchaseDone(self, state):
|
||||||
self.d_setInventory(base.localAvatar.inventory.makeNetString(), base.localAvatar.getMoney(), 0)
|
self.d_setInventory(base.localAvatar.inventory.makeNetString(), base.localAvatar.getMoney())
|
||||||
|
self.destroyDialog()
|
||||||
def __handlePurchaseDone(self):
|
self.freeAvatar()
|
||||||
self.ignore('boughtGag')
|
self.detectAvatars()
|
||||||
self.d_setInventory(base.localAvatar.inventory.makeNetString(), base.localAvatar.getMoney(), 1)
|
self.d_setState(state)
|
||||||
self.purchase.exit()
|
|
||||||
self.purchase.unload()
|
|
||||||
self.purchase = None
|
|
||||||
|
|
||||||
def d_setInventory(self, invString, money, done):
|
|
||||||
self.sendUpdate('setInventory', [invString, money, done])
|
|
|
@ -1,108 +1,15 @@
|
||||||
from otp.ai.AIBaseGlobal import *
|
from DistributedNPCToonBaseAI import DistributedNPCToonBaseAI
|
||||||
from direct.task.Task import Task
|
|
||||||
from panda3d.core import *
|
|
||||||
from DistributedNPCToonBaseAI import *
|
|
||||||
|
|
||||||
class DistributedNPCClerkAI(DistributedNPCToonBaseAI):
|
class DistributedNPCClerkAI(DistributedNPCToonBaseAI):
|
||||||
|
|
||||||
def __init__(self, air, npcId):
|
def setInventory(self, inventory, money):
|
||||||
DistributedNPCToonBaseAI.__init__(self, air, npcId)
|
av = self.air.doId2do.get(self.air.getAvatarIdFromSender())
|
||||||
self.timedOut = 0
|
|
||||||
|
|
||||||
def delete(self):
|
if not av:
|
||||||
taskMgr.remove(self.uniqueName('clearMovie'))
|
|
||||||
self.ignoreAll()
|
|
||||||
DistributedNPCToonBaseAI.delete(self)
|
|
||||||
|
|
||||||
def avatarEnter(self):
|
|
||||||
avId = self.air.getAvatarIdFromSender()
|
|
||||||
DistributedNPCToonBaseAI.avatarEnter(self)
|
|
||||||
av = self.air.doId2do.get(avId)
|
|
||||||
if av is None:
|
|
||||||
self.notify.warning('toon isnt there! toon: %s' % avId)
|
|
||||||
return
|
return
|
||||||
self.acceptOnce(self.air.getAvatarExitEvent(avId), self.__handleUnexpectedExit, extraArgs=[avId])
|
|
||||||
if self.isBusy():
|
|
||||||
self.freeAvatar(avId)
|
|
||||||
return
|
|
||||||
if av.getMoney():
|
|
||||||
self.sendStartMovie(avId)
|
|
||||||
else:
|
|
||||||
self.sendNoMoneyMovie(avId)
|
|
||||||
|
|
||||||
def sendStartMovie(self, avId):
|
av.b_setMoney(money if av.inventory.validatePurchase(av.inventory.makeFromNetString(inventory), av.getMoney(), money) else av.getMoney())
|
||||||
self.busy = avId
|
av.d_setInventory(av.inventory.makeNetString())
|
||||||
self.sendUpdate('setMovie', [NPCToons.PURCHASE_MOVIE_START,
|
|
||||||
self.npcId,
|
def setState(self, avId, state):
|
||||||
avId,
|
self.sendUpdate('setState', [self.air.getAvatarIdFromSender(), state])
|
||||||
ClockDelta.globalClockDelta.getRealNetworkTime()])
|
|
||||||
taskMgr.doMethodLater(NPCToons.CLERK_COUNTDOWN_TIME, self.sendTimeoutMovie, self.uniqueName('clearMovie'))
|
|
||||||
|
|
||||||
def sendNoMoneyMovie(self, avId):
|
|
||||||
self.busy = avId
|
|
||||||
self.sendUpdate('setMovie', [NPCToons.PURCHASE_MOVIE_NO_MONEY,
|
|
||||||
self.npcId,
|
|
||||||
avId,
|
|
||||||
ClockDelta.globalClockDelta.getRealNetworkTime()])
|
|
||||||
self.sendClearMovie(None)
|
|
||||||
return
|
|
||||||
|
|
||||||
def sendTimeoutMovie(self, task):
|
|
||||||
self.timedOut = 1
|
|
||||||
self.sendUpdate('setMovie', [NPCToons.PURCHASE_MOVIE_TIMEOUT,
|
|
||||||
self.npcId,
|
|
||||||
self.busy,
|
|
||||||
ClockDelta.globalClockDelta.getRealNetworkTime()])
|
|
||||||
self.sendClearMovie(None)
|
|
||||||
return Task.done
|
|
||||||
|
|
||||||
def sendClearMovie(self, task):
|
|
||||||
self.ignore(self.air.getAvatarExitEvent(self.busy))
|
|
||||||
self.busy = 0
|
|
||||||
self.timedOut = 0
|
|
||||||
self.sendUpdate('setMovie', [NPCToons.PURCHASE_MOVIE_CLEAR,
|
|
||||||
self.npcId,
|
|
||||||
0,
|
|
||||||
ClockDelta.globalClockDelta.getRealNetworkTime()])
|
|
||||||
return Task.done
|
|
||||||
|
|
||||||
def completePurchase(self, avId):
|
|
||||||
self.busy = avId
|
|
||||||
self.sendUpdate('setMovie', [NPCToons.PURCHASE_MOVIE_COMPLETE,
|
|
||||||
self.npcId,
|
|
||||||
avId,
|
|
||||||
ClockDelta.globalClockDelta.getRealNetworkTime()])
|
|
||||||
self.sendClearMovie(None)
|
|
||||||
return
|
|
||||||
|
|
||||||
def setInventory(self, blob, newMoney, done):
|
|
||||||
avId = self.air.getAvatarIdFromSender()
|
|
||||||
if self.busy != avId:
|
|
||||||
if self.busy != 0:
|
|
||||||
self.air.writeServerEvent('suspicious', avId, 'DistributedNPCClerkAI.setInventory busy with %s' % self.busy)
|
|
||||||
self.notify.warning('setInventory from unknown avId: %s busy: %s' % (avId, self.busy))
|
|
||||||
return
|
|
||||||
if avId in self.air.doId2do:
|
|
||||||
av = self.air.doId2do[avId]
|
|
||||||
newInventory = av.inventory.makeFromNetString(blob)
|
|
||||||
currentMoney = av.getMoney()
|
|
||||||
if av.inventory.validatePurchase(newInventory, currentMoney, newMoney):
|
|
||||||
av.setMoney(newMoney)
|
|
||||||
if done:
|
|
||||||
av.d_setInventory(av.inventory.makeNetString())
|
|
||||||
av.d_setMoney(newMoney)
|
|
||||||
else:
|
|
||||||
self.air.writeServerEvent('suspicious', avId, 'DistributedNPCClerkAI.setInventory invalid purchase')
|
|
||||||
self.notify.warning('Avatar ' + str(avId) + ' attempted an invalid purchase.')
|
|
||||||
av.d_setInventory(av.inventory.makeNetString())
|
|
||||||
av.d_setMoney(av.getMoney())
|
|
||||||
if self.timedOut:
|
|
||||||
return
|
|
||||||
if done:
|
|
||||||
taskMgr.remove(self.uniqueName('clearMovie'))
|
|
||||||
self.completePurchase(avId)
|
|
||||||
|
|
||||||
def __handleUnexpectedExit(self, avId):
|
|
||||||
self.notify.warning('avatar:' + str(avId) + ' has exited unexpectedly')
|
|
||||||
self.sendTimeoutMovie(None)
|
|
||||||
return
|
|
|
@ -112,6 +112,9 @@ class DistributedNPCToonBase(DistributedToon.DistributedToon):
|
||||||
|
|
||||||
def setupAvatars(self, av):
|
def setupAvatars(self, av):
|
||||||
self.ignoreAvatars()
|
self.ignoreAvatars()
|
||||||
|
self.lookAtAvatar(av)
|
||||||
|
|
||||||
|
def lookAtAvatar(self, av):
|
||||||
av.headsUp(self, 0, 0, 0)
|
av.headsUp(self, 0, 0, 0)
|
||||||
self.headsUp(av, 0, 0, 0)
|
self.headsUp(av, 0, 0, 0)
|
||||||
av.stopLookAround()
|
av.stopLookAround()
|
||||||
|
|
|
@ -4753,6 +4753,8 @@ def dna(part, value):
|
||||||
|
|
||||||
if part == 'show':
|
if part == 'show':
|
||||||
return dna.asTuple()
|
return dna.asTuple()
|
||||||
|
if part == 'showrandom':
|
||||||
|
return NPCToons.getRandomDNA(time.time(), value)
|
||||||
return 'Invalid part: ' + part
|
return 'Invalid part: ' + part
|
||||||
|
|
||||||
@magicWord(category=CATEGORY_ADMINISTRATOR, types=[int])
|
@magicWord(category=CATEGORY_ADMINISTRATOR, types=[int])
|
||||||
|
|
|
@ -214,7 +214,7 @@ class InventoryBase(DirectObject.DirectObject):
|
||||||
return self.countPropsInList(newInventory) - self.totalProps
|
return self.countPropsInList(newInventory) - self.totalProps
|
||||||
|
|
||||||
def validatePurchase(self, newInventory, currentMoney, newMoney):
|
def validatePurchase(self, newInventory, currentMoney, newMoney):
|
||||||
if newMoney > currentMoney:
|
if newMoney > currentMoney or newMoney < 0:
|
||||||
self.notify.warning('Somebody lied about their money! Rejecting purchase.')
|
self.notify.warning('Somebody lied about their money! Rejecting purchase.')
|
||||||
return 0
|
return 0
|
||||||
newItemTotal = self.countPropsInList(newInventory)
|
newItemTotal = self.countPropsInList(newInventory)
|
||||||
|
|
|
@ -11576,6 +11576,12 @@ NPCToonDict = {20000: (-1,
|
||||||
NPC_REGULAR),
|
NPC_REGULAR),
|
||||||
10001: (10000,
|
10001: (10000,
|
||||||
lnames[10001],
|
lnames[10001],
|
||||||
|
'r',
|
||||||
|
'f',
|
||||||
|
0,
|
||||||
|
NPC_LAFF_RESTOCK),
|
||||||
|
10002: (10000,
|
||||||
|
lnames[10002],
|
||||||
('fss',
|
('fss',
|
||||||
'md',
|
'md',
|
||||||
'l',
|
'l',
|
||||||
|
@ -11593,67 +11599,43 @@ NPCToonDict = {20000: (-1,
|
||||||
0),
|
0),
|
||||||
'f',
|
'f',
|
||||||
0,
|
0,
|
||||||
NPC_LAFF_RESTOCK),
|
NPC_CLERK),
|
||||||
11001: (11000,
|
11001: (11000,
|
||||||
lnames[11001],
|
lnames[11001],
|
||||||
('dll',
|
'r',
|
||||||
'ls',
|
|
||||||
's',
|
|
||||||
'm',
|
|
||||||
6,
|
|
||||||
0,
|
|
||||||
6,
|
|
||||||
6,
|
|
||||||
9,
|
|
||||||
3,
|
|
||||||
9,
|
|
||||||
3,
|
|
||||||
2,
|
|
||||||
4,
|
|
||||||
0),
|
|
||||||
'm',
|
'm',
|
||||||
0,
|
0,
|
||||||
NPC_LAFF_RESTOCK),
|
NPC_LAFF_RESTOCK),
|
||||||
|
11002: (11000,
|
||||||
|
lnames[11002],
|
||||||
|
'r',
|
||||||
|
'm',
|
||||||
|
0,
|
||||||
|
NPC_CLERK),
|
||||||
12001: (12000,
|
12001: (12000,
|
||||||
lnames[12001],
|
lnames[12001],
|
||||||
('mss',
|
'r',
|
||||||
'ls',
|
|
||||||
's',
|
|
||||||
'm',
|
|
||||||
8,
|
|
||||||
0,
|
|
||||||
8,
|
|
||||||
8,
|
|
||||||
5,
|
|
||||||
12,
|
|
||||||
5,
|
|
||||||
12,
|
|
||||||
7,
|
|
||||||
16,
|
|
||||||
0),
|
|
||||||
'm',
|
'm',
|
||||||
0,
|
0,
|
||||||
NPC_LAFF_RESTOCK),
|
NPC_LAFF_RESTOCK),
|
||||||
|
12002: (12000,
|
||||||
|
lnames[12002],
|
||||||
|
'r',
|
||||||
|
'm',
|
||||||
|
0,
|
||||||
|
NPC_CLERK),
|
||||||
13001: (13000,
|
13001: (13000,
|
||||||
lnames[13001],
|
lnames[13001],
|
||||||
('dss',
|
'r',
|
||||||
'ld',
|
|
||||||
's',
|
|
||||||
'f',
|
|
||||||
17,
|
|
||||||
0,
|
|
||||||
17,
|
|
||||||
17,
|
|
||||||
1,
|
|
||||||
24,
|
|
||||||
1,
|
|
||||||
24,
|
|
||||||
0,
|
|
||||||
9,
|
|
||||||
0),
|
|
||||||
'f',
|
'f',
|
||||||
0,
|
0,
|
||||||
NPC_LAFF_RESTOCK)}
|
NPC_LAFF_RESTOCK),
|
||||||
|
13002: (13000,
|
||||||
|
lnames[13002],
|
||||||
|
'r',
|
||||||
|
'f',
|
||||||
|
0,
|
||||||
|
NPC_CLERK)}
|
||||||
|
|
||||||
if config.GetBool('want-new-toonhall', 1):
|
if config.GetBool('want-new-toonhall', 1):
|
||||||
NPCToonDict[2001] = (2513,
|
NPCToonDict[2001] = (2513,
|
||||||
|
@ -11697,9 +11679,13 @@ else:
|
||||||
NPC_REGULAR)
|
NPC_REGULAR)
|
||||||
BlockerPositions = {TTLocalizer.Flippy: (Point3(207.4, 18.81, -0.475), 90.0)}
|
BlockerPositions = {TTLocalizer.Flippy: (Point3(207.4, 18.81, -0.475), 90.0)}
|
||||||
LaffRestockPositions = {lnames[11001]: ((-27.0, -170.0, -19.6), 215.0),
|
LaffRestockPositions = {lnames[11001]: ((-27.0, -170.0, -19.6), 215.0),
|
||||||
lnames[12001]: ((361.9, -394.4, -23.5), 113.5),
|
lnames[12001]: ((361.9, -394.4, -23.5), 120.0),
|
||||||
lnames[13001]: ((143.7, -381.4, -68.4), 0.0),
|
lnames[13001]: ((143.7, -381.4, -68.4), 0.0),
|
||||||
lnames[10001]: ((135.0, 128.8, 0.025), -212.8)}
|
lnames[10001]: ((135.0, 128.8, 0.025), -212.8)}
|
||||||
|
ClerkPositions = {lnames[11002]: ((37.3, -167.5, -19.6), 130.0),
|
||||||
|
lnames[12002]: ((361.9, -460.4, -23.5), 60.0),
|
||||||
|
lnames[13002]: ((38.3, -389.5, -68.4), 0.0),
|
||||||
|
lnames[10002]: ((84, 127.8, 0.025), -180.0)}
|
||||||
GlovePositions = {lnames[2021]: ((101, -14, 4), -305)}
|
GlovePositions = {lnames[2021]: ((101, -14, 4), -305)}
|
||||||
del lnames
|
del lnames
|
||||||
zone2NpcDict = {}
|
zone2NpcDict = {}
|
||||||
|
|
|
@ -6245,9 +6245,13 @@ NPCToonNames = {20000: 'Tutorial Tom',
|
||||||
7010: 'Jaymo',
|
7010: 'Jaymo',
|
||||||
7011: 'Donald',
|
7011: 'Donald',
|
||||||
10001: 'Healer Sara',
|
10001: 'Healer Sara',
|
||||||
|
10002: 'Clerk Barbra',
|
||||||
11001: 'Healer Gabriel',
|
11001: 'Healer Gabriel',
|
||||||
|
11002: 'Clerk Brendan',
|
||||||
12001: 'Healer Bill',
|
12001: 'Healer Bill',
|
||||||
13001: 'Healer Clover'}
|
12002: 'Clerk John',
|
||||||
|
13001: 'Healer Clover',
|
||||||
|
13002: 'Clerk Audrey'}
|
||||||
zone2TitleDict = {2513: ('Toon Hall', ''),
|
zone2TitleDict = {2513: ('Toon Hall', ''),
|
||||||
2514: ('Toontown Bank', ''),
|
2514: ('Toontown Bank', ''),
|
||||||
2516: ('Toontown School House', ''),
|
2516: ('Toontown School House', ''),
|
||||||
|
|
|
@ -1621,9 +1621,16 @@ BMovementSpeed = 0
|
||||||
BMovementSpeedMultiplier = 1.3
|
BMovementSpeedMultiplier = 1.3
|
||||||
|
|
||||||
BugReportSite = 'https://bugs.launchpad.net/toontown-united/+filebug'
|
BugReportSite = 'https://bugs.launchpad.net/toontown-united/+filebug'
|
||||||
|
NPCCollisionDelay = 2.5
|
||||||
|
|
||||||
CostPerLaffRestock = 3
|
CostPerLaffRestock = 3
|
||||||
|
|
||||||
FISHSALE_COMPLETE = 0
|
FISHSALE_COMPLETE = 0
|
||||||
FISHSALE_TROPHY = 1
|
FISHSALE_TROPHY = 1
|
||||||
NPCCollisionDelay = 2.5
|
|
||||||
|
CLERK_GOODBYE = 0
|
||||||
|
CLERK_GREETING = 1
|
||||||
|
CLERK_TOOKTOOLONG = 2
|
||||||
|
|
||||||
KnockKnockHeal = 12
|
KnockKnockHeal = 12
|
||||||
KnockKnockCooldown = 600
|
KnockKnockCooldown = 600
|
||||||
|
|
Loading…
Reference in a new issue