Fix vessel merge null checks

This commit is contained in:
Joshua Thome 2023-03-21 21:11:02 -05:00
parent 2032fb566c
commit 4085eb8eff

View File

@ -270,12 +270,12 @@ namespace NewHorizons.External.Configs
respawnHere = respawnHere || otherConfig.respawnHere; respawnHere = respawnHere || otherConfig.respawnHere;
startHere = startHere || otherConfig.startHere; startHere = startHere || otherConfig.startHere;
Vessel = Vessel == null ? otherConfig.Vessel : Vessel; if (Vessel != null && otherConfig.Vessel != null)
if (Vessel != null)
{ {
Vessel.spawnOnVessel = Vessel.spawnOnVessel || otherConfig.Vessel.spawnOnVessel; Vessel.spawnOnVessel = Vessel.spawnOnVessel || otherConfig.Vessel.spawnOnVessel;
Vessel.alwaysPresent = Vessel.alwaysPresent || otherConfig.Vessel.alwaysPresent; Vessel.alwaysPresent = Vessel.alwaysPresent || otherConfig.Vessel.alwaysPresent;
} }
Vessel = Vessel == null ? otherConfig.Vessel : Vessel;
entryPositions = Concatenate(entryPositions, otherConfig.entryPositions); entryPositions = Concatenate(entryPositions, otherConfig.entryPositions);
curiosities = Concatenate(curiosities, otherConfig.curiosities); curiosities = Concatenate(curiosities, otherConfig.curiosities);