syntax = "proto3"; package Generic; message Error { string description = 1; enum Code { Unknown = 0; BadString = 1; TooLarge = 2; BadUsername = 3; UsernameAlreadyTaken = 4; InvalidOpcode = 5; AuthenticationRequired = 6; IllegalOperation = 7; OutOfRange = 8; } Code code = 2; } message SimpleAuth { string username = 1; } message Operation { enum Code { Disconnect = 0; Error = 1; OK = 2; SimpleAuth = 3; _MinAuth = 4; SettingsSync = 5; PlayfieldSync = 6; RobotUpdate = 7; } Code code = 1; } message Vector2 { float x = 1; float y = 2; } message Settings { optional uint32 robotsPerClient = 1; optional float maxDistancePerTurn = 2; optional uint32 maxRobotHealth = 3; optional uint32 maxRobotDamage = 4; optional uint32 protectCooldown = 5; optional uint32 healCooldown = 6; optional uint32 healPerTurn = 7; } message Robot { uint32 id = 1; uint32 client = 2; Vector2 position = 3; enum State { Idle = 0; Attack = 1; Protect = 2; Heal = 3; Dead = 4; } State state = 4; uint32 health = 5; } message PlayfieldSync { repeated Robot robots = 1; }