Пример #1
0
        public bool ValidateLocSec()
        {
            if (General.RemainingSecures(ParentHouse) + Secures < Secures)
            {
                return(false);
            }

            return(General.RemainingLocks(ParentHouse) + Locks >= Locks);
        }
Пример #2
0
        public void FixLocSec()
        {
            var count = 0;

            if ((count = General.RemainingSecures(c_ParentHouse) + Secures) < Secures)
            {
                Secures = count;
            }

            if ((count = General.RemainingLocks(c_ParentHouse) + Locks) < Locks)
            {
                Locks = count;
            }
        }
Пример #3
0
        private void LocSecPage(int width, ref int y)
        {
            AddHtml(0, y += 10, width, "<CENTER>Lockdowns and Secures");
            AddImage(width / 2 - 100, y + 2, 0x39);
            AddImage(width / 2 + 70, y + 2, 0x3B);

            AddHtml(0, y += 25, width, "<CENTER>Suggest Secures");
            AddButton(width / 2 - 70, y + 3, 0x2716, "Suggest LocSec", SuggestLocSec);
            AddButton(width / 2 + 60, y + 3, 0x2716, "Suggest LocSec", SuggestLocSec);

            AddHtml(
                30,
                y += 25,
                width / 2 - 20,
                "<DIV ALIGN=RIGHT>Secures (Max: " + (General.RemainingSecures(c_Contract.ParentHouse) + c_Contract.Secures) + ")");
            AddTextField(width / 2 + 50, y, 50, 20, 0x480, 0xBBC, "Secures", c_Contract.Secures.ToString());
            AddButton(width / 2 + 25, y + 3, 0x2716, "Secures", Secures);

            AddHtml(
                30,
                y += 20,
                width / 2 - 20,
                "<DIV ALIGN=RIGHT>Lockdowns (Max: " + (General.RemainingLocks(c_Contract.ParentHouse) + c_Contract.Locks) + ")");
            AddTextField(width / 2 + 50, y, 50, 20, 0x480, 0xBBC, "Lockdowns", c_Contract.Locks.ToString());
            AddButton(width / 2 + 25, y + 3, 0x2716, "Lockdowns", Lockdowns);

            var helptext =
                String.Format(
                    "   Without giving storage, this wouldn't be much of a home!  Here you give them lockdowns " +
                    "and secures from your own home.  Use the suggest button for an idea of how much you should give.  Be very careful when " +
                    "renting your property: if you use too much storage you begin to use storage you reserved for your clients.  " +
                    "You will receive a 48 hour warning when this happens, but after that the contract disappears!");

            AddHtml(10, y += 35, width - 20, 180, helptext, false, false);

            y += 180;

            AddHtml(30, y += 20, 80, "Previous");
            AddButton(10, y, 0x15E3, 0x15E7, "Previous", ChangePage, (int)c_Page - 1);

            if (c_Contract.Locks != 0 && c_Contract.Secures != 0)
            {
                AddHtml(width - 60, y, 60, "Next");
                AddButton(width - 30, y, 0x15E1, 0x15E5, "Next", ChangePage, (int)c_Page + 1);
            }
        }
Пример #4
0
        private void LocSecPage()
        {
            int y = 0;

            AddHtml(0, y        += 10, Width, 20, HTML.White + "<CENTER>Lockdowns and Secures", false, false);
            AddBackground(40, y += 20, Width - 80, 3, 0x13BE);

            AddHtml(20, y += 10, 140, 20, HTML.White + "Secures (Max: " + (General.RemainingSecures(c_Contract.ParentHouse) + c_Contract.Secures) + ")", false, false);
            AddImageTiled(160, y, 50, 20, 0xBBC);
            AddTextField(160, y, 50, 20, 0x480, 10, c_Contract.Secures.ToString());

            AddHtml(20, y += 21, 140, 20, HTML.White + "Lockdowns (Max: " + (General.RemainingLocks(c_Contract.ParentHouse) + c_Contract.Locks) + ")", false, false);
            AddImageTiled(160, y, 50, 20, 0xBBC);
            AddTextField(160, y, 50, 20, 0x480, 11, c_Contract.Locks.ToString());

            AddHtml(240, y - 10, 60, 20, HTML.White + "Suggest", false, false);
            AddButton(220, y - 5, 0x837, 0x838, "Suggest LocSec", new TimerCallback(SuggestLocSec));

            AddHtml(140, y += 25, 60, 20, HTML.White + "Submit", false, false);
            AddButton(120, y + 5, 0x837, 0x838, "Submit", new TimerCallback(Submit));

            string helptext = String.Format("   Without giving storage, this wouldn't be much of a home!  Here you give them lockdowns " +
                                            "and secures from your own home.  Use the suggest button for an idea of how much you should give.  Be very careful when " +
                                            "renting your property: if you use too much storage you begin to use storage you reserved for your clients.  " +
                                            "You will receive a 48 hour warning when this happens, but after that the contract disappears!");

            AddBackground(40, y += 20, Width - 80, 3, 0x13BE);

            y += 10;

            AddHtml(10, y, Width - 20, Height - y - 50, HTML.White + helptext, false, true);

            AddHtml(30, Height - 30, 80, 20, HTML.White + "Previous", false, false);
            AddButton(10, Height - 30, 0x15E3, 0x15E7, "Previous", new TimerStateCallback(ChangePage), (int)c_Page - 1);

            if (c_Contract.Locks != 0 && c_Contract.Secures != 0)
            {
                AddHtml(Width - 60, Height - 30, 60, 20, HTML.White + "Next", false, false);
                AddButton(Width - 30, Height - 30, 0x15E1, 0x15E5, "Next", new TimerStateCallback(ChangePage), (int)c_Page + 1);
            }
        }
Пример #5
0
        private void LocSecPage(int width, ref int y)
        {
            AddHtml(0, y += 10, width, "<CENTER>Lockdowns and Secures");
            AddImage(width / 2 - 100, y + 2, 0x39);
            AddImage(width / 2 + 70, y + 2, 0x3B);

            AddHtml(0, y += 25, width, "<CENTER>Suggest Secures");
            AddButton(width / 2 - 70, y + 3, 0x2716, "Suggest LocSec", new GumpCallback(SuggestLocSec));
            AddButton(width / 2 + 60, y + 3, 0x2716, "Suggest LocSec", new GumpCallback(SuggestLocSec));

            AddHtml(30, y += 25, width / 2 - 20, "<DIV ALIGN=RIGHT>Secures (Max: " + (General.RemainingSecures(c_Contract.ParentHouse) + c_Contract.Secures) + ")");
            AddTextField(width / 2 + 50, y, 50, 20, 0x480, 0xBBC, "Secures", c_Contract.Secures.ToString());
            AddButton(width / 2 + 25, y + 3, 0x2716, "Secures", new GumpCallback(Secures));

            AddHtml(30, y += 20, width / 2 - 20, "<DIV ALIGN=RIGHT>Lockdowns (Max: " + (General.RemainingLocks(c_Contract.ParentHouse) + c_Contract.Locks) + ")");
            AddTextField(width / 2 + 50, y, 50, 20, 0x480, 0xBBC, "Lockdowns", c_Contract.Locks.ToString());
            AddButton(width / 2 + 25, y + 3, 0x2716, "Lockdowns", new GumpCallback(Lockdowns));

            string helptext = String.Format("Sans donner d'espace, ce ne serait pas vraiment une maison, ici, vous assignez les lockdowns" +
                                            "et secures de votre propre maison. Utilisez le bouton suggérer pour une idée de combien vous devriez alouer. Soyez très prudent lorsque vous" +
                                            "louez votre bien: si vous utilisez trop de stockage vous commencerez à utiliser du stockage que vous avez réservé a vos clients" +
                                            "Vous recevrez un avertissement de 48 heures lorsque cela se produit, après quoi le contrat disparaîtra!");

            AddHtml(10, y += 35, width - 20, 180, helptext, false, false);

            y += 180;

            AddHtml(30, y += 20, 80, "Previous");
            AddButton(10, y, 0x15E3, 0x15E7, "Previous", new GumpStateCallback(ChangePage), (int)c_Page - 1);

            if (c_Contract.Locks != 0 && c_Contract.Secures != 0)
            {
                AddHtml(width - 60, y, 60, "Next");
                AddButton(width - 30, y, 0x15E1, 0x15E5, "Next", new GumpStateCallback(ChangePage), (int)c_Page + 1);
            }
        }