From 5727c4355b9e0b2ebad4a27c599bb27922ed51fb Mon Sep 17 00:00:00 2001 From: Loudrob Date: Wed, 4 Mar 2015 05:45:35 -0500 Subject: [PATCH] Added Zach's getPos, CatalogGUI and furniture fixes. --- otp/avatar/DistributedAvatar.py | 9 +++++++++ toontown/catalog/CatalogGUI.py | 12 +++++++++--- toontown/estate/DistributedFurnitureManager.py | 4 ++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/otp/avatar/DistributedAvatar.py b/otp/avatar/DistributedAvatar.py index 4941a2be..7e95cf1b 100644 --- a/otp/avatar/DistributedAvatar.py +++ b/otp/avatar/DistributedAvatar.py @@ -327,3 +327,12 @@ def leftHand(prop=None): child.removeNode() requestedProp = globalPropPool.getProp(prop) requestedProp.reparentTo(leftHand) + +@magicWord(category=CATEGORY_PROGRAMMER, types=[]) +def getPos(): + """ + print av position + """ + target = spellbook.getTarget() + pos = target.getPos() + print(pos) diff --git a/toontown/catalog/CatalogGUI.py b/toontown/catalog/CatalogGUI.py index 22c9c067..7c4a1d70 100644 --- a/toontown/catalog/CatalogGUI.py +++ b/toontown/catalog/CatalogGUI.py @@ -36,11 +36,17 @@ class CatalogGUI(NodePath, DirectObject): guiItems = loader.loadModel('phase_5.5/models/gui/catalog_gui') hangupGui = guiItems.find('**/hangup') hangupRolloverGui = guiItems.find('**/hangup_rollover') - self.hangup = DirectButton(self, relief=None, pos=(2.28, 0, -1.3), + self.hangup = DirectButton(self, + relief=None, + pos=(-0.158, 0, 0.17), + parent=base.a2dBottomRight, image=[hangupGui, hangupRolloverGui, hangupRolloverGui, hangupGui], text=['', TTLocalizer.CatalogHangUp, TTLocalizer.CatalogHangUp], - text_fg=Vec4(1), text_scale=0.07, text_pos=(0.0, 0.14), - command=self.hangUp) + text_fg=Vec4(1), + text_scale=0.07, + text_pos=(0.0, 0.14), + command=self.hangUp + ) guiItems.removeNode() def setCurrentTab(self, tab): diff --git a/toontown/estate/DistributedFurnitureManager.py b/toontown/estate/DistributedFurnitureManager.py index 1540bd49..007b3849 100644 --- a/toontown/estate/DistributedFurnitureManager.py +++ b/toontown/estate/DistributedFurnitureManager.py @@ -34,8 +34,8 @@ class DistributedFurnitureManager(DistributedObject.DistributedObject): if self.ownerId == base.localAvatar.doId: self.cr.furnitureManager = self if self.cr.objectManager == None: - import houseDesign - self.cr.objectManager = houseDesign.ObjectManager() + import HouseDesign + self.cr.objectManager = HouseDesign.ObjectManager() return def setOwnerName(self, name):