mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from toontown.toonbase.ToontownGlobals import *
|
|
from otp.level import BasicEntities
|
|
|
|
class MintProduct(BasicEntities.NodePathEntity):
|
|
Models = {CashbotMintIntA: 'phase_10/models/cashbotHQ/MoneyBag',
|
|
CashbotMintIntB: 'phase_10/models/cashbotHQ/MoneyStackPallet',
|
|
CashbotMintIntC: 'phase_10/models/cashbotHQ/GoldBarStack'}
|
|
Scales = {CashbotMintIntA: 0.98,
|
|
CashbotMintIntB: 0.38,
|
|
CashbotMintIntC: 0.6}
|
|
|
|
def __init__(self, level, entId):
|
|
BasicEntities.NodePathEntity.__init__(self, level, entId)
|
|
self.model = None
|
|
self.mintId = self.level.mintId
|
|
self.loadModel()
|
|
return
|
|
|
|
def destroy(self):
|
|
if self.model:
|
|
self.model.removeNode()
|
|
del self.model
|
|
BasicEntities.NodePathEntity.destroy(self)
|
|
|
|
def loadModel(self):
|
|
if self.model:
|
|
self.model.removeNode()
|
|
self.model = None
|
|
self.model = loader.loadModel(self.Models[self.mintId])
|
|
self.model.setScale(self.Scales[self.mintId])
|
|
self.model.flattenStrong()
|
|
if self.model:
|
|
self.model.reparentTo(self)
|
|
return
|
|
|
|
if __dev__:
|
|
|
|
def setMintId(self, mintId):
|
|
self.mintId = mintId
|
|
self.loadModel()
|