Esempio n. 1
0
        //--------------------------------------------------------

        public void AddStuff(char sym, char realSym, string Name, List <string> data)//Добавление переносного объекта
        {
            Stuff stuff = new Stuff(Name, 0, 0, "Simple", 0, 0);

            foreach (string tag in data)
            {
                switch (tag)
                {
                case var someVal when new Regex(@"Quality").IsMatch(tag): stuff.Quality = GetNumeric(tag); break;

                case var someVal when new Regex(@"Cost").IsMatch(tag): stuff.Cost = GetNumeric(tag); break;

                case "Weapon": stuff.Type = tag; break;

                case "OffWeapon": stuff.Type = tag; break;

                case "Dress": stuff.Type = tag; break;

                case "Accessory": stuff.Type = tag; break;

                default: break;
                }
            }

            if (count == 0)
            {
                missionSymTable.Add(sym, stuff);
            }

            else if (objects[count - 1] is Person)
            {
                stuff.Take((Person)objects[count - 1]);
            }

            objects[count] = stuff;
            count          = 0;
        }
Esempio n. 2
0
 public void PutIntoPocketA()
 {
     Accessory.Take(Accessory.Owner);   Accessory = null; ShowObj();
 }
Esempio n. 3
0
 public void PutIntoPocketD()
 {
     Dress.Take(Dress.Owner);      Dress = null; ShowObj();
 }
Esempio n. 4
0
 public void PutIntoPocketRH()
 {
     RightHand.Take(RightHand.Owner);  RightHand = null; ShowObj();
 }
Esempio n. 5
0
 //Снять предметы
 public void PutIntoPocketLH()
 {
     LeftHand.Take(LeftHand.Owner);   LeftHand = null; ShowObj();
 }