From 7372a5fa72e0dbd55ecdcd3fb9161a7ef4af0998 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 24 Jan 2024 17:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=AD=94=E5=99=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=AF=E5=8F=98=E6=8A=A5=E6=96=87=E7=8A=B6=E6=80=81=E5=8F=8A?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity/balise.go | 3 +++ repository/transponder.go | 4 ++++ 2 files changed, 7 insertions(+) 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 +}