mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Can no longer see other players' IDs in a multiplayer game through the new game screen
Moved the building mod check to all mods, not only ruleset mods
This commit is contained in:
@ -6,10 +6,12 @@ AI can no longer raze capital cities
|
||||
|
||||
Stats unique can no longer crash badly defined mods
|
||||
|
||||
Added mod check for unit promotions and upgrades
|
||||
Added mod check for unit promotions and upgrades, and building costs
|
||||
|
||||
"Unable to capture cities" unique prevents the unit from conquering/capturing a city - By givehub99
|
||||
|
||||
Translation updates
|
||||
|
||||
## 3.11.8
|
||||
|
||||
Improved performance, especially in the City screen
|
||||
|
@ -228,6 +228,11 @@ class Ruleset {
|
||||
}
|
||||
}
|
||||
|
||||
for(building in buildings.values){
|
||||
if (building.requiredTech == null && building.cost == 0)
|
||||
lines += "${building.name} must either have an explicit cost or reference an existing tech!"
|
||||
}
|
||||
|
||||
if (!modOptions.isBaseRuleset) return lines.joinToString("\n")
|
||||
|
||||
|
||||
@ -256,8 +261,6 @@ class Ruleset {
|
||||
lines += "${building.name} requires resource ${building.requiredResource} which does not exist!"
|
||||
if (building.replaces != null && !buildings.containsKey(building.replaces!!))
|
||||
lines += "${building.name} replaces ${building.replaces} which does not exist!"
|
||||
if (building.requiredTech == null && building.cost == 0)
|
||||
lines += "${building.name} must either have an explicit cost or reference an existing tech!"
|
||||
}
|
||||
|
||||
for (resource in tileResources.values) {
|
||||
|
@ -13,16 +13,16 @@ class MutableInt(var value: Int = 0) {
|
||||
}
|
||||
|
||||
fun formatDuration(d: Duration): String {
|
||||
var d = d
|
||||
val days = d.toDays()
|
||||
d = d.minusDays(days)
|
||||
val hours = d.toHours()
|
||||
d = d.minusHours(hours)
|
||||
val minutes = d.toMinutes()
|
||||
d = d.minusMinutes(minutes)
|
||||
val seconds = d.seconds
|
||||
d = d.minusSeconds(seconds)
|
||||
val millis = d.toMillis()
|
||||
var newDuration = d
|
||||
val days = newDuration.toDays()
|
||||
newDuration = newDuration.minusDays(days)
|
||||
val hours = newDuration.toHours()
|
||||
newDuration = newDuration.minusHours(hours)
|
||||
val minutes = newDuration.toMinutes()
|
||||
newDuration = newDuration.minusMinutes(minutes)
|
||||
val seconds = newDuration.seconds
|
||||
newDuration = newDuration.minusSeconds(seconds)
|
||||
val millis = newDuration.toMillis()
|
||||
return (if (days == 0L) "" else "$days"+"d ") +
|
||||
(if (hours == 0L) "" else "$hours"+"h ") +
|
||||
(if (minutes == 0L) "" else "$minutes"+"m ") +
|
||||
|
@ -83,10 +83,6 @@ object TranslationFileWriter {
|
||||
val existingTranslationKeys = HashSet<String>()
|
||||
|
||||
for (line in linesFromTemplates) {
|
||||
if(line.contains("G&K")) {
|
||||
val x = line.length
|
||||
}
|
||||
|
||||
if (!line.contains(" = ")) {
|
||||
// small hack to insert empty lines
|
||||
if (line.startsWith(specialNewLineCode)) {
|
||||
|
@ -18,7 +18,7 @@ class SpecialistAllocationTable(val cityScreen: CityScreen): Table(CameraStageBa
|
||||
continue
|
||||
val newSpecialists = cityInfo.population.getNewSpecialists()
|
||||
val assignedSpecialists = newSpecialists[specialistName]!!
|
||||
val maxSpecialists = cityInfo.population.getMaxSpecialists()[specialistName]!!
|
||||
val maxSpecialists = amount
|
||||
|
||||
if (cityScreen.canChangeState) add(getUnassignButton(assignedSpecialists, specialistName))
|
||||
add(getAllocationTable(assignedSpecialists, maxSpecialists, specialistName)).pad(10f)
|
||||
|
@ -44,6 +44,9 @@ class PlayerPickerTable(val previousScreen: IPreviousScreen, var gameParameters:
|
||||
var noRandom = false
|
||||
|
||||
init {
|
||||
for (player in gameParameters.players)
|
||||
player.playerId = "" // This is to stop people from getting other users' IDs and cheating with them in multiplayer games
|
||||
|
||||
top()
|
||||
add("Civilizations".toLabel(fontSize = 24)).padBottom(20f).row()
|
||||
add(ScrollPane(playerListTable).apply { setOverscroll(false, false) }).width(civBlocksWidth)
|
||||
|
Reference in New Issue
Block a user