Esempio n. 1
0
    def _postLoadStep(self):
        SectionAreaBuilder._postLoadStep(self)
        adjTable = base.worldCreator.uidAdjTables.get(self.master.uniqueId, {})
        for light in self.areaGeometry.findAllMatches('**/=SubLight;+s'):
            zone = self.sectionsToParent.get(light.getTag('SubLight'))
            if zone:
                self.addSubLight(zone, light.find('**/+Light').node())

        self.lightObjects()
Esempio n. 2
0
 def addSectionObj(self, obj, visZone, logError = 0):
     SectionAreaBuilder.addSectionObj(self, obj, visZone)
     parent = self.sectionsToParent.get(visZone)
     if parent and self.areaLights.has_key(parent):
         obj.setAttrib(self.areaLights[parent])
     elif logError:
         errorMessage = 'Chest missing parent visZone %s location %s position %s' % (visZone, localAvatar.getLocation(), localAvatar.getPos())
         localAvatar.sendAILog(errorMessage)
     elif __dev__:
         set_trace()
 def _postLoadStep(self):
     SectionAreaBuilder._postLoadStep(self)
     adjTable = base.worldCreator.uidAdjTables.get(self.master.uniqueId, { })
     for light in self.areaGeometry.findAllMatches('**/=SubLight;+s'):
         zone = self.sectionsToParent.get(light.getTag('SubLight'))
         if zone:
             self.addSubLight(zone, light.find('**/+Light').node())
             continue
     
     self.lightObjects()
 def addSectionObj(self, obj, visZone, logError = 0):
     SectionAreaBuilder.addSectionObj(self, obj, visZone)
     parent = self.sectionsToParent.get(visZone)
     if parent and self.areaLights.has_key(parent):
         obj.setAttrib(self.areaLights[parent])
     elif logError:
         errorMessage = 'Chest missing parent visZone %s location %s position %s' % (visZone, localAvatar.getLocation(), localAvatar.getPos())
         localAvatar.sendAILog(errorMessage)
     elif __dev__:
         set_trace()
Esempio n. 5
0
 def triggerEffects(self, visZone):
     SectionAreaBuilder.triggerEffects(self, visZone)
     parent = self.sectionsToParent.get(visZone)
     if parent:
         module = self.largeObjects.get(parent)
         if module and module.getTag('modular'):
             onset = module.getTag('fog-onset')
             peak = module.getTag('fog-peak')
             if onset:
                 onset = float(onset)
                 peak = float(peak)
                 base.cr.timeOfDayManager.lerpLinearFog(onset, peak)
             else:
                 base.cr.timeOfDayManager.restoreLinearFog()
 def triggerEffects(self, visZone):
     SectionAreaBuilder.triggerEffects(self, visZone)
     parent = self.sectionsToParent.get(visZone)
     if parent:
         module = self.largeObjects.get(parent)
         if module and module.getTag('modular'):
             onset = module.getTag('fog-onset')
             peak = module.getTag('fog-peak')
             if onset:
                 onset = float(onset)
                 peak = float(peak)
                 base.cr.timeOfDayManager.lerpLinearFog(onset, peak)
             else:
                 base.cr.timeOfDayManager.restoreLinearFog()
Esempio n. 7
0
 def addChildObj(self, levelObj):
     root = SectionAreaBuilder.addChildObj(self, levelObj)
     if levelObj['Type'] == 'Cave_Pieces':
         root.setTag('modular', '1')
         if levelObj.get('OverrideFog', False):
             root.setTag('fog-onset', str(levelObj.get('FogOnSet', 0)))
             root.setTag('fog-peak', str(levelObj.get('FogPeak', 100)))
 def addChildObj(self, levelObj):
     root = SectionAreaBuilder.addChildObj(self, levelObj)
     if levelObj['Type'] == 'Cave_Pieces':
         root.setTag('modular', '1')
         if levelObj.get('OverrideFog', False):
             root.setTag('fog-onset', str(levelObj.get('FogOnSet', 0)))
             root.setTag('fog-peak', str(levelObj.get('FogPeak', 100)))
Esempio n. 9
0
 def __init__(self, master):
     SectionAreaBuilder.__init__(self, master)
     self.subLights = { }
     self.adjTable = { }
     self.subLights = { }
     self.areaLights = { }
Esempio n. 10
0
 def unloadObjects(self):
     self.areaLights = { }
     self.subLights = { }
     self.adjTable = { }
     SectionAreaBuilder.unloadObjects(self)
Esempio n. 11
0
 def handleLighting(self, obj, visZone):
     parent = self.sectionsToParent.get(visZone)
     if parent and self.areaLights.has_key(parent):
         obj.setAttrib(self.areaLights[parent])
     
     SectionAreaBuilder.handleLighting(self, obj, visZone)
 def __init__(self, master):
     SectionAreaBuilder.__init__(self, master)
     self.subLights = { }
     self.adjTable = { }
     self.subLights = { }
     self.areaLights = { }
 def unloadObjects(self):
     self.areaLights = { }
     self.subLights = { }
     self.adjTable = { }
     SectionAreaBuilder.unloadObjects(self)
 def handleLighting(self, obj, visZone):
     parent = self.sectionsToParent.get(visZone)
     if parent and self.areaLights.has_key(parent):
         obj.setAttrib(self.areaLights[parent])
     
     SectionAreaBuilder.handleLighting(self, obj, visZone)