From 9d80de3ecfd07105ad912e76fb158aea39f83cd1 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:49:22 -0300 Subject: [PATCH] fix problem with wifi link to chat --- .../Items/Components/Signal/WifiComponent.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/WifiComponent.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/WifiComponent.cs index 48fcd6243..ad06fd954 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/WifiComponent.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Signal/WifiComponent.cs @@ -60,6 +60,8 @@ namespace Barotrauma.Items.Components set; } + private bool linkToChat = false; + [ConditionallyEditable(ConditionallyEditable.ConditionType.AllowLinkingWifiToChat)] [Serialize(false, false, description: "If enabled, any signals received from another chat-linked wifi component are displayed " + "as chat messages in the chatbox of the player holding the item.", alwaysUseInstanceValues: true)] @@ -68,13 +70,14 @@ namespace Barotrauma.Items.Components #if SERVER get { - return GameMain.Lua.game.allowWifiChat; - } + if(GameMain.Lua.game.allowWifiChat) return true; + return linkToChat; + } set { - - } + linkToChat = value; + } #else get; set;