From 91dc5d2a839d55d1686a604538d1bc17c4f99cb9 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Sun, 17 Sep 2017 07:36:11 +0200 Subject: [PATCH] AI Tanker: notify any listeners that a new tanker has been added. need to set /ai/models/model-added to the path of the tanker node when created. --- Nasal/tanker.nas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nasal/tanker.nas b/Nasal/tanker.nas index ada0f8194..5f6b32df7 100644 --- a/Nasal/tanker.nas +++ b/Nasal/tanker.nas @@ -137,6 +137,10 @@ var Tanker = { m.model.getNode("roll-deg-prop", 1).setValue(m.rollN.getPath()); m.model.getNode("load", 1).remove(); m.identify(); + + # notify any listeners that a new model has been added. + setprop("/ai/models/model-added", m.ai.getPath()); + return Tanker.active[m.callsign] = m; }, del: func {