// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.8 // protoc v6.31.1 // source: map_static_data.proto package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // 行走动态标签tag type MapWalkableTag int32 const ( // 不可行走 MapWalkableTag_mwt_disable MapWalkableTag = 0 // 可行走 MapWalkableTag_mwt_enable MapWalkableTag = 1 // 动态区域,区域通道占位点的格子标志这个 MapWalkableTag_mwt_dymamic MapWalkableTag = 2 ) // Enum value maps for MapWalkableTag. var ( MapWalkableTag_name = map[int32]string{ 0: "mwt_disable", 1: "mwt_enable", 2: "mwt_dymamic", } MapWalkableTag_value = map[string]int32{ "mwt_disable": 0, "mwt_enable": 1, "mwt_dymamic": 2, } ) func (x MapWalkableTag) Enum() *MapWalkableTag { p := new(MapWalkableTag) *p = x return p } func (x MapWalkableTag) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MapWalkableTag) Descriptor() protoreflect.EnumDescriptor { return file_map_static_data_proto_enumTypes[0].Descriptor() } func (MapWalkableTag) Type() protoreflect.EnumType { return &file_map_static_data_proto_enumTypes[0] } func (x MapWalkableTag) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use MapWalkableTag.Descriptor instead. func (MapWalkableTag) EnumDescriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{0} } // 策划动态添加的tag type MapRuleTag int32 const ( // 无,默认值 MapRuleTag_mrt_none MapRuleTag = 0 // 驻守点 MapRuleTag_mrt_garrison_point MapRuleTag = 1 // 攻城主力站位 MapRuleTag_mrt_main_force MapRuleTag = 2 // 拆迁队站位 MapRuleTag_mrt_siege_squad MapRuleTag = 3 // 攻城交战位置(与守军交战的位置) MapRuleTag_mrt_siege_Points MapRuleTag = 4 // 通道,关隘/渡口/码头等需要 MapRuleTag_mrt_passageway MapRuleTag = 5 // 城墙 MapRuleTag_mrt_wall MapRuleTag = 6 ) // Enum value maps for MapRuleTag. var ( MapRuleTag_name = map[int32]string{ 0: "mrt_none", 1: "mrt_garrison_point", 2: "mrt_main_force", 3: "mrt_siege_squad", 4: "mrt_siege_Points", 5: "mrt_passageway", 6: "mrt_wall", } MapRuleTag_value = map[string]int32{ "mrt_none": 0, "mrt_garrison_point": 1, "mrt_main_force": 2, "mrt_siege_squad": 3, "mrt_siege_Points": 4, "mrt_passageway": 5, "mrt_wall": 6, } ) func (x MapRuleTag) Enum() *MapRuleTag { p := new(MapRuleTag) *p = x return p } func (x MapRuleTag) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MapRuleTag) Descriptor() protoreflect.EnumDescriptor { return file_map_static_data_proto_enumTypes[1].Descriptor() } func (MapRuleTag) Type() protoreflect.EnumType { return &file_map_static_data_proto_enumTypes[1] } func (x MapRuleTag) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use MapRuleTag.Descriptor instead. func (MapRuleTag) EnumDescriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{1} } // 地形/地表类型 type TerrainType int32 const ( TerrainType_tt_none TerrainType = 0 TerrainType_tt_grass TerrainType = 1 //草地 TerrainType_tt_mountain TerrainType = 2 //山 TerrainType_tt_water TerrainType = 3 //水 TerrainType_tt_snowfield TerrainType = 4 //雪地 TerrainType_tt_desert TerrainType = 5 //沙漠 TerrainType_tt_wall TerrainType = 10 //城墙 TerrainType_tt_foundation TerrainType = 20 //联盟驻地城内地基 ) // Enum value maps for TerrainType. var ( TerrainType_name = map[int32]string{ 0: "tt_none", 1: "tt_grass", 2: "tt_mountain", 3: "tt_water", 4: "tt_snowfield", 5: "tt_desert", 10: "tt_wall", 20: "tt_foundation", } TerrainType_value = map[string]int32{ "tt_none": 0, "tt_grass": 1, "tt_mountain": 2, "tt_water": 3, "tt_snowfield": 4, "tt_desert": 5, "tt_wall": 10, "tt_foundation": 20, } ) func (x TerrainType) Enum() *TerrainType { p := new(TerrainType) *p = x return p } func (x TerrainType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TerrainType) Descriptor() protoreflect.EnumDescriptor { return file_map_static_data_proto_enumTypes[2].Descriptor() } func (TerrainType) Type() protoreflect.EnumType { return &file_map_static_data_proto_enumTypes[2] } func (x TerrainType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TerrainType.Descriptor instead. func (TerrainType) EnumDescriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{2} } // 系统对象(系统城/卫城/关卡/码头)类型 type SysObjType int32 const ( SysObjType_so_none SysObjType = 0 //无 SysObjType_so_castle SysObjType = 1 //系统城 SysObjType_so_moutain_pass SysObjType = 2 //关隘 SysObjType_so_river_crossing SysObjType = 3 //渡口 SysObjType_so_dock SysObjType = 4 //码头 SysObjType_so_town SysObjType = 5 //卫城 ) // Enum value maps for SysObjType. var ( SysObjType_name = map[int32]string{ 0: "so_none", 1: "so_castle", 2: "so_moutain_pass", 3: "so_river_crossing", 4: "so_dock", 5: "so_town", } SysObjType_value = map[string]int32{ "so_none": 0, "so_castle": 1, "so_moutain_pass": 2, "so_river_crossing": 3, "so_dock": 4, "so_town": 5, } ) func (x SysObjType) Enum() *SysObjType { p := new(SysObjType) *p = x return p } func (x SysObjType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (SysObjType) Descriptor() protoreflect.EnumDescriptor { return file_map_static_data_proto_enumTypes[3].Descriptor() } func (SysObjType) Type() protoreflect.EnumType { return &file_map_static_data_proto_enumTypes[3] } func (x SysObjType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use SysObjType.Descriptor instead. func (SysObjType) EnumDescriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{3} } // {slgeditor}这个标签是地图编辑器相关。 // {slgeditor enter=MapData } // 地图数据主消息 type MapData struct { state protoimpl.MessageState `protogen:"open.v1"` // 地图基本信息 MapInfo *MapInfo `protobuf:"bytes,1,opt,name=map_info,json=mapInfo,proto3" json:"map_info,omitempty"` // {slgeditor param=MapData.tiles fill=array from=cells } 用这个标签表示这个数组按NxN格子填充 // 地块(格子)数据数组 // 索引计算公式:index = y * width + x Tiles []*TileData `protobuf:"bytes,2,rep,name=tiles,proto3" json:"tiles,omitempty"` // {slgeditor param=MapData.castles fill=map from=instances key=center globalTagInv=BuildingType globalTagInvVelue=0|10} 用对象列表中对象公共属性 BuildingType != 0 的对象填充列表, // 系统城 // 系统城 Castles map[int32]*CastleData `protobuf:"bytes,4,rep,name=castles,proto3" json:"castles,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 跨洲寻路概览 // {slgeditor param=MapData.path_summary} PathSummary *CrossStatePathSummary `protobuf:"bytes,9,opt,name=path_summary,json=pathSummary,proto3" json:"path_summary,omitempty"` // 元数据,编辑器专用,方便定位修改记录 Metadata *MapMetadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *MapData) Reset() { *x = MapData{} mi := &file_map_static_data_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *MapData) String() string { return protoimpl.X.MessageStringOf(x) } func (*MapData) ProtoMessage() {} func (x *MapData) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MapData.ProtoReflect.Descriptor instead. func (*MapData) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{0} } func (x *MapData) GetMapInfo() *MapInfo { if x != nil { return x.MapInfo } return nil } func (x *MapData) GetTiles() []*TileData { if x != nil { return x.Tiles } return nil } func (x *MapData) GetCastles() map[int32]*CastleData { if x != nil { return x.Castles } return nil } func (x *MapData) GetPathSummary() *CrossStatePathSummary { if x != nil { return x.PathSummary } return nil } func (x *MapData) GetMetadata() *MapMetadata { if x != nil { return x.Metadata } return nil } // 地图基本信息 type MapInfo struct { state protoimpl.MessageState `protogen:"open.v1"` // {slgeditor param=MapInfo.map_id src=global path=map_id} // 地图 MapId int32 `protobuf:"varint,1,opt,name=map_id,json=mapId,proto3" json:"map_id,omitempty"` // {slgeditor param=MapInfo.version_code src=global path=version_code} // 地图版本号 VersionCode int32 `protobuf:"varint,2,opt,name=version_code,json=versionCode,proto3" json:"version_code,omitempty"` // {slgeditor param=MapInfo.width src=global path=mapwith} // 地图宽度(格子数) Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` // {slgeditor param=MapInfo.height src=global path=mapwith} // 地图高度(格子数) Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` // 场景名称 UnitySceneName string `protobuf:"bytes,5,opt,name=unity_scene_name,json=unitySceneName,proto3" json:"unity_scene_name,omitempty"` // {slgeditor param=MapInfo.map_name src=global path=map_name} // 地图名称 MapName string `protobuf:"bytes,6,opt,name=map_name,json=mapName,proto3" json:"map_name,omitempty"` // 地图描述 Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *MapInfo) Reset() { *x = MapInfo{} mi := &file_map_static_data_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *MapInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*MapInfo) ProtoMessage() {} func (x *MapInfo) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MapInfo.ProtoReflect.Descriptor instead. func (*MapInfo) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{1} } func (x *MapInfo) GetMapId() int32 { if x != nil { return x.MapId } return 0 } func (x *MapInfo) GetVersionCode() int32 { if x != nil { return x.VersionCode } return 0 } func (x *MapInfo) GetWidth() int32 { if x != nil { return x.Width } return 0 } func (x *MapInfo) GetHeight() int32 { if x != nil { return x.Height } return 0 } func (x *MapInfo) GetUnitySceneName() string { if x != nil { return x.UnitySceneName } return "" } func (x *MapInfo) GetMapName() string { if x != nil { return x.MapName } return "" } func (x *MapInfo) GetDescription() string { if x != nil { return x.Description } return "" } // 格子数据 type TileData struct { state protoimpl.MessageState `protogen:"open.v1"` // {slgeditor param=TileData.coord_index src=cell kind=pos} cell这种类型的情况,cell=pos导出格子的位置。 // 格子索引(行优先顺序) // 索引计算公式:index = y * width + x // 索引从0开始,最大值为 (width * height - 1) CoordIndex int32 `protobuf:"varint,1,opt,name=coord_index,json=coordIndex,proto3" json:"coord_index,omitempty"` // {slgeditor param=TileData.county_id src=cell kind=area} cell这种类型的情况,cell=area 导出区域信息 反正就是导出最低一层是区域。简单来说,导出json的时候建筑有 Area0 Area1 Area2.反正就是最低一层所在的区域节点。 // 所在县组合规则: // 例如 1 001 001 // 州ID(001-999) + 省ID(001-999) + 县(001-999) //相当于原json Area1 + Area2 + Area3 // Area2 CountyId int32 `protobuf:"varint,2,opt,name=county_id,json=countyId,proto3" json:"county_id,omitempty"` // {slgeditor param=TileData.terrain src=cell kind=ground }//这个意思是把地图碰撞值放在这里,就是那个山,水,地面那个 // 地形类型 Terrain TerrainType `protobuf:"varint,3,opt,name=terrain,proto3,enum=pb.TerrainType" json:"terrain,omitempty"` // {slgeditor param=TileData.block_type src=cell kind=walkabletag} // 这个就是当前格子的地面信息是否地面可放置层。 // 是否静态固定阻挡 BlockType MapWalkableTag `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=pb.MapWalkableTag" json:"block_type,omitempty"` // {slgeditor param=TileData.castle_center src=cell kind=center globalTagInv=BuildingType globalTagInvVelue=0|10 default=-1} //这个表示检查当前格子是否被某种instance占用,包括Point,Offset.如果有,这里是instance的center,否则则是defaul值-1 // 系统物件中心点,坐标索引,没有就是-1 CastleCenter int32 `protobuf:"varint,5,opt,name=castle_center,json=castleCenter,proto3" json:"castle_center,omitempty"` // {slgeditor param=TileData.is_state_boundary src=cell kind=gperimeter} // 是否州界 IsStateBoundary bool `protobuf:"varint,6,opt,name=is_state_boundary,json=isStateBoundary,proto3" json:"is_state_boundary,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TileData) Reset() { *x = TileData{} mi := &file_map_static_data_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *TileData) String() string { return protoimpl.X.MessageStringOf(x) } func (*TileData) ProtoMessage() {} func (x *TileData) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TileData.ProtoReflect.Descriptor instead. func (*TileData) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{2} } func (x *TileData) GetCoordIndex() int32 { if x != nil { return x.CoordIndex } return 0 } func (x *TileData) GetCountyId() int32 { if x != nil { return x.CountyId } return 0 } func (x *TileData) GetTerrain() TerrainType { if x != nil { return x.Terrain } return TerrainType_tt_none } func (x *TileData) GetBlockType() MapWalkableTag { if x != nil { return x.BlockType } return MapWalkableTag_mwt_disable } func (x *TileData) GetCastleCenter() int32 { if x != nil { return x.CastleCenter } return 0 } func (x *TileData) GetIsStateBoundary() bool { if x != nil { return x.IsStateBoundary } return false } // 系统城/卫城/关隘/渡口/码头 // 2026.1.14 策划说码头是一个整体,只有一个血条,因此合并系统城/卫城/关隘/渡口/码头数据 type CastleData struct { state protoimpl.MessageState `protogen:"open.v1"` // 中心点 换算公式 index = y * width + x // {slgeditor param=CastleData.center src=instance prop=pos} // 所有Vector2In都映射成 y * width + x Center int32 `protobuf:"varint,1,opt,name=center,proto3" json:"center,omitempty"` // {slgeditor param=CastleData.config_id src=instance prop=exportId} // 就是导出Instance的id // 配置Id ConfigId int32 `protobuf:"varint,2,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"` // {slgeditor param=CastleData.occupied_coords src=instance prop=offsets} // 占据面积(位置索引的集合),不含子建筑(卫城等) OccupiedCoords []int32 `protobuf:"varint,3,rep,packed,name=occupied_coords,json=occupiedCoords,proto3" json:"occupied_coords,omitempty"` // {slgeditor param=CastleData.parent src=instance prop=parent} // 父建筑数据(如有),坐标索引 Parent int32 `protobuf:"varint,4,opt,name=parent,proto3" json:"parent,omitempty"` // {slgeditor param=CastleData.childs src=instance prop=childs} // 子建筑数据(如有),坐标索引列表 Childs []int32 `protobuf:"varint,5,rep,packed,name=childs,proto3" json:"childs,omitempty"` // {slgeditor param=CastleData.appearance_index src=instance prop=AppearanceIndex} // 外观索引 // 外观索引 AppearanceIndex int32 `protobuf:"varint,6,opt,name=appearance_index,json=appearanceIndex,proto3" json:"appearance_index,omitempty"` // 标签坐标列表,如驻守点等 // Protobuf 的 map key 不支持 enum,改用 int32(存 MapRuleTag 的数值) Tag_TilePoints map[int32]*TilePoints `protobuf:"bytes,7,rep,name=tag_TilePoints,json=tagTilePoints,proto3" json:"tag_TilePoints,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 系统对象类型(系统城、卫城、关隘、渡口、码头) // {slgeditor param=CastleData.sys_type src=tag name=BuildingType} SysType SysObjType `protobuf:"varint,8,opt,name=sys_type,json=sysType,proto3,enum=pb.SysObjType" json:"sys_type,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CastleData) Reset() { *x = CastleData{} mi := &file_map_static_data_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *CastleData) String() string { return protoimpl.X.MessageStringOf(x) } func (*CastleData) ProtoMessage() {} func (x *CastleData) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CastleData.ProtoReflect.Descriptor instead. func (*CastleData) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{3} } func (x *CastleData) GetCenter() int32 { if x != nil { return x.Center } return 0 } func (x *CastleData) GetConfigId() int32 { if x != nil { return x.ConfigId } return 0 } func (x *CastleData) GetOccupiedCoords() []int32 { if x != nil { return x.OccupiedCoords } return nil } func (x *CastleData) GetParent() int32 { if x != nil { return x.Parent } return 0 } func (x *CastleData) GetChilds() []int32 { if x != nil { return x.Childs } return nil } func (x *CastleData) GetAppearanceIndex() int32 { if x != nil { return x.AppearanceIndex } return 0 } func (x *CastleData) GetTag_TilePoints() map[int32]*TilePoints { if x != nil { return x.Tag_TilePoints } return nil } func (x *CastleData) GetSysType() SysObjType { if x != nil { return x.SysType } return SysObjType_so_none } // 地图元数据 type MapMetadata struct { state protoimpl.MessageState `protogen:"open.v1"` // 创建时间(Unix时间戳) CreatedTime int64 `protobuf:"varint,1,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` // 修改时间(Unix时间戳) ModifiedTime int64 `protobuf:"varint,2,opt,name=modified_time,json=modifiedTime,proto3" json:"modified_time,omitempty"` // 作者 Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` // 编辑器版本 EditorVersion string `protobuf:"bytes,4,opt,name=editor_version,json=editorVersion,proto3" json:"editor_version,omitempty"` // 备注 Notes string `protobuf:"bytes,5,opt,name=notes,proto3" json:"notes,omitempty"` // 标签 Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *MapMetadata) Reset() { *x = MapMetadata{} mi := &file_map_static_data_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *MapMetadata) String() string { return protoimpl.X.MessageStringOf(x) } func (*MapMetadata) ProtoMessage() {} func (x *MapMetadata) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MapMetadata.ProtoReflect.Descriptor instead. func (*MapMetadata) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{4} } func (x *MapMetadata) GetCreatedTime() int64 { if x != nil { return x.CreatedTime } return 0 } func (x *MapMetadata) GetModifiedTime() int64 { if x != nil { return x.ModifiedTime } return 0 } func (x *MapMetadata) GetAuthor() string { if x != nil { return x.Author } return "" } func (x *MapMetadata) GetEditorVersion() string { if x != nil { return x.EditorVersion } return "" } func (x *MapMetadata) GetNotes() string { if x != nil { return x.Notes } return "" } func (x *MapMetadata) GetTags() []string { if x != nil { return x.Tags } return nil } // ---------------------------------------------------------------- // 跨州寻路 // 跨州寻路参考 type CrossStatePathSummary struct { state protoimpl.MessageState `protogen:"open.v1"` // {slgeditor param=CrossStatePathSummary.one_way_path fill=map from=areaMap areaLevel=1} 这是一个跨区域寻路字典,以区域第1层划分区域。 areaLevel=i,就是区域以哪级为主。 // 遍历所有区域创建字典one_way_path[区域Id] // key为起始州Id OneWayPath map[int32]*AreaStateTarget `protobuf:"bytes,1,rep,name=one_way_path,json=oneWayPath,proto3" json:"one_way_path,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CrossStatePathSummary) Reset() { *x = CrossStatePathSummary{} mi := &file_map_static_data_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *CrossStatePathSummary) String() string { return protoimpl.X.MessageStringOf(x) } func (*CrossStatePathSummary) ProtoMessage() {} func (x *CrossStatePathSummary) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CrossStatePathSummary.ProtoReflect.Descriptor instead. func (*CrossStatePathSummary) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{5} } func (x *CrossStatePathSummary) GetOneWayPath() map[int32]*AreaStateTarget { if x != nil { return x.OneWayPath } return nil } // 州目标 type AreaStateTarget struct { state protoimpl.MessageState `protogen:"open.v1"` // {slgeditor param=AreaStateTarget.targets fill=map from=areaPath path=PassageWay areaLevel=1} // 自动从 TilePathList 和 TilePoints 的 point_list_field 配置获取字段名 Targets map[int32]*TilePathList `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AreaStateTarget) Reset() { *x = AreaStateTarget{} mi := &file_map_static_data_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *AreaStateTarget) String() string { return protoimpl.X.MessageStringOf(x) } func (*AreaStateTarget) ProtoMessage() {} func (x *AreaStateTarget) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use AreaStateTarget.ProtoReflect.Descriptor instead. func (*AreaStateTarget) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{6} } func (x *AreaStateTarget) GetTargets() map[int32]*TilePathList { if x != nil { return x.Targets } return nil } // 多条路径列表 // {slgeditor point_list_field=path_list message=TilePathList} // 指定 TilePathList 消息中用于存储路径列表的字段名 type TilePathList struct { state protoimpl.MessageState `protogen:"open.v1"` // 多条路径列表 // {slgeditor param=TilePathList.path_list fill=array manual=true} // 手动填充,不需要映射规则 PathList []*TilePoints `protobuf:"bytes,1,rep,name=path_list,json=pathList,proto3" json:"path_list,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TilePathList) Reset() { *x = TilePathList{} mi := &file_map_static_data_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *TilePathList) String() string { return protoimpl.X.MessageStringOf(x) } func (*TilePathList) ProtoMessage() {} func (x *TilePathList) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TilePathList.ProtoReflect.Descriptor instead. func (*TilePathList) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{7} } func (x *TilePathList) GetPathList() []*TilePoints { if x != nil { return x.PathList } return nil } // 路径点(坐标索引)列表 // {slgeditor point_list_field=points message=TilePoints} // 指定 TilePoints 消息中用于存储点列表的字段名 type TilePoints struct { state protoimpl.MessageState `protogen:"open.v1"` Points []int32 `protobuf:"varint,1,rep,packed,name=points,proto3" json:"points,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TilePoints) Reset() { *x = TilePoints{} mi := &file_map_static_data_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *TilePoints) String() string { return protoimpl.X.MessageStringOf(x) } func (*TilePoints) ProtoMessage() {} func (x *TilePoints) ProtoReflect() protoreflect.Message { mi := &file_map_static_data_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use TilePoints.ProtoReflect.Descriptor instead. func (*TilePoints) Descriptor() ([]byte, []int) { return file_map_static_data_proto_rawDescGZIP(), []int{8} } func (x *TilePoints) GetPoints() []int32 { if x != nil { return x.Points } return nil } var File_map_static_data_proto protoreflect.FileDescriptor const file_map_static_data_proto_rawDesc = "" + "\n" + "\x15map_static_data.proto\x12\x02pb\"\xc0\x02\n" + "\aMapData\x12&\n" + "\bmap_info\x18\x01 \x01(\v2\v.pb.MapInfoR\amapInfo\x12\"\n" + "\x05tiles\x18\x02 \x03(\v2\f.pb.TileDataR\x05tiles\x122\n" + "\acastles\x18\x04 \x03(\v2\x18.pb.MapData.CastlesEntryR\acastles\x12<\n" + "\fpath_summary\x18\t \x01(\v2\x19.pb.CrossStatePathSummaryR\vpathSummary\x12+\n" + "\bmetadata\x18\n" + " \x01(\v2\x0f.pb.MapMetadataR\bmetadata\x1aJ\n" + "\fCastlesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x05R\x03key\x12$\n" + "\x05value\x18\x02 \x01(\v2\x0e.pb.CastleDataR\x05value:\x028\x01\"\xd8\x01\n" + "\aMapInfo\x12\x15\n" + "\x06map_id\x18\x01 \x01(\x05R\x05mapId\x12!\n" + "\fversion_code\x18\x02 \x01(\x05R\vversionCode\x12\x14\n" + "\x05width\x18\x03 \x01(\x05R\x05width\x12\x16\n" + "\x06height\x18\x04 \x01(\x05R\x06height\x12(\n" + "\x10unity_scene_name\x18\x05 \x01(\tR\x0eunitySceneName\x12\x19\n" + "\bmap_name\x18\x06 \x01(\tR\amapName\x12 \n" + "\vdescription\x18\a \x01(\tR\vdescription\"\xf7\x01\n" + "\bTileData\x12\x1f\n" + "\vcoord_index\x18\x01 \x01(\x05R\n" + "coordIndex\x12\x1b\n" + "\tcounty_id\x18\x02 \x01(\x05R\bcountyId\x12)\n" + "\aterrain\x18\x03 \x01(\x0e2\x0f.pb.TerrainTypeR\aterrain\x121\n" + "\n" + "block_type\x18\x04 \x01(\x0e2\x12.pb.MapWalkableTagR\tblockType\x12#\n" + "\rcastle_center\x18\x05 \x01(\x05R\fcastleCenter\x12*\n" + "\x11is_state_boundary\x18\x06 \x01(\bR\x0fisStateBoundary\"\x8c\x03\n" + "\n" + "CastleData\x12\x16\n" + "\x06center\x18\x01 \x01(\x05R\x06center\x12\x1b\n" + "\tconfig_id\x18\x02 \x01(\x05R\bconfigId\x12'\n" + "\x0foccupied_coords\x18\x03 \x03(\x05R\x0eoccupiedCoords\x12\x16\n" + "\x06parent\x18\x04 \x01(\x05R\x06parent\x12\x16\n" + "\x06childs\x18\x05 \x03(\x05R\x06childs\x12)\n" + "\x10appearance_index\x18\x06 \x01(\x05R\x0fappearanceIndex\x12H\n" + "\x0etag_TilePoints\x18\a \x03(\v2!.pb.CastleData.TagTilePointsEntryR\rtagTilePoints\x12)\n" + "\bsys_type\x18\b \x01(\x0e2\x0e.pb.SysObjTypeR\asysType\x1aP\n" + "\x12TagTilePointsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x05R\x03key\x12$\n" + "\x05value\x18\x02 \x01(\v2\x0e.pb.TilePointsR\x05value:\x028\x01\"\xbe\x01\n" + "\vMapMetadata\x12!\n" + "\fcreated_time\x18\x01 \x01(\x03R\vcreatedTime\x12#\n" + "\rmodified_time\x18\x02 \x01(\x03R\fmodifiedTime\x12\x16\n" + "\x06author\x18\x03 \x01(\tR\x06author\x12%\n" + "\x0eeditor_version\x18\x04 \x01(\tR\reditorVersion\x12\x14\n" + "\x05notes\x18\x05 \x01(\tR\x05notes\x12\x12\n" + "\x04tags\x18\x06 \x03(\tR\x04tags\"\xb8\x01\n" + "\x15CrossStatePathSummary\x12K\n" + "\fone_way_path\x18\x01 \x03(\v2).pb.CrossStatePathSummary.OneWayPathEntryR\n" + "oneWayPath\x1aR\n" + "\x0fOneWayPathEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x05R\x03key\x12)\n" + "\x05value\x18\x02 \x01(\v2\x13.pb.AreaStateTargetR\x05value:\x028\x01\"\x9b\x01\n" + "\x0fAreaStateTarget\x12:\n" + "\atargets\x18\x01 \x03(\v2 .pb.AreaStateTarget.TargetsEntryR\atargets\x1aL\n" + "\fTargetsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\x05R\x03key\x12&\n" + "\x05value\x18\x02 \x01(\v2\x10.pb.TilePathListR\x05value:\x028\x01\";\n" + "\fTilePathList\x12+\n" + "\tpath_list\x18\x01 \x03(\v2\x0e.pb.TilePointsR\bpathList\"$\n" + "\n" + "TilePoints\x12\x16\n" + "\x06points\x18\x01 \x03(\x05R\x06points*B\n" + "\x0eMapWalkableTag\x12\x0f\n" + "\vmwt_disable\x10\x00\x12\x0e\n" + "\n" + "mwt_enable\x10\x01\x12\x0f\n" + "\vmwt_dymamic\x10\x02*\x93\x01\n" + "\n" + "MapRuleTag\x12\f\n" + "\bmrt_none\x10\x00\x12\x16\n" + "\x12mrt_garrison_point\x10\x01\x12\x12\n" + "\x0emrt_main_force\x10\x02\x12\x13\n" + "\x0fmrt_siege_squad\x10\x03\x12\x14\n" + "\x10mrt_siege_Points\x10\x04\x12\x12\n" + "\x0emrt_passageway\x10\x05\x12\f\n" + "\bmrt_wall\x10\x06*\x88\x01\n" + "\vTerrainType\x12\v\n" + "\att_none\x10\x00\x12\f\n" + "\btt_grass\x10\x01\x12\x0f\n" + "\vtt_mountain\x10\x02\x12\f\n" + "\btt_water\x10\x03\x12\x10\n" + "\ftt_snowfield\x10\x04\x12\r\n" + "\ttt_desert\x10\x05\x12\v\n" + "\att_wall\x10\n" + "\x12\x11\n" + "\rtt_foundation\x10\x14*n\n" + "\n" + "SysObjType\x12\v\n" + "\aso_none\x10\x00\x12\r\n" + "\tso_castle\x10\x01\x12\x13\n" + "\x0fso_moutain_pass\x10\x02\x12\x15\n" + "\x11so_river_crossing\x10\x03\x12\v\n" + "\aso_dock\x10\x04\x12\v\n" + "\aso_town\x10\x05B\x05Z\x03/pbb\x06proto3" var ( file_map_static_data_proto_rawDescOnce sync.Once file_map_static_data_proto_rawDescData []byte ) func file_map_static_data_proto_rawDescGZIP() []byte { file_map_static_data_proto_rawDescOnce.Do(func() { file_map_static_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_map_static_data_proto_rawDesc), len(file_map_static_data_proto_rawDesc))) }) return file_map_static_data_proto_rawDescData } var file_map_static_data_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_map_static_data_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_map_static_data_proto_goTypes = []any{ (MapWalkableTag)(0), // 0: pb.MapWalkableTag (MapRuleTag)(0), // 1: pb.MapRuleTag (TerrainType)(0), // 2: pb.TerrainType (SysObjType)(0), // 3: pb.SysObjType (*MapData)(nil), // 4: pb.MapData (*MapInfo)(nil), // 5: pb.MapInfo (*TileData)(nil), // 6: pb.TileData (*CastleData)(nil), // 7: pb.CastleData (*MapMetadata)(nil), // 8: pb.MapMetadata (*CrossStatePathSummary)(nil), // 9: pb.CrossStatePathSummary (*AreaStateTarget)(nil), // 10: pb.AreaStateTarget (*TilePathList)(nil), // 11: pb.TilePathList (*TilePoints)(nil), // 12: pb.TilePoints nil, // 13: pb.MapData.CastlesEntry nil, // 14: pb.CastleData.TagTilePointsEntry nil, // 15: pb.CrossStatePathSummary.OneWayPathEntry nil, // 16: pb.AreaStateTarget.TargetsEntry } var file_map_static_data_proto_depIdxs = []int32{ 5, // 0: pb.MapData.map_info:type_name -> pb.MapInfo 6, // 1: pb.MapData.tiles:type_name -> pb.TileData 13, // 2: pb.MapData.castles:type_name -> pb.MapData.CastlesEntry 9, // 3: pb.MapData.path_summary:type_name -> pb.CrossStatePathSummary 8, // 4: pb.MapData.metadata:type_name -> pb.MapMetadata 2, // 5: pb.TileData.terrain:type_name -> pb.TerrainType 0, // 6: pb.TileData.block_type:type_name -> pb.MapWalkableTag 14, // 7: pb.CastleData.tag_TilePoints:type_name -> pb.CastleData.TagTilePointsEntry 3, // 8: pb.CastleData.sys_type:type_name -> pb.SysObjType 15, // 9: pb.CrossStatePathSummary.one_way_path:type_name -> pb.CrossStatePathSummary.OneWayPathEntry 16, // 10: pb.AreaStateTarget.targets:type_name -> pb.AreaStateTarget.TargetsEntry 12, // 11: pb.TilePathList.path_list:type_name -> pb.TilePoints 7, // 12: pb.MapData.CastlesEntry.value:type_name -> pb.CastleData 12, // 13: pb.CastleData.TagTilePointsEntry.value:type_name -> pb.TilePoints 10, // 14: pb.CrossStatePathSummary.OneWayPathEntry.value:type_name -> pb.AreaStateTarget 11, // 15: pb.AreaStateTarget.TargetsEntry.value:type_name -> pb.TilePathList 16, // [16:16] is the sub-list for method output_type 16, // [16:16] is the sub-list for method input_type 16, // [16:16] is the sub-list for extension type_name 16, // [16:16] is the sub-list for extension extendee 0, // [0:16] is the sub-list for field type_name } func init() { file_map_static_data_proto_init() } func file_map_static_data_proto_init() { if File_map_static_data_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_map_static_data_proto_rawDesc), len(file_map_static_data_proto_rawDesc)), NumEnums: 4, NumMessages: 13, NumExtensions: 0, NumServices: 0, }, GoTypes: file_map_static_data_proto_goTypes, DependencyIndexes: file_map_static_data_proto_depIdxs, EnumInfos: file_map_static_data_proto_enumTypes, MessageInfos: file_map_static_data_proto_msgTypes, }.Build() File_map_static_data_proto = out.File file_map_static_data_proto_goTypes = nil file_map_static_data_proto_depIdxs = nil }