context: namespace Server.Items
  {
      public abstract class BaseGranite : Item, ICommodity
      {
          private CraftResource m_Resource;
          public BaseGranite(CraftResource resource)
              : base(0x1779)
          {
              Hue = CraftResources.GetHue(resource);
              Stackable = true;
  
              m_Resource = resource;
          }
  
          public BaseGranite(Serial serial)
              : base(serial)
          {
          }
  
          TextDefinition ICommodity.Description => LabelNumber;
          bool ICommodity.IsDeedable => true;
  
          [CommandProperty(AccessLevel.GameMaster)]
          public CraftResource Resource
          {
              get
              {
                  return m_Resource;
              }
              set
              {
                  m_Resource = value;
                  InvalidateProperties();
              }
          }
          public override double DefaultWeight => 1.0;
          public override int LabelNumber => 1044607;// high quality granite
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(1); // version
  
              writer.Write((int)m_Resource);
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
  
              switch (version)
              {
                  case 1:
                  case 0:
                      {
                          m_Resource = (CraftResource)reader.ReadInt();
                          break;
                      }
              }
          }
  
          public override void GetProperties(ObjectPropertyList list)
          {
              base.GetProperties(list);
  
              if (!CraftResources.IsStandard(m_Resource))
              {
                  int num = CraftResources.GetLocalizationNumber(m_Resource);
  
                  if (num > 0)
                      list.Add(num);
                  else
                      list.Add(CraftResources.GetName(m_Resource));
              }
          }
      }
  
      public class Granite : BaseGranite
      {
          [Constructable]
          public Granite()
              : this(1)
          {
          }
  
          [Constructable]
          public Granite(int amount)
              : base(CraftResource.Iron)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public Granite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
          }
      }
  
      public class DullCopperGranite : BaseGranite
      {
          [Constructable]
          public DullCopperGranite()
              : this(1)
          {
          }
  
          [Constructable]
          public DullCopperGranite(int amount)
              : base(CraftResource.DullCopper)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public DullCopperGranite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
          }
      }
  
      public class ShadowIronGranite : BaseGranite
      {
          [Constructable]
          public ShadowIronGranite()
              : this(1)
          {
          }
  
          [Constructable]
          public ShadowIronGranite(int amount)
              : base(CraftResource.ShadowIron)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public ShadowIronGranite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
          }
      }
  
      public class CopperGranite : BaseGranite
      {
          [Constructable]
          public CopperGranite()
              : this(1)
          {
          }
  
          [Constructable]
          public CopperGranite(int amount)
              : base(CraftResource.Copper)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public CopperGranite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
          }
      }
  
      public class BronzeGranite : BaseGranite
      {
          [Constructable]
          public BronzeGranite()
              : this(1)
          {
          }
  
          [Constructable]
          public BronzeGranite(int amount)
              : base(CraftResource.Bronze)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public BronzeGranite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
              int version = reader.ReadInt();
          }
      }
  
      public class GoldGranite : BaseGranite
      {
          [Constructable]
          public GoldGranite()
              : this(1)
          {
          }
  
          [Constructable]
          public GoldGranite(int amount)
              : base(CraftResource.Gold)
          {
              if (Stackable)
                  Amount = amount;
              else
                  Amount = 1;
          }
  
          public GoldGranite(Serial serial)
              : base(serial)
          {
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
  
              writer.Write(0); // version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
  
gt:             int version = reader.ReadInt();