public void Repair() { if (!SetTypeInfo.ContainsKey(this.Type)) { throw new KeyNotFoundException("Unable to repair set furniture, type is not defined."); } this.Info = SetTypeInfo[this.Type]; }
public SetFurniture(string set, string type) { if (!SetTypeInfo.ContainsKey(type)) { throw new KeyNotFoundException("Unable to initialize set furniture, type is not defined."); } this.Set = set; this.Type = type; this.Subtype = 0; this.Info = SetTypeInfo[type]; }