2023-10-18 13:53:17 +08:00
|
|
|
package memory
|
|
|
|
|
|
|
|
import (
|
2024-01-11 10:24:56 +08:00
|
|
|
"joylink.club/bj-rtsts-server/dto/data_proto"
|
2023-10-18 13:53:17 +08:00
|
|
|
"joylink.club/rtsssimulation/fi"
|
|
|
|
)
|
|
|
|
|
2023-10-27 14:57:37 +08:00
|
|
|
// 操作esb按钮
|
2023-12-14 13:04:48 +08:00
|
|
|
func ChangeEsbButtonState(sim *VerifySimulation, mapId int32, btnId uint32, pressDown bool) error {
|
2024-01-11 10:24:56 +08:00
|
|
|
uid := QueryUidByMidAndComId(mapId, btnId, &data_proto.EsbButton{})
|
2023-10-18 13:53:17 +08:00
|
|
|
if pressDown {
|
2023-11-06 14:30:09 +08:00
|
|
|
return fi.PressDownButton(sim.World, uid)
|
2023-10-18 13:53:17 +08:00
|
|
|
} else {
|
2023-11-06 14:30:09 +08:00
|
|
|
return fi.PressUpButton(sim.World, uid)
|
2023-10-18 13:53:17 +08:00
|
|
|
}
|
|
|
|
}
|