@@ -122,11 +122,12 @@ namespace UKControllerPlugin::IntentionCode {
122122 if (!codes.is_array ()) {
123123 LogWarning (" Intention codes dependency is invalid" );
124124 // Add the fallback - full airfield ICAO
125- collection->Add (std::make_shared<IntentionCodeModel>(
126- -1 ,
127- std::make_unique<FullAirfieldIdentifier>(),
128- std::make_unique<AllOf>(std::list<std::shared_ptr<Condition>>({})),
129- std::unique_ptr<IntentionCodeMetadata>(new IntentionCodeMetadata)));
125+ collection->Add (
126+ std::make_shared<IntentionCodeModel>(
127+ -1 ,
128+ std::make_unique<FullAirfieldIdentifier>(),
129+ std::make_unique<AllOf>(std::list<std::shared_ptr<Condition>>({})),
130+ std::unique_ptr<IntentionCodeMetadata>(new IntentionCodeMetadata)));
130131 return collection;
131132 }
132133
@@ -137,21 +138,24 @@ namespace UKControllerPlugin::IntentionCode {
137138 }
138139
139140 auto metadata = std::unique_ptr<IntentionCodeMetadata>(new IntentionCodeMetadata);
140- collection->Add (std::make_shared<IntentionCodeModel>(
141- code.at (" id" ).get <int >(),
142- MakeCode (code.at (" code" )),
143- std::make_unique<AllOf>(MakeConditions (code.at (" conditions" ), generator, activeControllers, *metadata))
141+ collection->Add (
142+ std::make_shared<IntentionCodeModel>(
143+ code.at (" id" ).get <int >(),
144+ MakeCode (code.at (" code" )),
145+ std::make_unique<AllOf>(
146+ MakeConditions (code.at (" conditions" ), generator, activeControllers, *metadata))
144147
145- ,
146- std::move (metadata)));
148+ ,
149+ std::move (metadata)));
147150 }
148151
149- // Add full airfield icao fallback
150- collection->Add (std::make_shared<IntentionCodeModel>(
151- -1 ,
152- std::make_unique<FullAirfieldIdentifier>(),
153- std::make_unique<AllOf>(std::list<std::shared_ptr<Condition>>({})),
154- std::unique_ptr<IntentionCodeMetadata>(new IntentionCodeMetadata)));
152+ // Add blank as fallback
153+ collection->Add (
154+ std::make_shared<IntentionCodeModel>(
155+ -1 ,
156+ std::make_unique<SingleCode>(" " ),
157+ std::make_unique<AllOf>(std::list<std::shared_ptr<Condition>>({})),
158+ std::unique_ptr<IntentionCodeMetadata>(new IntentionCodeMetadata)));
155159
156160 LogInfo (" Loaded " + std::to_string (collection->Count ()) + " intention codes" );
157161 return collection;
0 commit comments