observe specials

master
Jordan Orelli 8 years ago
parent cccd4c4c1b
commit ac944ad6be

@ -240,6 +240,12 @@ func processPackage(name string, pkg *ast.Package) {
// given an enum name, finds the appropriate message type // given an enum name, finds the appropriate message type
func typeName(enumName string) string { func typeName(enumName string) string {
if skipped[enumName] {
return ""
}
if name, ok := specials[enumName]; ok {
return name
}
for prefix, replacement := range prefixes { for prefix, replacement := range prefixes {
if strings.HasPrefix(enumName, prefix) { if strings.HasPrefix(enumName, prefix) {
candidate := strings.Replace(enumName, prefix, replacement, 1) candidate := strings.Replace(enumName, prefix, replacement, 1)

@ -48,6 +48,7 @@ var cmdFactory = protoFactory{
5: func() proto.Message { return new(dota.CDemoClassInfo) }, 5: func() proto.Message { return new(dota.CDemoClassInfo) },
6: func() proto.Message { return new(dota.CDemoStringTables) }, 6: func() proto.Message { return new(dota.CDemoStringTables) },
7: func() proto.Message { return new(dota.CDemoPacket) }, 7: func() proto.Message { return new(dota.CDemoPacket) },
8: func() proto.Message { return new(dota.CDemoPacket) },
9: func() proto.Message { return new(dota.CDemoConsoleCmd) }, 9: func() proto.Message { return new(dota.CDemoConsoleCmd) },
10: func() proto.Message { return new(dota.CDemoCustomData) }, 10: func() proto.Message { return new(dota.CDemoCustomData) },
11: func() proto.Message { return new(dota.CDemoCustomDataCallbacks) }, 11: func() proto.Message { return new(dota.CDemoCustomDataCallbacks) },
@ -136,7 +137,6 @@ var entFactory = protoFactory{
142: func() proto.Message { return new(dota.CUserMessageCloseCaptionPlaceholder) }, 142: func() proto.Message { return new(dota.CUserMessageCloseCaptionPlaceholder) },
143: func() proto.Message { return new(dota.CUserMessageCameraTransition) }, 143: func() proto.Message { return new(dota.CUserMessageCameraTransition) },
144: func() proto.Message { return new(dota.CUserMessageAudioParameter) }, 144: func() proto.Message { return new(dota.CUserMessageAudioParameter) },
200: func() proto.Message { return new(dota.CMsgVDebugGameSessionIDEvent) },
201: func() proto.Message { return new(dota.CMsgPlaceDecalEvent) }, 201: func() proto.Message { return new(dota.CMsgPlaceDecalEvent) },
202: func() proto.Message { return new(dota.CMsgClearWorldDecalsEvent) }, 202: func() proto.Message { return new(dota.CMsgClearWorldDecalsEvent) },
203: func() proto.Message { return new(dota.CMsgClearEntityDecalsEvent) }, 203: func() proto.Message { return new(dota.CMsgClearEntityDecalsEvent) },
@ -179,6 +179,7 @@ var entFactory = protoFactory{
494: func() proto.Message { return new(dota.CDOTAUserMsg_ItemFound) }, 494: func() proto.Message { return new(dota.CDOTAUserMsg_ItemFound) },
496: func() proto.Message { return new(dota.CDOTAUserMsg_SwapVerify) }, 496: func() proto.Message { return new(dota.CDOTAUserMsg_SwapVerify) },
497: func() proto.Message { return new(dota.CDOTAUserMsg_WorldLine) }, 497: func() proto.Message { return new(dota.CDOTAUserMsg_WorldLine) },
498: func() proto.Message { return new(dota.CMsgGCToClientTournamentItemDrop) },
499: func() proto.Message { return new(dota.CDOTAUserMsg_ItemAlert) }, 499: func() proto.Message { return new(dota.CDOTAUserMsg_ItemAlert) },
500: func() proto.Message { return new(dota.CDOTAUserMsg_HalloweenDrops) }, 500: func() proto.Message { return new(dota.CDOTAUserMsg_HalloweenDrops) },
501: func() proto.Message { return new(dota.CDOTAUserMsg_ChatWheel) }, 501: func() proto.Message { return new(dota.CDOTAUserMsg_ChatWheel) },
@ -221,6 +222,7 @@ var entFactory = protoFactory{
538: func() proto.Message { return new(dota.CDOTAUserMsg_SpeechBubble) }, 538: func() proto.Message { return new(dota.CDOTAUserMsg_SpeechBubble) },
539: func() proto.Message { return new(dota.CDOTAUserMsg_CustomHeaderMessage) }, 539: func() proto.Message { return new(dota.CDOTAUserMsg_CustomHeaderMessage) },
540: func() proto.Message { return new(dota.CDOTAUserMsg_QuickBuyAlert) }, 540: func() proto.Message { return new(dota.CDOTAUserMsg_QuickBuyAlert) },
541: func() proto.Message { return new(dota.CDOTAUserMsg_StatsHeroMinuteDetails) },
542: func() proto.Message { return new(dota.CDOTAUserMsg_PredictionResult) }, 542: func() proto.Message { return new(dota.CDOTAUserMsg_PredictionResult) },
543: func() proto.Message { return new(dota.CDOTAUserMsg_ModifierAlert) }, 543: func() proto.Message { return new(dota.CDOTAUserMsg_ModifierAlert) },
544: func() proto.Message { return new(dota.CDOTAUserMsg_HPManaAlert) }, 544: func() proto.Message { return new(dota.CDOTAUserMsg_HPManaAlert) },
@ -233,7 +235,9 @@ var entFactory = protoFactory{
551: func() proto.Message { return new(dota.CDOTAUserMsg_CompendiumState) }, 551: func() proto.Message { return new(dota.CDOTAUserMsg_CompendiumState) },
552: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionAbility) }, 552: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionAbility) },
553: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionEvent) }, 553: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionEvent) },
554: func() proto.Message { return new(dota.CMsgDOTACombatLogEntry) },
555: func() proto.Message { return new(dota.CDOTAUserMsg_XPAlert) }, 555: func() proto.Message { return new(dota.CDOTAUserMsg_XPAlert) },
556: func() proto.Message { return new(dota.CDOTAUserMsg_UpdateQuestProgress) }, 556: func() proto.Message { return new(dota.CDOTAUserMsg_UpdateQuestProgress) },
557: func() proto.Message { return new(dota.CDOTAClientMsg_MatchMetadata) },
559: func() proto.Message { return new(dota.CDOTAUserMsg_QuestStatus) }, 559: func() proto.Message { return new(dota.CDOTAUserMsg_QuestStatus) },
} }

Loading…
Cancel
Save