This commit is contained in:
xzb 2023-11-22 13:25:14 +08:00
commit df02edd8fc

View File

@ -82,11 +82,11 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
for _, btn := range spkData.Buttons() {
e := NewButtonEntity(w, btn, entityMap)
switch btn.Code() {
case "X旁路":
case "SPKSXPLA":
spk.SPKSXPLA_BTN = e
case "S旁路":
case "SPKSSPLA":
spk.SPKSSPLA_BTN = e
case "人员防护试灯":
case "SDA":
spk.SDA = e
}
}
@ -94,13 +94,13 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
for _, key := range spkData.Keys() {
e := NewIBPKeyEntity(w, key.Id(), entityMap)
switch key.Code() {
case "SPKS1":
case "SPKSX1J":
spk.SPKSX1J_KEY = e
case "SPKS3":
case "SPKSX3J":
spk.SPKSX3J_KEY = e
case "SPKS2":
case "SPKSS2J":
spk.SPKSS2J_KEY = e
case "SPKS4":
case "SPKSS4J":
spk.SPKSS4J_KEY = e
}
}
@ -126,13 +126,13 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
for _, light := range spkData.Lights() {
e := NewIBPLightEntity(w, light.Id(), entityMap)
switch light.Code() {
case "启用状态_SPKS1":
case "SPKSX1D":
spk.SPKSX1D = e
case "启用状态_SPKS3":
case "SPKSX3D":
spk.SPKSX3D = e
case "启用状态_SPKS2":
case "SPKSS2D":
spk.SPKSS2D = e
case "启用状态_SPKS4":
case "SPKSS4D":
spk.SPKSS4D = e
}
}
@ -162,17 +162,17 @@ func LoadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
emp.EMP4_BTN = e
case "EMP6":
emp.EMP6_BTN = e
case "X紧急关闭":
case "EMP-X":
emp.EMPX_BTN = e
case "S紧急关闭":
case "EMP-S":
emp.EMPS_BTN = e
case "X紧急关闭复原":
case "XEMPFA":
emp.XEMPFA_BTN = e
case "S紧急关闭复原":
case "SEMPFA":
emp.SEMPFA_BTN = e
case "切断警铃":
case "QBA":
emp.QBA = e
case "信号试灯":
case "SDA":
emp.SDA = e
}
}
@ -190,16 +190,16 @@ func LoadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap,
for _, light := range spkData.Lights() {
e := NewIBPLightEntity(w, light.Id(), entityMap)
switch light.Code() {
case "X紧急关闭":
case "XEMPD":
emp.XEMPD = e
case "S紧急关闭":
case "SEMPD":
emp.SEMPD = e
}
}
// 蜂鸣器
for _, alarm := range spkData.Alarms() {
switch alarm.Code() {
case "报警电铃":
case "蜂鸣器":
emp.Alarm = NewAlarmEntity(w, alarm, entityMap)
}
}