【修改报错】

This commit is contained in:
weizhihong 2023-10-13 16:24:28 +08:00
parent affc86e005
commit a9c004a0f0
2 changed files with 5 additions and 2 deletions

View File

@ -60,7 +60,7 @@ func loadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
spk := &component.SpkElectronic{}
// 按钮组
for _, btn := range spkData.Buttons() {
switch btn.GetCode() {
switch btn.Code() {
case "SPKSXPLA":
spk.SPKSXPLA_BTN = NewButtonEntity(w, btn, entityMap)
case "SPKSSPLA":
@ -122,7 +122,7 @@ func loadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
emp := &component.EmpElectronic{}
// 按钮组
for _, btn := range spkData.Buttons() {
switch btn.GetCode() {
switch btn.Code() {
case "EMP1":
emp.EMP1_BTN = NewButtonEntity(w, btn, entityMap)
case "EMP3":

View File

@ -46,6 +46,9 @@ func newRepository(id string, version string) *Repository {
linkMap: make(map[string]*Link),
buttonMap: make(map[string]*Button),
psdMap: make(map[string]*Psd),
lightMap: make(map[string]*Light),
alarmMap: make(map[string]*Alarm),
stationMap: make(map[string]*Station),
}
}