Skip to content

Commit 815a8f2

Browse files
committed
Requirements are now copied into new contracts instead of having a reference to the contract type's requirement.
1 parent 4e36f40 commit 815a8f2

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Contract Configurator 1.28.3
22
- More changes to AgentParser, now commas are disallowed as part of agent names (thanks Tonas1997).
3+
- Fixed requirements being regenerated incorrectly on some contracts, resolves issues with "flickering" of contracts in mission control (thanks severedsolo).
34

45
Contract Configurator 1.28.2
56
- Allowed a wider range of Agent names to be parsed by the AgentParser (thanks Morphisor244).
0 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

source/ContractConfigurator/ConfiguredContract.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ public bool Initialize(ContractType contractType)
307307
requirements = new List<ContractRequirement>();
308308
foreach (ContractRequirement requirement in contractType.Requirements)
309309
{
310-
requirements.Add(requirement);
310+
ConfigNode serializedRequirement = new ConfigNode();
311+
requirement.Save(serializedRequirement);
312+
ContractRequirement copy = ContractRequirement.LoadRequirement(serializedRequirement);
313+
requirements.Add(copy);
311314
}
312315

313316
LoggingUtil.LogDebug(this, "Initialized contract: " + contractType);

0 commit comments

Comments
 (0)