172f65b14c
【调整消息服务代码】 【删除多余代码】 【调整方法、结构体名称】
23 lines
740 B
Go
23 lines
740 B
Go
package memory
|
|
|
|
import (
|
|
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
|
|
"joylink.club/rtsssimulation/fi"
|
|
)
|
|
|
|
// 操作IBP按钮
|
|
func ChangeIBPButtonState(sim *VerifySimulation, mapId int32, stationId, btnCode string, pressDown bool) {
|
|
stationUid := QueryUidByMidAndComId(mapId, stationId, &graphicData.Station{})
|
|
if pressDown {
|
|
fi.PressDownButton(sim.World, stationUid+"_button_"+btnCode)
|
|
} else {
|
|
fi.PressUpButton(sim.World, stationUid+"_button_"+btnCode)
|
|
}
|
|
}
|
|
|
|
// 操作IBP按钮
|
|
func ChangeIBPKeyState(sim *VerifySimulation, mapId int32, stationId, keyCode string, gear int32) {
|
|
stationUid := QueryUidByMidAndComId(mapId, stationId, &graphicData.Station{})
|
|
fi.SwitchKeyGear(sim.World, stationUid+"_key_"+keyCode, gear)
|
|
}
|