示例#1
0
            protected override void SetBlock(SuperBlock block, TBlockSubtypes subtypeId, bool addSubtype = true)
            {
                this.block     = block;
                subtype        = block.TBlock as T;
                this.SubtypeId = subtypeId;

                if (addSubtype && subtype != null)
                {
                    block.SubtypeId |= subtypeId;
                    block.subtypeAccessors.Add(this);
                }
            }
            public override void SetBlock(SuperBlock block)
            {
                base.SetBlock(block, TBlockSubtypes.GunBase);

                if (subtype != null)
                {
                    ammoTypes.Clear();
                    (subtype.AmmoInventory as IMyInventory).GetAcceptedItems(ammoTypes);

                    AmmoName.Clear();
                    TerminalUtilities.GetBeautifiedTypeID(AmmoTypes[0].SubtypeId, AmmoName);
                }
            }
            public override void SetBlock(SuperBlock block)
            {
                base.SetBlock(block, TBlockSubtypes.Inventory, block.TBlock.HasInventory);

                if (block.TBlock.HasInventory)
                {
                    inventories.Clear();
                    inventories.EnsureCapacity(InventoryCount);

                    for (int n = 0; n < InventoryCount; n++)
                    {
                        inventories.Add(new InventoryWrapper(block.TBlock.GetInventory(n)));
                    }
                }
            }
示例#4
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Timer);
 }
示例#5
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.GasTank);
 }
示例#6
0
 protected virtual void SetBlock(SuperBlock block, TBlockSubtypes subtypeId, TBlockSubtypes prerequsites) =>
 SetBlock(block, subtypeId, block.SubtypeId.UsesSubtype(prerequsites));
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.JumpDrive);
 }
示例#8
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Gyroscope);
 }
示例#9
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Rotor, TBlockSubtypes.MechanicalConnection);
 }
示例#10
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Warhead);
 }
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.LandingGear);
 }
示例#12
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.AirVent);
 }
示例#13
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Programmable);
 }
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Connector);
 }
示例#15
0
 public abstract void SetBlock(SuperBlock block);
示例#16
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Battery);
 }
示例#17
0
 public virtual void Reset()
 {
     SubtypeId = TBlockSubtypes.None;
     block     = null;
 }
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.LaserAntenna);
 }
示例#19
0
 public override void SetBlock(SuperBlock block)
 {
     base.SetBlock(block, TBlockSubtypes.Production);
 }