コード例 #1
0
        public StructureChronoOrderGenerator(Actor self, StructureChronoInfo info)
        {
            var world = self.World;

            this.self = self;
            this.info = info;

            buildingInfo = self.Info.TraitInfo <BuildingInfo>();
            //BuildableInfo buildableInfo = self.Info.TraitInfo<BuildableInfo>();
            //faction = buildableInfo.ForceFaction
            //	?? (mostLikelyProducer.Trait != null ? mostLikelyProducer.Trait.Faction : queue.Actor.Owner.Faction.InternalName);

            var map     = world.Map;
            var tileset = world.Map.Tileset.ToLowerInvariant();

            buildOk      = map.Rules.Sequences.GetSequence("overlay", "build-valid-{0}".F(tileset)).GetSprite(0);
            buildBlocked = map.Rules.Sequences.GetSequence("overlay", "build-invalid").GetSprite(0);

            this.building = self.Info.Name;             // name in the rules definition
        }
コード例 #2
0
 public StructureChrono(StructureChronoInfo info)
 {
     Info = info;
 }