diff --git a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs index 124115d262..4c9d0c8abd 100644 --- a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs @@ -36,7 +36,8 @@ namespace Content.Server.GameObjects.Components.Interactable public void ExposeData(ObjectSerializer serializer) { - Behavior = (Tool)serializer.ReadStringEnumKey("behavior"); + if(serializer.Reading) + Behavior = (Tool)serializer.ReadStringEnumKey("behavior"); serializer.DataField(ref _state, "state", string.Empty); serializer.DataField(ref _sprite, "sprite", string.Empty); serializer.DataField(ref _texture, "texture", string.Empty); diff --git a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs index 83feab60e4..042d7fd113 100644 --- a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs @@ -132,10 +132,11 @@ namespace Content.Server.GameObjects.Components.Interactable { base.ExposeData(serializer); + if(serializer.Reading) + _behavior = (Tool)serializer.ReadStringEnumKey("behavior"); serializer.DataField(ref _speedModifier, "speed", 1); serializer.DataField(ref _useSound, "useSound", string.Empty); serializer.DataField(ref _useSoundCollection, "useSoundCollection", string.Empty); - _behavior = (Tool)serializer.ReadStringEnumKey("behavior"); } ///