schema.add_field('x', label='x', type=GsiFieldVisualizers.FLOAT, width=2) schema.add_field('y', label='y', type=GsiFieldVisualizers.FLOAT, width=2) schema.add_field('z', label='z', type=GsiFieldVisualizers.FLOAT, width=2) schema.add_field('lot_id', label='lot_id', type=GsiFieldVisualizers.INT, width=3) schema.add_field('tags', label='tags', type=GsiFieldVisualizers.STRING, width=4) schema.add_view_cheat('debugvis.spawn_points.start', label='Start Visualization') schema.add_view_cheat('debugvis.spawn_points.stop', label='Stop Visualization') with schema.add_cheat('camera.focus_on_position', label='Focus', dbl_click=True) as cheat: cheat.add_token_param('x') cheat.add_token_param('y') cheat.add_token_param('z') @GsiHandler('spawn_point', schema) def generate_spawn_point_data(*args, zone_id: int = None, **kwargs): data = [] zone = services.current_zone() if zone is None: return data for spawn_point in zone.spawn_points_gen(): entry = {} entry['id'] = str(spawn_point.spawn_point_id)
broadcaster_schema.add_field('broadcasting_object', label='Object', width=1) broadcaster_schema.add_field('broadcasting_object_id', label='Object ID', type=GsiFieldVisualizers.INT, hidden=True) broadcaster_schema.add_field('broadcaster_status', label='Status', width=1) broadcaster_schema.add_field('broadcaster_clock_type', label='Clock Type', width=2) broadcaster_schema.add_field('broadcaster_targets', label='Targets', width=1) broadcaster_schema.add_view_cheat('debugvis.broadcasters.start', label='Start Visualization') broadcaster_schema.add_view_cheat('debugvis.broadcasters.stop', label='Stop Visualization') with broadcaster_schema.add_cheat('objects.focus_camera_on_object', label='Focus', dbl_click=True) as cheat: cheat.add_token_param('broadcasting_object_id') with broadcaster_schema.add_has_many('affected_objects', GsiGridSchema, label='Affected Objects') as sub_schema: sub_schema.add_field('object_name', label='Object', width=1) sub_schema.add_field('last_reaction_time', label='Reaction Time', width=1) sub_schema.add_field('in_area', label='In Area', width=1) @GsiHandler('broadcasters', broadcaster_schema) def generate_broadcaster_data(): def _get_broadcasters_gen(): try: broadcaster_service = services.current_zone().broadcaster_service