diff --git a/entity/balise.go b/entity/balise.go index 7b04774..993d356 100644 --- a/entity/balise.go +++ b/entity/balise.go @@ -39,6 +39,9 @@ func newBaliseEntity(w ecs.World, td *repository.Transponder, worldData *compone Telegram: td.FixedTelegram(), UserTelegram: td.FixedUserTelegram(), }) + if proto.Transponder_IB == td.BaliseType() || proto.Transponder_VB == td.BaliseType() { + entry.AddComponent(component.BaliseVariableTelegramType) + } component.LinkPositionType.SetValue(entry, component_data.LinkPosition{ LinkId: td.LinkPosition().Link().Id(), Offset: td.LinkPosition().Offset(), diff --git a/repository/transponder.go b/repository/transponder.go index 3badd8d..8fe38fb 100644 --- a/repository/transponder.go +++ b/repository/transponder.go @@ -43,3 +43,7 @@ func (t *Transponder) LinkPosition() *LinkPosition { func (t *Transponder) Km() *proto.Kilometer { return t.km } + +func (t *Transponder) BaliseType() proto.Transponder_Type { + return t.baliseType +}