mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 16:57:54 +00:00
36 lines
No EOL
1.5 KiB
Python
36 lines
No EOL
1.5 KiB
Python
from otp.level import LevelMgr
|
|
import FactoryUtil
|
|
from direct.showbase.PythonUtil import Functor
|
|
from toontown.toonbase import ToontownGlobals
|
|
|
|
class FactoryLevelMgr(LevelMgr.LevelMgr):
|
|
InterestingLocations = [(((-866, -272, -40), -101),
|
|
((-662, -242, 7.5), 0),
|
|
((-20, -180, 20), 0),
|
|
((-249, 258, 111), 0),
|
|
((318, 241, 115), -16),
|
|
((-251, 241, 109), -180),
|
|
((296, 292, 703), 56),
|
|
((-740, 122, 28), 90),
|
|
((210, -270, 38), -90)), (((20, 21, 0), 0), ((3, 404, 39), -16), ((-496, 358, 5), 0))]
|
|
|
|
def __init__(self, level, entId):
|
|
LevelMgr.LevelMgr.__init__(self, level, entId)
|
|
if base.config.GetBool('want-factory-lifter', 0):
|
|
self.toonLifter = FactoryUtil.ToonLifter('f3')
|
|
self.callSetters('farPlaneDistance')
|
|
self.geom.reparentTo(render)
|
|
oilRoomOil = self.geom.find('**/oilroom/room/geometry_oilroom/*oil')
|
|
oilRoomFloor = self.geom.find('**/oilroom/room/geometry_oilroom/*platform')
|
|
if oilRoomOil and not oilRoomOil.isEmpty() and oilRoomFloor and not oilRoomFloor.isEmpty():
|
|
oilRoomOil.setBin('background', 10)
|
|
oilRoomFloor.setBin('background', 11)
|
|
|
|
def destroy(self):
|
|
if hasattr(self, 'toonLifter'):
|
|
self.toonLifter.destroy()
|
|
del self.toonLifter
|
|
LevelMgr.LevelMgr.destroy(self)
|
|
|
|
def setFarPlaneDistance(self, farPlaneDistance):
|
|
base.camLens.setNearFar(ToontownGlobals.DefaultCameraNear, farPlaneDistance) |