def initialize(self):
        # Get DNA file appropriate to this house...
        interior = random.choice(HouseGlobals.interiors)
        
        dnaFile = interior[0]
        phonePos = interior[4]

        # Load DNA...
        dnaData = self.air.loadDNA(dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData, phonePos)

        # Set furniture:
        self.furnitureManager.setItems(furnitureReader.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()
コード例 #2
0
    def initialize(self):
        # Get DNA file appropriate to this house...
        dnaFile = houseInteriors[self.houseIndex]

        # Load DNA...
        dnaStorage = DNAStorage()
        dnaData = loadDNAFileAI(dnaStorage, dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData, self.house.gender,
                                               [-11, 2, 0, 0, 0, 0])

        # Set furniture:
        self.furnitureManager.setItems(furnitureReader.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()
コード例 #3
0
    def initialize(self):
        # Get DNA file appropriate to this house...
        interior = random.choice(HouseGlobals.interiors)

        dnaFile = interior[0]
        phonePos = interior[4]

        # Load DNA...
        dnaData = self.air.loadDNA(dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData, phonePos)

        # Set furniture:
        self.furnitureManager.setItems(furnitureReader.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()
コード例 #4
0
    def initialize(self):
        # Get DNA file appropriate to this house...
        dnaFile = houseInteriors[self.houseIndex]

        # Load DNA...
        dnaStorage = DNAStorage()
        dnaData = simbase.air.loadDNAFileAI(dnaStorage, dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData)

        # Set furniture:
        items = furnitureReader.getList()
        items.append(CatalogFurnitureItem(1399, posHpr=(-11.5, 1.8, 0, 0, 0, 0)))
        
        if self.house.avatarId:
            av = simbase.air.doId2do.get(self.house.avatarId)
            if av:
                gender = av.getStyle().getGender()
                items.append(CatalogFurnitureItem(4000 + (10 if gender == "f" else 0),
                                                  posHpr=(-2.3, 9, 0, 270, 0, 0)))
        
        self.furnitureManager.setItems(items.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()
コード例 #5
0
 def initialize(self):
     interior = random.choice(HouseGlobals.interiors)
     dnaFile = interior[0]
     phonePos = interior[4]
     dnaData = self.air.loadDNA(dnaFile)
     furnitureReader = DNAFurnitureReaderAI(dnaData, phonePos)
     self.furnitureManager.setItems(furnitureReader.getBlob())
     del self.furnitureManager.windows[:]
     self.furnitureManager.windows.extend(defaultWindows)
     self.furnitureManager.applyWindows()
     del self.furnitureManager.wallpaper[:]
     self.furnitureManager.wallpaper.extend(defaultWallpaper)
     self.furnitureManager.applyWallpaper()
     self.furnitureManager.saveToHouse()
 def initialize(self):
     interior = random.choice(HouseGlobals.interiors)
     dnaFile = interior[0]
     phonePos = interior[4]
     dnaData = self.air.loadDNA(dnaFile)
     furnitureReader = DNAFurnitureReaderAI(dnaData, phonePos)
     self.furnitureManager.setItems(furnitureReader.getBlob())
     del self.furnitureManager.windows[:]
     self.furnitureManager.windows.extend(defaultWindows)
     self.furnitureManager.applyWindows()
     del self.furnitureManager.wallpaper[:]
     self.furnitureManager.wallpaper.extend(defaultWallpaper)
     self.furnitureManager.applyWallpaper()
     self.furnitureManager.saveToHouse()
コード例 #7
0
    def initialize(self):
        # Get DNA file appropriate to this house...
        dnaFile = houseInteriors[self.houseIndex]

        # Load DNA...
        dnaStorage = DNAStorage()
        dnaData = loadDNAFileAI(dnaStorage, dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData, [-11, 2, 0, 0, 0, 0])

        # Set furniture:
        self.furnitureManager.setItems(furnitureReader.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()
コード例 #8
0
    def initialize(self):
        # Get DNA file appropriate to this house...
        dnaFile = houseInteriors[self.houseIndex]

        # Load DNA...
        dnaStorage = DNAStorage()
        dnaData = simbase.air.loadDNAFileAI(dnaStorage, dnaFile)

        # Read it into furniture...
        furnitureReader = DNAFurnitureReaderAI(dnaData)

        # Set furniture:
        items = furnitureReader.getList()
        items.append(
            CatalogFurnitureItem(1399, posHpr=(-11.5, 1.8, 0, 0, 0, 0)))

        if self.house.avatarId:
            av = simbase.air.doId2do.get(self.house.avatarId)
            if av:
                gender = av.getStyle().getGender()
                items.append(
                    CatalogFurnitureItem(4000 + (10 if gender == "f" else 0),
                                         posHpr=(-2.3, 9, 0, 270, 0, 0)))

        self.furnitureManager.setItems(items.getBlob())

        # Set default windows and wallpaper:
        del self.furnitureManager.windows[:]
        self.furnitureManager.windows.extend(defaultWindows)
        self.furnitureManager.applyWindows()
        del self.furnitureManager.wallpaper[:]
        self.furnitureManager.wallpaper.extend(defaultWallpaper)
        self.furnitureManager.applyWallpaper()

        # Save:
        self.furnitureManager.saveToHouse()