Add specialist slot tooltip for buildings that provide them (#1776)

* Add specialist slot tooltip for buildings that provide them
 - #1762

* Remove duplicate translations
This commit is contained in:
Teague Lander 2020-01-26 22:33:10 -08:00 committed by Yair Morgenstern
parent d3d8933bbf
commit ac8a1f144b
3 changed files with 21 additions and 2 deletions

View file

@ -1498,7 +1498,12 @@ Specialist Buildings =
# Requires translation!
Specialist Allocation =
# Requires translation!
Specialists =
Specialists =
[specialist] slots = [specialist] slots
Engineer specialist = Engineer specialist
Merchant specialist = Merchant specialist
Scientist specialist = Scientist specialist
Artist specialist = Artist specialist
# Requires translation!
Food eaten =
# Requires translation!

View file

@ -821,7 +821,12 @@ Nothing =
Annex city =
Specialist Buildings =
Specialist Allocation =
Specialists =
Specialists =
[specialist] slots =
Engineer specialist =
Merchant specialist =
Scientist specialist =
Artist specialist =
Food eaten =
Growth bonus =
Unassigned population =

View file

@ -102,6 +102,15 @@ class Building : NamedStats(), IConstruction{
if (gpp.science != 0f) stringBuilder.appendln("+" + gpp.science.toInt() + " "+"[Great Scientist] points".tr())
if (gpp.culture != 0f) stringBuilder.appendln("+" + gpp.culture.toInt() + " "+"[Great Artist] points".tr())
}
if (this.specialistSlots != null) {
val ss = this.specialistSlots!!
if (ss.production != 0f) stringBuilder.appendln("+" + ss.production.toInt() + " " + "[Engineer specialist] slots".tr())
if (ss.gold != 0f) stringBuilder.appendln("+" + ss.gold .toInt() + " " + "[Merchant specialist] slots".tr())
if (ss.science != 0f) stringBuilder.appendln("+" + ss.science .toInt() + " " + "[Scientist specialist] slots".tr())
if (ss.culture != 0f) stringBuilder.appendln("+" + ss.culture .toInt() + " " + "[Artist specialist] slots".tr())
}
if (resourceBonusStats != null) {
val resources = ruleset.tileResources.values.filter { name == it.building }.joinToString { it.name.tr() }
stringBuilder.appendln("$resources {provide} $resourceBonusStats".tr())