def __init__(self, air, worldFile=None, gameZone=WorldGlobals.ISLAND_GRID_STARTING_ZONE): WorldCreatorBase.__init__(self, air, worldFile) self.air = air self.world = None self.ocean = None self.gameZone = gameZone
def createObject(self, object, parent, parentUid, objKey, dynamic, parentIsObj=False, fileName=None, actualParentObj=None): objType = WorldCreatorBase.createObject(self, object, parent, parentUid, objKey, dynamic, parentIsObj, fileName, actualParentObj) if not objType: return (None, None) newObj = None objParent = None if objType == ObjectList.AREA_TYPE_WORLD_REGION: objParent = self.__createWorldInstance(object, parent, parentUid, objKey, dynamic) else: newObj = self.world.builder.createObject(objType, object, parent, parentUid, objKey, dynamic, parentIsObj, fileName, actualParentObj) return (newObj, objParent)
def loadObject(self, object, parent, parentUid, objKey, dynamic, parentIsObj=False, fileName=None, actualParentObj=None): objType = WorldCreatorBase.loadObject(self, object, parent, parentUid, objKey, dynamic, parentIsObj, fileName, actualParentObj) if objType == 'Island': self.world = DistributedInstanceWorldAI(self.air) self.world.generateWithRequired(zoneId=self.gameZone) self.world.generateIslands(object['Visual']['Model'], object['Name'], objKey, object['Undockable'], self.gameZone) self.ocean = DistributedOceanGridAI(self.air) self.ocean.generateWithRequired(zoneId=self.gameZone)
def loadObjectsFromFile(self, filename, parent=None, parentIsObj=False): return WorldCreatorBase.loadObjectsFromFile(self, filename, parent or self.air, parentIsObj)
def __init__(self, air): self.air = air self.world = None WorldCreatorBase.__init__(self, air)