Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Created November 10, 2021 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hkazanci93/be737407b717ca904599c704d8634fd4 to your computer and use it in GitHub Desktop.
Save Hkazanci93/be737407b717ca904599c704d8634fd4 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package pizzatribes;
option go_package = "github.com/fnatte/pizza-tribes/internal/models";
import "google/protobuf/wrappers.proto";
import "education.proto";
import "building.proto";
import "research.proto";
message OngoingResearch {
int64 complete_at = 1;
ResearchDiscovery discovery = 2;
}
message Training {
int64 complete_at = 1;
Education education = 2;
int32 amount = 3;
}
message Construction {
int64 complete_at = 1;
string lotId = 2;
Building building = 3;
int32 level = 4;
bool razing = 5;
}
message Travel {
int64 arrival_at = 1;
int32 destinationX = 2;
int32 destinationY = 3;
bool returning = 4;
int32 thieves = 5;
int64 coins = 6;
}
message GameState {
message Resources {
int32 coins = 1;
int32 pizzas = 2;
}
message Lot {
Building building = 1;
int64 tapped_at = 2;
int32 level = 3;
}
message Population {
int32 uneducated = 1;
int32 chefs = 2;
int32 salesmice = 3;
int32 guards = 4;
int32 thieves = 5;
int32 publicists = 6;
}
Resources resources = 1;
map<string, Lot> lots = 2;
Population population = 3;
int64 timestamp = 4;
repeated Training trainingQueue = 5;
repeated Construction constructionQueue = 6;
int32 townX = 7;
int32 townY = 8;
repeated Travel travelQueue = 9;
repeated ResearchDiscovery discoveries = 10;
repeated OngoingResearch researchQueue = 11;
}
message GameStatePatch {
message ResourcesPatch {
google.protobuf.Int32Value coins = 1;
google.protobuf.Int32Value pizzas = 2;
}
message LotPatch {
Building building = 1;
int64 tapped_at = 2;
int32 level = 3;
bool razed = 4;
}
message PopulationPatch {
google.protobuf.Int32Value uneducated = 1;
google.protobuf.Int32Value chefs = 2;
google.protobuf.Int32Value salesmice = 3;
google.protobuf.Int32Value guards = 4;
google.protobuf.Int32Value thieves = 5;
google.protobuf.Int32Value publicists = 6;
}
ResourcesPatch resources = 1;
map<string, LotPatch> lots = 2;
PopulationPatch population = 3;
google.protobuf.Int64Value timestamp = 4;
bool trainingQueuePatched = 5;
repeated Training trainingQueue = 6;
bool constructionQueuePatched = 7;
repeated Construction constructionQueue = 8;
google.protobuf.Int32Value townX = 9;
google.protobuf.Int32Value townY = 10;
bool travelQueuePatched = 11;
repeated Travel travelQueue = 12;
bool discoveriesPatched = 13;
repeated ResearchDiscovery discoveries = 14;
bool researchQueuePatched = 15;
repeated OngoingResearch researchQueue = 16;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment