From f840db0458b8090be1437923b7b6e3302e14abf9 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Thu, 28 Oct 2021 11:03:21 +0200 Subject: [PATCH] Fix bug which allowed you to build machines for free by taking the board out and putting it in again. --- .../Construction/Components/MachineFrameComponent.cs | 8 ++++---- Resources/Changelog/Parts/frame.yml | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 Resources/Changelog/Parts/frame.yml diff --git a/Content.Server/Construction/Components/MachineFrameComponent.cs b/Content.Server/Construction/Components/MachineFrameComponent.cs index 97540fc59d..0f85261070 100644 --- a/Content.Server/Construction/Components/MachineFrameComponent.cs +++ b/Content.Server/Construction/Components/MachineFrameComponent.cs @@ -130,10 +130,10 @@ namespace Content.Server.Construction.Components private void ResetProgressAndRequirements(MachineBoardComponent machineBoard) { - _requirements = machineBoard.Requirements; - _materialRequirements = machineBoard.MaterialIdRequirements; - _componentRequirements = machineBoard.ComponentRequirements; - _tagRequirements = machineBoard.TagRequirements; + _requirements = new Dictionary(machineBoard.Requirements); + _materialRequirements = new Dictionary(machineBoard.MaterialIdRequirements); + _componentRequirements = new Dictionary(machineBoard.ComponentRequirements); + _tagRequirements = new Dictionary(machineBoard.TagRequirements); _progress.Clear(); _materialProgress.Clear(); diff --git a/Resources/Changelog/Parts/frame.yml b/Resources/Changelog/Parts/frame.yml new file mode 100644 index 0000000000..4bc3e55fba --- /dev/null +++ b/Resources/Changelog/Parts/frame.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix # One of the following: Add, Remove, Tweak, Fix + message: Fix being able to build machines for free by taking the board out, putting it in again and screwing.