Beispiel #1
0
        public static void Add(Item item)
        {
            Item i = item.ShallowClone();

            i.readied           = false;
            i.hidden_names_flag = 0;
            i.name = i.GenerateName(0);
            if (library.Contains(i) == false)
            {
                library.Add(i);
                Write();
            }
        }
Beispiel #2
0
        /*id_item*/
        internal static void ItemDisplayNameBuild(bool display_new_name, bool displayReadied,
            int yCol, int xCol, Item item)
        {
            item.name = string.Empty;

            if (displayReadied == true)
            {
                if (item.readied)
                {
                    item.name = " Yes  ";
                }
                else
                {
                    item.name = " No   ";
                }
            }

            bool detectMagic = gbl.TeamList.Exists(pla => pla.HasAffect(Affects.detect_magic));

            if (detectMagic == true &&
                (item.plus > 0 || item.plus_save > 0 || item.cursed == true))
            {
                item.name += "* ";
            }

            if (item.count > 0)
            {
                item.name += item.count.ToString() + " ";
            }

            int hidden_names_flag = item.hidden_names_flag;

            if (Cheats.display_full_item_names)
            {
                hidden_names_flag = 0;
            }

            item.name += item.GenerateName(hidden_names_flag);

            if (display_new_name)
            {
                seg041.displayString(item.name, 0, 10, yCol, xCol);
            }
        }