def read_particle_flags(file): assert_version('PARTICLE_EMITTER->flags', 2, int2(file)) return { 'allow_in_outfield': bool1(file), 'clamp_to_surface': bool1(file), 'clamp_to_water_surface': bool1(file), 'spring': bool1(file), 'summer': bool1(file), 'autumn': bool1(file), 'winter': bool1(file) }
def read_prop_list(file: BinaryIO): assert_version('PROP_LIST', 2, int2(file)) keys = read_list(file, read_prop_key_instance) props = read_list(file, read_prop_instance) result = {} for key in keys: result[key] = [] for prop in props: key = keys[prop.key_index] prop.key = key result[key].append(prop) return result
def read_custom_material_mesh_list(file: BinaryIO): assert_version('CUSTOM_MATERIAL_MESH_LIST', 1, int2(file)) return read_list(file, read_custom_material_mesh)
def read_building_projectile_emitter_list(file: BinaryIO): assert_version('BUILDING_PROJECTILE_EMITTER_LIST', 1, int2(file)) return read_list(file, read_building_projectile_emitter)
def read_zones_template_list(file: BinaryIO): assert_version('ZONES_TEMPLATE_LIST', 1, int2(file)) return read_list(file, read_zone_template)
def read_point_light_list(file: BinaryIO): assert_version('POINT_LIGHT_LIST', 1, int2(file)) return read_list(file, read_point_light)
def read_building_list(file: BinaryIO): assert_version('BATTLEFIELD_BUILDING_LIST', 1, int2(file)) return read_list(file, read_building)
def read_composite_scene_list(file: BinaryIO): assert_version('COMPOSITE_SCENE_LIST', 1, int2(file)) return read_list(file, read_composite_scene)
def read_light_probe_list(file: BinaryIO): assert_version('LIGHT_PROBE_LIST', 1, int2(file)) return read_list(file, read_light_probe)
def read_spot_light_list(file: BinaryIO): assert_version('SPOT_LIGHT_LIST', 1, int2(file)) return read_list(file, read_spot_light)
def read_particle_list(file: BinaryIO): assert_version('PARTICLE_EMITTER_LIST', 1, int2(file)) return read_list(file, read_particle)