Skip to content

Commit a4833d0

Browse files
authored
Added RunwayTouch and RunwayTakeoff for more accurate TakeOff and Land events (#272)
Co-authored-by: dutchie032 <dutchie032>
1 parent 4fbcedb commit a4833d0

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Added
10+
- Events `OnRunwayTouch` and `RunwayTakeoff` for "changed" TakeOff and Landing logic in DCS.
11+
912
## [0.8.0]
1013

1114
### Breaking Changes

STATUS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ should use their independent logging and tracing functions.
203203
- [x] `S_EVENT_HIT`
204204
- [x] `S_EVENT_TAKEOFF`
205205
- [x] `S_EVENT_LAND`
206+
- [x] `S_EVENT_RUNWAY_TAKEOFF`
207+
- [x] `S_EVENT_RUNWAY_TOUCH`
206208
- [x] `S_EVENT_CRASH`
207209
- [x] `S_EVENT_EJECTION`
208210
- [x] `S_EVENT_REFUELING`

lua/DCS-gRPC/methods/mission.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ GRPC.onDcsEvent = function(event)
9696
},
9797
}
9898

99+
elseif event.id == world.event.S_EVENT_RUNWAY_TAKEOFF then
100+
return {
101+
time = event.time,
102+
event = {
103+
type = "runwayTakeoff",
104+
initiator = {initiator = typed_exporter(event.initiator)},
105+
place = exporter(event.place),
106+
},
107+
}
108+
99109
elseif event.id == world.event.S_EVENT_LAND then
100110
return {
101111
time = event.time,
@@ -106,6 +116,16 @@ GRPC.onDcsEvent = function(event)
106116
},
107117
}
108118

119+
elseif event.id == world.event.S_EVENT_RUNWAY_TOUCH then
120+
return {
121+
time = event.time,
122+
event = {
123+
type = "runwayTouch",
124+
initiator = {initiator = typed_exporter(event.initiator)},
125+
place = exporter(event.place),
126+
},
127+
}
128+
109129
elseif event.id == world.event.S_EVENT_CRASH then
110130
return {
111131
time = event.time,

protos/dcs/mission/v0/mission.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ message StreamEventsResponse {
119119
dcs.common.v0.Airbase place = 2;
120120
}
121121

122+
// Occurs when an aircraft takes off from an airbase, farp, or ship.
123+
message RunwayTakeoffEvent {
124+
// The object that took off.
125+
dcs.common.v0.Initiator initiator = 1;
126+
// The airbase, farp or ship the unit took off from.
127+
dcs.common.v0.Airbase place = 2;
128+
}
129+
122130
// Occurs when an aircraft lands at an airbase, farp or ship.
123131
message LandEvent {
124132
// The object that landed.
@@ -127,6 +135,14 @@ message StreamEventsResponse {
127135
dcs.common.v0.Airbase place = 2;
128136
}
129137

138+
// Occurs when an aircraft lands at an airbase, farp or ship.
139+
message RunwayTouchEvent {
140+
// The object that landed.
141+
dcs.common.v0.Initiator initiator = 1;
142+
// The airbase, farp or ship the unit landed at.
143+
dcs.common.v0.Airbase place = 2;
144+
}
145+
130146
// Occurs when an aircraft crashes into the ground and is completely
131147
// destroyed.
132148
message CrashEvent {
@@ -539,6 +555,9 @@ message StreamEventsResponse {
539555
LandingQualityMarkEvent landing_quality_mark = 39;
540556
// @exclude 40 reserved for S_EVENT_BDA
541557

558+
RunwayTakeoffEvent runway_takeoff = 54;
559+
RunwayTouchEvent runway_touch = 55;
560+
542561
// The following events are additions on top of DCS's own event enum,
543562
// which is why they start at 8192 to give DCS plenty of space for
544563
// new built-in events.

0 commit comments

Comments
 (0)