syntax = "proto3"; package Api; import "common.proto"; // Issue various useful commands to the game engine. message DebugCommand { oneof command { DebugDraw draw = 1; DebugGameState game_state = 2; DebugCreateUnit create_unit = 3; DebugKillUnit kill_unit = 4; DebugTestProcess test_process = 5; DebugSetScore score = 6; // Useful only for single-player "curriculum" maps. DebugEndGame end_game = 7; DebugSetUnitValue unit_value = 8; } } message DebugDraw { repeated DebugText text = 1; repeated DebugLine lines = 2; repeated DebugBox boxes = 3; repeated DebugSphere spheres = 4; } message Line { optional Point p0 = 1; optional Point p1 = 2; } message Color { optional uint32 r = 1; optional uint32 g = 2; optional uint32 b = 3; } // Display debug text on screen. message DebugText { optional Color color = 1; optional string text = 2; // Text to display. optional Point virtual_pos = 3; // Virtualized position in 2D (the screen is 0..1, 0..1 for any resolution). optional Point world_pos = 4; // Position in the world. optional uint32 size = 5; // Pixel height of the text. Defaults to 8px. } // Display debug lines on screen. message DebugLine { optional Color color = 1; optional Line line = 2; // World space line. } // Display debug boxes on screen. message DebugBox { optional Color color = 1; optional Point min = 2; optional Point max = 3; } // Display debug spheres on screen. message DebugSphere { optional Color color = 1; optional Point p = 2; optional float r = 3; } enum DebugGameState { ENUM_DEBUG_GAME_STATE_UNSET = 0; // PROTO3 COMPAT SHOW_MAP = 1; CONTROL_ENEMY = 2; FOOD = 3; FREE = 4; ALL_RESOURCES = 5; GOD = 6; MINERALS = 7; GAS = 8; COOLDOWNS = 9; TECH_TREE = 10; UPGRADE = 11; FAST_BUILD = 12; } message DebugCreateUnit { optional uint32 unit_type = 1; optional int32 owner = 2; optional Point2D pos = 3; optional uint32 quantity = 4; } message DebugKillUnit { repeated uint64 tag = 1; } message DebugTestProcess { enum Test { ENUM_TEST_UNSET = 0; // PROTO3 COMPAT HANG = 1; CRASH = 2; EXIT = 3; } optional Test test = 1; optional int32 delay_ms = 2; } message DebugSetScore { optional float score = 1; } message DebugEndGame { enum EndResult { ENUM_END_RESULT_UNSET = 0; // PROTO3 COMPAT SURRENDER = 1; // DEFAULT IF NOTHING IS SET. THE CURRENT PLAYER ADMITS DEFEAT. DECLARE_VICTORY = 2; } optional EndResult end_result = 1; } message DebugSetUnitValue { enum UnitValue { ENUM_UNIT_VALUE_UNSET = 0; // PROTO3 COMPAT ENERGY = 1; LIFE = 2; SHIELDS = 3; } optional UnitValue unit_value = 1; optional float value = 2; optional uint64 unit_tag = 3; }