예제 #1
0
 public virtual string GetCostString()
 {
     return("Design Effort:<color=#33EE33>" + DesignCost.ToString() + "</color> Cost:<color=#EE3333>" + Cost.ToString() + "</color> credits");
 }
예제 #2
0
        public FlyingCarpetConfigGump(MovableAddonKey key, Mobile owner) : base(key, owner)
        {
            if (_Owner == null || _Key == null)
            {
                return;
            }

            _Lamp = (FlyingCarpetMagicLamp)key;

            AddLabel(_X, _Y, 88, "Flying Carpet Configuration");

            AddLabel(_X, _Y += 50, 1152, "Current Carpet Layout");

            AddLabel(_X, _Y += 50, 1152, "Length: " + _Lamp.CarpetLength.ToString());
            AddLabel(_X + 150, _Y, 1152, "Width: " + _Lamp.CarpetWidth.ToString());
            AddLabel(_X, _Y += 40, 1152, "Design: ");

            AddItem(_X + 100, _Y, FlyingCarpetComponent.CarpetIDs[(int)_Lamp.CarpetType][0][0], _Key.AddonHue);

            AddLabel(_X, _Y += 50, 1152, "Available Modifications/Upgrades:");

            AddLabel(_X + 10, _Y += 20, 1152, String.Format("(cost requirement: {0})", CliLoc.GetName(_Lamp.ModifyResourceType)));


            AddLabel(_X, _Y += 50, 1152, "Modification");
            AddLabel(_X + 200, _Y, 1152, "Cost");

            AddLabel(_X, _Y += 30, 1152, "Change carpet design");
            AddLabel(_X + 200, _Y, 1152, DesignCost.ToString());

            if (_Lamp.Addon == null)
            {
                AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0);
            }

            if (_Lamp.CarpetLength < FlyingCarpet.MAX_LENGTH)
            {
                AddLabel(_X, _Y += 20, 1152, "Increase length");
                AddLabel(_X + 200, _Y, 1152, LengthUpgradeCost.ToString());

                if (_Lamp.Addon == null)
                {
                    AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0);
                }
            }

            if (_Lamp.CarpetWidth < FlyingCarpet.MAX_WIDTH)
            {
                AddLabel(_X, _Y += 20, 1152, "Increase width");
                AddLabel(_X + 200, _Y, 1152, WidthUpgradeCost.ToString());

                if (_Lamp.Addon == null)
                {
                    AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0);
                }
            }

            if (_Lamp.CarpetLength > 3)
            {
                AddLabel(_X, _Y += 20, 1152, "Decrease length");
                AddLabel(_X + 200, _Y, 1152, LengthDowngradeCost.ToString());

                if (_Lamp.Addon == null)
                {
                    AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 4, GumpButtonType.Reply, 0);
                }
            }

            if (_Lamp.CarpetWidth > 3)
            {
                AddLabel(_X, _Y += 20, 1152, "Decrease width");
                AddLabel(_X + 200, _Y, 1152, WidthDowngradeCost.ToString());

                if (_Lamp.Addon == null)
                {
                    AddButton(_X + 250, _Y, 0x15E1, 0x15E5, 5, GumpButtonType.Reply, 0);
                }
            }

            if (_Lamp.Addon != null)
            {
                AddLabel(_X, _Y += 30, 88, "To make upgrades, store your carpet");
            }
        }