public bool HasPrerequisites(IEnumerable <string> prerequisites) { var ownedPrereqs = TechTree.GatherOwnedPrerequisites(player); return(prerequisites.All(p => !(p.Replace("~", "").StartsWith("!") ^ !ownedPrereqs.ContainsKey(p.Replace("!", "").Replace("~", ""))))); }
public SupportPowerManager(ActorInitializer init) { self = init.self; DevMode = self.Trait <DeveloperMode>(); TechTree = self.Trait <TechTree>(); RadarPings = Exts.Lazy(() => init.world.WorldActor.TraitOrDefault <RadarPings>()); init.world.ActorAdded += ActorAdded; init.world.ActorRemoved += ActorRemoved; }
public GlobalUpgradeManager(ActorInitializer init) { self = init.self; techTree = self.Trait <TechTree>(); }