Fix bug which allowed you to build machines for free by taking the board out and putting it in again.

This commit is contained in:
Vera Aguilera Puerto
2021-10-28 11:03:21 +02:00
parent 1e7a3ff191
commit f840db0458
2 changed files with 8 additions and 4 deletions

View File

@@ -130,10 +130,10 @@ namespace Content.Server.Construction.Components
private void ResetProgressAndRequirements(MachineBoardComponent machineBoard) private void ResetProgressAndRequirements(MachineBoardComponent machineBoard)
{ {
_requirements = machineBoard.Requirements; _requirements = new Dictionary<MachinePart, int>(machineBoard.Requirements);
_materialRequirements = machineBoard.MaterialIdRequirements; _materialRequirements = new Dictionary<string, int>(machineBoard.MaterialIdRequirements);
_componentRequirements = machineBoard.ComponentRequirements; _componentRequirements = new Dictionary<string, GenericPartInfo>(machineBoard.ComponentRequirements);
_tagRequirements = machineBoard.TagRequirements; _tagRequirements = new Dictionary<string, GenericPartInfo>(machineBoard.TagRequirements);
_progress.Clear(); _progress.Clear();
_materialProgress.Clear(); _materialProgress.Clear();

View File

@@ -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.