2023-10-19 17:09:57 +08:00
|
|
|
package memory
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/rtsssimulation/fi"
|
|
|
|
)
|
|
|
|
|
2023-10-27 14:57:37 +08:00
|
|
|
// 操作PSL按钮
|
2023-12-14 13:04:48 +08:00
|
|
|
func ChangePSLButtonState(sim *VerifySimulation, mapId int32, gateBoxId uint32, btnCode string, pressDown bool) {
|
2023-10-27 14:57:37 +08:00
|
|
|
uid := QueryUidStructure[*StationUidStructure](mapId)
|
2023-10-19 17:09:57 +08:00
|
|
|
gateBoxUid := uid.GateBoxIds[gateBoxId].Uid
|
|
|
|
if pressDown {
|
|
|
|
fi.PressDownButton(sim.World, gateBoxUid+"_"+btnCode)
|
|
|
|
} else {
|
|
|
|
fi.PressUpButton(sim.World, gateBoxUid+"_"+btnCode)
|
|
|
|
}
|
|
|
|
}
|