//-------------------------------------------------------- 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; }
public void PutIntoPocketA() { Accessory.Take(Accessory.Owner); Accessory = null; ShowObj(); }
public void PutIntoPocketD() { Dress.Take(Dress.Owner); Dress = null; ShowObj(); }
public void PutIntoPocketRH() { RightHand.Take(RightHand.Owner); RightHand = null; ShowObj(); }
//Снять предметы public void PutIntoPocketLH() { LeftHand.Take(LeftHand.Owner); LeftHand = null; ShowObj(); }