Exemple #1
0
        public bool HasPrerequisites(IEnumerable <string> prerequisites)
        {
            var ownedPrereqs = TechTree.GatherOwnedPrerequisites(player);

            return(prerequisites.All(p => !(p.Replace("~", "").StartsWith("!")
                                            ^ !ownedPrereqs.ContainsKey(p.Replace("!", "").Replace("~", "")))));
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 public GlobalUpgradeManager(ActorInitializer init)
 {
     self     = init.self;
     techTree = self.Trait <TechTree>();
 }