private static void WriteBuildingReport(BuildingType bt) { string s = bt.ToString(lng) + ":"; if (lng == Lang.En) { if (bt.DriveSkill != null) { s += String.Format(" This is a vehicle with capacity {0} kg. It can" + " move for {1} region{2} per turn", bt.Capacity, bt.Speed, bt.Speed == 1 ? "" : "s"); if (bt.Fuel != null) { s += ", spending 1 " + bt.Fuel.ToString(1, Lang.En) + " per region"; } s += "."; if (bt.DriveSkill != null) { s += String.Format(" A person must know {0} to DRIVE this vehicle.", bt.DriveSkill.ToString(Lang.En)); } if (bt.DriveTerrain != null) { s += " This vehicle can move in " + bt.DriveTerrain.FullNameEn + "."; } } else { s += " This is a building."; } if (bt.Defence > 0) { s += String.Format(" This structure provides protection to first {0} persons inside.", bt.Defence); } if (bt.Radiation != 0) { s += String.Format(" Radiation inside this structure is {0} by {1}.", bt.Radiation < 0 ? "lowered" : "raised", Math.Abs(bt.Radiation)); } if (bt.Temperature != 0) { s += String.Format(" This structure protects persons inside from {0}° cold.", bt.Temperature); } if (bt.Resource != null) { s += String.Format(" Structure adds {0} to region resources.", bt.Resource.ToString(lng)); } if (bt.HP > 0) { s += String.Format(" It provides defence in battle and has {0} hit points.", bt.HP); } string materials = bt.Materials.ToString(lng); materials = materials.Substring(0, materials.Length - 1); s += String.Format(" This structure requires " + materials + " to complete."); if (bt.OptionalMaterials.Count > 0) { s += " Optional components are: " + bt.OptionalMaterials.ToString(lng); } if (bt.NoBuild) { s += String.Format(" A person can't BUILD new objects of this type."); } } else { if (bt.DriveSkill != null) { s += String.Format(" Это транспорт. Его грузоподъёмность {0} кг, скорость - {1} регионов за ход.", bt.Capacity, bt.Speed); if (bt.Fuel != null) { s += " Для передвижения на 1 регион требуется 1 " + bt.Fuel.ToString(1, Lang.Ru); } s += "."; if (bt.DriveSkill != null) { s += String.Format(" Для управления требуется навык {0}.", bt.DriveSkill.ToString(Lang.Ru)); } if (bt.DriveTerrain != null) { s += " Машина может въезжать в " + bt.DriveTerrain.FullNameRu + "."; } } else { s += " Это здание."; } if (bt.Defence > 0) { s += String.Format(" Находящимися внутри считаются первые {0} персонажей.", bt.Defence); } if (bt.Radiation != 0) { s += String.Format(" Радиация внутри {0} на {1}.", bt.Radiation < 0 ? "понижена" : "повышена", Math.Abs(bt.Radiation)); } if (bt.Temperature != 0) { s += String.Format(" Объект защищает от {0}° холода.", bt.Temperature); } if (bt.HP > 0) { s += String.Format(" Объект предоставляет защиту в бою и имеет {0} хитов.", bt.HP); } if (bt.Resource != null) { s += String.Format(" Объект добавляет в ресурсы региона {0}.", bt.Resource.ToString(lng)); } string materials = bt.Materials.ToString(lng); s += String.Format(" Для завершения требуется: " + materials); if (bt.OptionalMaterials.Count > 0) { s += " Дополнительно можно установить: " + bt.OptionalMaterials.ToString(lng); } if (bt.NoBuild) { s += String.Format(" Новый объект этого типа построить невозможно."); } } Write(s); Write(""); }