public bool IsValideMigrationTarget(Hex hex) { bool verdict = false; foreach(locomotionType loco in locomotion){ if(hex.MeetsLocomotionRequirements(loco)){ verdict = true; break; } } foreach(Adaptation.restriction item in restrictions){ if(!hex.MeetsRestrictionRequirements(item)){ verdict = false; break; } } return verdict; }
private void PopulateLocoIcons(Hex hab) { bool[] locoChecks = new bool[4]; locoChecks[0] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AQUATIC); locoChecks[1] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AMPHIBIOUS); locoChecks[2] = hab.MeetsLocomotionRequirements(Critter.locomotionType.TERRESTRIAL); locoChecks[3] = hab.MeetsLocomotionRequirements(Critter.locomotionType.AVIAN); SetLocoActive(); for (int i = 0; i < locoChecks.Length; i++) { SetLocoLock(i, locoChecks[i]); } }