From e59ae240a2c97b7e9e668af1581100da31d03552 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 08:13:30 +0700 Subject: [PATCH] Last fix --- .../_CorvaxNext/OfferItem/OfferItemSystem.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Content.Client/_CorvaxNext/OfferItem/OfferItemSystem.cs b/Content.Client/_CorvaxNext/OfferItem/OfferItemSystem.cs index ab44ba398c2..949ce1addbc 100644 --- a/Content.Client/_CorvaxNext/OfferItem/OfferItemSystem.cs +++ b/Content.Client/_CorvaxNext/OfferItem/OfferItemSystem.cs @@ -21,8 +21,6 @@ public override void Initialize() Subs.CVar(_cfg, NextVars.OfferModeIndicatorsPointShow, OnShowOfferIndicatorsChanged, true); } - - public override void Shutdown() { _overlayManager.RemoveOverlay(); @@ -33,21 +31,13 @@ public bool IsInOfferMode() { var entity = _playerManager.LocalEntity; - if (entity == null) - return false; - - return IsInOfferMode(entity.Value); + return entity is not null && IsInOfferMode(entity.Value); } + private void OnShowOfferIndicatorsChanged(bool isShow) { if (isShow) - { - _overlayManager.AddOverlay(new OfferItemIndicatorsOverlay( - _inputManager, - EntityManager, - _eye, - this)); - } + _overlayManager.AddOverlay(new OfferItemIndicatorsOverlay(_inputManager, EntityManager, _eye, this)); else _overlayManager.RemoveOverlay(); }