Skip to content

Commit

Permalink
Fix HasCrew crewOnly attribute throwing harmless warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Dec 18, 2023
1 parent 8ecde28 commit e0f1c78
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ public override bool Load(ConfigNode configNode)
valid &= ConfigNodeUtil.ParseValue<int>(configNode, "maxExperience", x => maxExperience = x, this, 5, x => Validation.Between(x, 0, 5));
valid &= ConfigNodeUtil.ParseValue<int>(configNode, "minCrew", x => minCrew = x, this, 1, x => Validation.GE(x, 0));
valid &= ConfigNodeUtil.ParseValue<int>(configNode, "maxCrew", x => maxCrew = x, this, int.MaxValue, x => Validation.GE(x, minCrew));
string cO = configNode.GetValue("crewOnly");
crewOnly = cO != null && cO.ToLowerInvariant() == "true";

valid &= ConfigNodeUtil.ParseValue<bool>(configNode, "crewOnly", x => crewOnly = x, this, false);
valid &= ConfigNodeUtil.ParseValue<List<Kerbal>>(configNode, "kerbal", x => kerbal = x, this, new List<Kerbal>());
valid &= ConfigNodeUtil.ParseValue<List<Kerbal>>(configNode, "excludeKerbal", x => excludeKerbal = x, this, new List<Kerbal>());

Expand Down

0 comments on commit e0f1c78

Please sign in to comment.