[#2435] Copy stageMap instead of directly referencing it
This change is to ensure that the stageMap property of the Rocket class is isolated from its source object. Previously, it directly referenced the stageMap of the source, but now we create an entirely new ConcurrentHashMap to hold those stages. This will prevent possible conflicts and unwanted modifications to the source stageMap.
This commit is contained in:
parent
940b913dfa
commit
a793f27f51
@ -433,7 +433,7 @@ public class Rocket extends ComponentAssembly {
|
||||
this.functionalModID = source.functionalModID;
|
||||
this.refType = source.refType;
|
||||
this.customReferenceLength = source.customReferenceLength;
|
||||
this.stageMap = source.stageMap;
|
||||
this.stageMap = new ConcurrentHashMap<>(source.stageMap);
|
||||
|
||||
// these flight configurations need to reference the _this_ Rocket:
|
||||
this.configSet.reset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user