mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
35b646c4e6
This reverts commit 1e4bad8c6b
.
33 lines
No EOL
1.1 KiB
Python
Executable file
33 lines
No EOL
1.1 KiB
Python
Executable file
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) |