mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Merge branch 'feature/two-story-houses' into 'feature/deployment'
Add 2nd floor houses. See merge request !5
This commit is contained in:
commit
02a7981d04
5 changed files with 34 additions and 34 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit aacdc95eac2459a4af7234f2b8ad7b36eab5d516
|
Subproject commit 8e276dce36ce41ecdc9d3182174edc7116610591
|
|
@ -317,7 +317,7 @@ class DistributedFurnitureManagerAI(DistributedObjectAI):
|
||||||
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(), issue='Invalid wallpaper at index %s' % index)
|
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(), issue='Invalid wallpaper at index %s' % index)
|
||||||
return ToontownGlobals.FM_InvalidIndex
|
return ToontownGlobals.FM_InvalidIndex
|
||||||
|
|
||||||
if room > 1:
|
if room > 3:
|
||||||
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(), issue='Tried to apply a wallpaper in an invalid room %d!' % room)
|
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(), issue='Tried to apply a wallpaper in an invalid room %d!' % room)
|
||||||
return ToontownGlobals.FM_InvalidItem
|
return ToontownGlobals.FM_InvalidItem
|
||||||
interiorIndex = room*4
|
interiorIndex = room*4
|
||||||
|
@ -354,7 +354,7 @@ class DistributedFurnitureManagerAI(DistributedObjectAI):
|
||||||
def moveWindowFromAttic(self, index, slot):
|
def moveWindowFromAttic(self, index, slot):
|
||||||
retcode = ToontownGlobals.FM_MovedItem
|
retcode = ToontownGlobals.FM_MovedItem
|
||||||
window = self.getAtticFurniture(self.atticWindows, index)
|
window = self.getAtticFurniture(self.atticWindows, index)
|
||||||
if slot > 5:
|
if slot > 7:
|
||||||
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(),
|
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(),
|
||||||
issue='Tried to move window to invalid slot %d!' % slot)
|
issue='Tried to move window to invalid slot %d!' % slot)
|
||||||
return ToontownGlobals.FM_HouseFull
|
return ToontownGlobals.FM_HouseFull
|
||||||
|
@ -373,7 +373,7 @@ class DistributedFurnitureManagerAI(DistributedObjectAI):
|
||||||
window = self.getWindow(fromSlot)
|
window = self.getWindow(fromSlot)
|
||||||
if window is None:
|
if window is None:
|
||||||
return ToontownGlobals.FM_InvalidIndex
|
return ToontownGlobals.FM_InvalidIndex
|
||||||
if toSlot > 5:
|
if toSlot > 7:
|
||||||
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(),
|
self.air.writeServerEvent('suspicious', avId=self.air.getAvatarIdFromSender(),
|
||||||
issue='DistributedfTried to move window to invalid slot %d!' % toSlot)
|
issue='DistributedfTried to move window to invalid slot %d!' % toSlot)
|
||||||
return ToontownGlobals.FM_HouseFull
|
return ToontownGlobals.FM_HouseFull
|
||||||
|
|
|
@ -14,8 +14,8 @@ from toontown.catalog import CatalogFlooringItem
|
||||||
from toontown.catalog import CatalogMouldingItem
|
from toontown.catalog import CatalogMouldingItem
|
||||||
from toontown.catalog import CatalogWainscotingItem
|
from toontown.catalog import CatalogWainscotingItem
|
||||||
from toontown.dna.DNAParser import *
|
from toontown.dna.DNAParser import *
|
||||||
WindowPlugNames = ('**/windowcut_a*', '**/windowcut_b*', '**/windowcut_c*', '**/windowcut_d*', '**/windowcut_e*', '**/windowcut_f*')
|
WindowPlugNames = ['**/windowcut_%s*' % x for x in ('b', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i')]
|
||||||
RoomNames = ('**/group2', '**/group1')
|
RoomNames = ['**/group%s' % x for x in ( 4, 3, 2, 1)]
|
||||||
WallNames = ('ceiling*', 'wall_side_middle*', 'wall_front_middle*', 'windowcut_*')
|
WallNames = ('ceiling*', 'wall_side_middle*', 'wall_front_middle*', 'windowcut_*')
|
||||||
MouldingNames = ('wall_side_top*', 'wall_front_top*')
|
MouldingNames = ('wall_side_top*', 'wall_front_top*')
|
||||||
FloorNames = ('floor*',)
|
FloorNames = ('floor*',)
|
||||||
|
@ -35,7 +35,6 @@ class DistributedHouseInterior(DistributedObject.DistributedObject):
|
||||||
self.houseIndex = 0
|
self.houseIndex = 0
|
||||||
self.interior = None
|
self.interior = None
|
||||||
self.exteriorWindowsHidden = 0
|
self.exteriorWindowsHidden = 0
|
||||||
return
|
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
DistributedObject.DistributedObject.generate(self)
|
DistributedObject.DistributedObject.generate(self)
|
||||||
|
@ -83,8 +82,9 @@ class DistributedHouseInterior(DistributedObject.DistributedObject):
|
||||||
plug.flattenLight()
|
plug.flattenLight()
|
||||||
self.windowSlots.append((plug, viewBase))
|
self.windowSlots.append((plug, viewBase))
|
||||||
|
|
||||||
self.windowSlots[2][1].setPosHpr(16.0, -12.0, 5.51, -90, 0, 0)
|
self.windowSlots[2][1].setPosHpr(-21.28, -37.15, 16.25, -90.4, 0, 0)
|
||||||
self.windowSlots[4][1].setPosHpr(-12.0, 26.0, 5.51, 0, 0, 0)
|
self.windowSlots[6][1].setPosHpr(-12.0, 26.0, 5.51, 0, 0, 0)
|
||||||
|
self.windowSlots[4][1].setPosHpr(16.0, -12.0, 5.51, -90, 0, 0)
|
||||||
self.__colorWalls()
|
self.__colorWalls()
|
||||||
self.__setupWindows()
|
self.__setupWindows()
|
||||||
messenger.send('houseInteriorLoaded-%d' % self.zoneId)
|
messenger.send('houseInteriorLoaded-%d' % self.zoneId)
|
||||||
|
@ -185,19 +185,3 @@ class DistributedHouseInterior(DistributedObject.DistributedObject):
|
||||||
self.windows = CatalogItemList.CatalogItemList(items, store=CatalogItem.Customization | CatalogItem.WindowPlacement)
|
self.windows = CatalogItemList.CatalogItemList(items, store=CatalogItem.Customization | CatalogItem.WindowPlacement)
|
||||||
if self.interior:
|
if self.interior:
|
||||||
self.__setupWindows()
|
self.__setupWindows()
|
||||||
|
|
||||||
def testWallpaperCombo(self, wallpaperType, wallpaperColorIndex, borderIndex, borderColorIndex, mouldingType, mouldingColorIndex, flooringType, flooringColorIndex, wainscotingType, wainscotingColorIndex):
|
|
||||||
wallpaperItem = CatalogWallpaperItem.CatalogWallpaperItem(wallpaperType, wallpaperColorIndex, borderIndex, borderColorIndex)
|
|
||||||
mouldingItem = CatalogMouldingItem.CatalogMouldingItem(mouldingType, mouldingColorIndex)
|
|
||||||
flooringItem = CatalogFlooringItem.CatalogFlooringItem(flooringType, flooringColorIndex)
|
|
||||||
wainscotingItem = CatalogWainscotingItem.CatalogWainscotingItem(wainscotingType, wainscotingColorIndex)
|
|
||||||
self.wallpaper = CatalogItemList.CatalogItemList([wallpaperItem,
|
|
||||||
mouldingItem,
|
|
||||||
flooringItem,
|
|
||||||
wainscotingItem,
|
|
||||||
wallpaperItem,
|
|
||||||
mouldingItem,
|
|
||||||
flooringItem,
|
|
||||||
wainscotingItem], store=CatalogItem.Customization)
|
|
||||||
if self.interior:
|
|
||||||
self.__colorWalls()
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ houseInteriors = [
|
||||||
]
|
]
|
||||||
|
|
||||||
defaultWindows = [
|
defaultWindows = [
|
||||||
CatalogWindowItem(20, placement=2), CatalogWindowItem(20, placement=4)
|
CatalogWindowItem(20, placement=2), CatalogWindowItem(20, placement=4), CatalogWindowItem(20, placement=6)
|
||||||
]
|
]
|
||||||
|
|
||||||
defaultWallpaper = [
|
defaultWallpaper = [
|
||||||
|
@ -34,6 +34,14 @@ defaultWallpaper = [
|
||||||
CatalogMouldingItem(1000, 2),
|
CatalogMouldingItem(1000, 2),
|
||||||
CatalogFlooringItem(1000, 4),
|
CatalogFlooringItem(1000, 4),
|
||||||
CatalogWainscotingItem(1010, 4),
|
CatalogWainscotingItem(1010, 4),
|
||||||
|
CatalogWallpaperItem(1110, 0, 1010, 0),
|
||||||
|
CatalogMouldingItem(1000, 2),
|
||||||
|
CatalogFlooringItem(1000, 4),
|
||||||
|
CatalogWainscotingItem(1010, 4),
|
||||||
|
CatalogWallpaperItem(1110, 0, 1010, 0),
|
||||||
|
CatalogMouldingItem(1000, 2),
|
||||||
|
CatalogFlooringItem(1000, 4),
|
||||||
|
CatalogWainscotingItem(1010, 4),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1328,12 +1328,20 @@ class ObjectManager(NodePath, DirectObject):
|
||||||
if self.deleteMode:
|
if self.deleteMode:
|
||||||
self.requestDelete(item, itemIndex, self.deleteWallpaperFromAttic)
|
self.requestDelete(item, itemIndex, self.deleteWallpaperFromAttic)
|
||||||
return
|
return
|
||||||
if base.localAvatar.getY() < 2.3:
|
room = self.getRoom()
|
||||||
room = 0
|
|
||||||
else:
|
|
||||||
room = 1
|
|
||||||
self.furnitureManager.moveWallpaperFromAttic(itemIndex, room, self.__bringWallpaperFromAtticCallback)
|
self.furnitureManager.moveWallpaperFromAttic(itemIndex, room, self.__bringWallpaperFromAtticCallback)
|
||||||
|
|
||||||
|
def getRoom(self):
|
||||||
|
x, y, z = base.localAvatar.getPos()
|
||||||
|
|
||||||
|
if (x <= -13.5 and y <= -7.6 and y >= 0.0) or (z >= 4.5 and z <= 10):
|
||||||
|
return 0
|
||||||
|
elif base.localAvatar.getZ() > 5.0:
|
||||||
|
return 1
|
||||||
|
elif base.localAvatar.getY() < 2.3:
|
||||||
|
return 2
|
||||||
|
return 3
|
||||||
|
|
||||||
def __bringWallpaperFromAtticCallback(self, retcode, itemIndex, room):
|
def __bringWallpaperFromAtticCallback(self, retcode, itemIndex, room):
|
||||||
self.__enableItemButtons(1)
|
self.__enableItemButtons(1)
|
||||||
if retcode < 0:
|
if retcode < 0:
|
||||||
|
@ -1367,10 +1375,10 @@ class ObjectManager(NodePath, DirectObject):
|
||||||
if self.deleteMode:
|
if self.deleteMode:
|
||||||
self.requestDelete(item, itemIndex, self.deleteWindowFromAttic)
|
self.requestDelete(item, itemIndex, self.deleteWindowFromAttic)
|
||||||
return
|
return
|
||||||
if base.localAvatar.getY() < 2.3:
|
room = self.getRoom()
|
||||||
slot = 2
|
if room == 0:
|
||||||
else:
|
room = 1
|
||||||
slot = 4
|
slot = room * 2
|
||||||
self.furnitureManager.moveWindowFromAttic(itemIndex, slot, self.__bringWindowFromAtticCallback)
|
self.furnitureManager.moveWindowFromAttic(itemIndex, slot, self.__bringWindowFromAtticCallback)
|
||||||
|
|
||||||
def __bringWindowFromAtticCallback(self, retcode, itemIndex, slot):
|
def __bringWindowFromAtticCallback(self, retcode, itemIndex, slot):
|
||||||
|
|
Loading…
Reference in a new issue