export-table-pulgin-csharp 1.1.179 → 1.1.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ExportCSPlugin.d.ts","sourceRoot":"","sources":["../src/ExportCSPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAmD,MAAM,kBAAkB,CAAA;AAMtK,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAmRpE;AAED,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,SAAW;IACf,IAAI,EAAE,MAAM,EAAE,CAAS;IAEvB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI3C,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAOpC"}
1
+ {"version":3,"file":"ExportCSPlugin.d.ts","sourceRoot":"","sources":["../src/ExportCSPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAmD,MAAM,kBAAkB,CAAA;AAMtK,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAyRpE;AAED,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,SAAW;IACf,IAAI,EAAE,MAAM,EAAE,CAAS;IAEvB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI3C,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAOpC"}
@@ -145,7 +145,10 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
145
145
  for(var i = 0; i < Configs.Count; i++)
146
146
  {
147
147
  var c = Configs[i];
148
- ${tempDictByMemberName}.Add(c.${memberName}, c);
148
+ if(!${tempDictByMemberName}.TryAdd(c.${memberName}, c))
149
+ {
150
+ UnityEngine.Debug.LogError($"重复的配表字段值<${memberName}>: {c.${memberName}}");
151
+ }
149
152
  }
150
153
  }
151
154
  #if UNITY_EDITOR
@@ -178,7 +181,10 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
178
181
  ${tempRecordsDictByMemberName} = new Dictionary<${memberType}, ${RowClass}[]>(Configs.Count);
179
182
  }
180
183
  var records = Configs.Where(c => c.${memberName} == ${paraName}).ToArray();
181
- ${tempRecordsDictByMemberName}.Add(${paraName}, records);
184
+ if(!${tempRecordsDictByMemberName}.TryAdd(${paraName}, records))
185
+ {
186
+ UnityEngine.Debug.LogError($"重复的配表字段值<${paraName}>: {${paraName}}");
187
+ }
182
188
  return records;
183
189
  }
184
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "export-table-pulgin-csharp",
3
- "version": "1.1.179",
3
+ "version": "1.1.181",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {},
@@ -174,7 +174,10 @@ ${foreach(fields, f => {
174
174
  for(var i = 0; i < Configs.Count; i++)
175
175
  {
176
176
  var c = Configs[i];
177
- ${tempDictByMemberName}.Add(c.${memberName}, c);
177
+ if(!${tempDictByMemberName}.TryAdd(c.${memberName}, c))
178
+ {
179
+ UnityEngine.Debug.LogError($"重复的配表字段值<${memberName}>: {c.${memberName}}");
180
+ }
178
181
  }
179
182
  }
180
183
  #if UNITY_EDITOR
@@ -206,7 +209,10 @@ ${foreach(fields, f => {
206
209
  ${tempRecordsDictByMemberName} = new Dictionary<${memberType}, ${RowClass}[]>(Configs.Count);
207
210
  }
208
211
  var records = Configs.Where(c => c.${memberName} == ${paraName}).ToArray();
209
- ${tempRecordsDictByMemberName}.Add(${paraName}, records);
212
+ if(!${tempRecordsDictByMemberName}.TryAdd(${paraName}, records))
213
+ {
214
+ UnityEngine.Debug.LogError($"重复的配表字段值<${paraName}>: {${paraName}}");
215
+ }
210
216
  return records;
211
217
  }
212
218
  }