mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 14:22:26 +08:00
修复读表引号问题
This commit is contained in:
@@ -6,11 +6,10 @@ import (
|
||||
|
||||
// GadgetData 物件配置表
|
||||
type GadgetData struct {
|
||||
GadgetId int32 `csv:"ID"`
|
||||
Type int32 `csv:"类型,omitempty"`
|
||||
DefaultCamp int32 `csv:"默认阵营,omitempty"`
|
||||
CanInteract int32 `csv:"能否交互,omitempty"`
|
||||
Desc string `csv:"描述,omitempty"`
|
||||
GadgetId int32 `csv:"ID"`
|
||||
Type int32 `csv:"类型,omitempty"`
|
||||
DefaultCamp int32 `csv:"默认阵营,omitempty"`
|
||||
CanInteract int32 `csv:"能否交互,omitempty"`
|
||||
}
|
||||
|
||||
func (g *GameDataConfig) loadGadgetData() {
|
||||
|
||||
@@ -243,6 +243,7 @@ func readTable[T any](tablePath string, table *[]*T) {
|
||||
}
|
||||
reader := csv.NewReader(bytes.NewBuffer(fileData))
|
||||
reader.Comma = '\t'
|
||||
reader.LazyQuotes = true
|
||||
dec, err := csvutil.NewDecoder(reader)
|
||||
if err != nil {
|
||||
info := fmt.Sprintf("create decoder error: %v", err)
|
||||
|
||||
@@ -7,12 +7,11 @@ import (
|
||||
// ItemData 道具分类分表整合配置表
|
||||
type ItemData struct {
|
||||
// 公共表头字段
|
||||
ItemId int32 `csv:"ID"`
|
||||
Type int32 `csv:"类型,omitempty"`
|
||||
Weight int32 `csv:"重量,omitempty"`
|
||||
RankLevel int32 `csv:"排序权重,omitempty"`
|
||||
GadgetId int32 `csv:"物件ID,omitempty"`
|
||||
Name string `csv:"数值用类型,omitempty"`
|
||||
ItemId int32 `csv:"ID"`
|
||||
Type int32 `csv:"类型,omitempty"`
|
||||
Weight int32 `csv:"重量,omitempty"`
|
||||
RankLevel int32 `csv:"排序权重,omitempty"`
|
||||
GadgetId int32 `csv:"物件ID,omitempty"`
|
||||
// 材料
|
||||
MaterialType int32 `csv:"材料类型,omitempty"`
|
||||
Use1Param1 string `csv:"[使用]1参数1,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user