mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Lint
This commit is contained in:
parent
9533a35d15
commit
313f55171c
@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import com.unciv.logic.map.TileMap
|
||||
import com.unciv.ui.saves.Gzip
|
||||
|
||||
class MapSaver(){
|
||||
class MapSaver {
|
||||
fun json() = GameSaver().json()
|
||||
private val mapsFolder = "maps"
|
||||
|
||||
|
@ -29,7 +29,7 @@ class BFS(val startingPoint: TileInfo, val predicate : (TileInfo) -> Boolean){
|
||||
for(tileInfo in tilesToCheck){
|
||||
for(neighbor in tileInfo.neighbors){
|
||||
if(predicate(neighbor) && !tilesReached.containsKey(neighbor)){
|
||||
tilesReached[neighbor] = tileInfo;
|
||||
tilesReached[neighbor] = tileInfo
|
||||
newTilesToCheck.add(neighbor)
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class MapType {
|
||||
}
|
||||
}
|
||||
|
||||
class MapGenerator() {
|
||||
class MapGenerator {
|
||||
|
||||
fun generateMap(gameParameters: GameParameters): TileMap {
|
||||
val mapRadius = gameParameters.mapRadius
|
||||
@ -269,7 +269,7 @@ class MapGenerator() {
|
||||
}
|
||||
}
|
||||
|
||||
class MapLandmassGenerator(){
|
||||
class MapLandmassGenerator {
|
||||
|
||||
fun generateLandCellularAutomata(tileMap: TileMap, mapRadius: Int, mapType: String) {
|
||||
|
||||
|
@ -17,7 +17,7 @@ class GameParameters { // Default values are the default new game
|
||||
var mapType = MapType.pangaea
|
||||
var noBarbarians = false
|
||||
var oneCityChallenge = false
|
||||
var noRuins = false;
|
||||
var noRuins = false
|
||||
var mapFileName: String? = null
|
||||
var victoryTypes: ArrayList<VictoryType> = VictoryType.values().toCollection(ArrayList()) // By default, all victory types
|
||||
var startingEra = TechEra.Ancient
|
||||
|
@ -55,7 +55,7 @@ class CityScreenCityPickerTable(val cityScreen: CityScreen) : Table(){
|
||||
currentCityLabel.onClick {
|
||||
val editCityNamePopup = PopupTable(cityScreen)
|
||||
val textArea = TextField(city.name, CameraStageBaseScreen.skin)
|
||||
textArea.setAlignment(Align.center)
|
||||
textArea.alignment = Align.center
|
||||
editCityNamePopup.add(textArea).colspan(2).row()
|
||||
editCityNamePopup.addCloseButton()
|
||||
editCityNamePopup.addButton("Save".tr()){
|
||||
|
@ -101,7 +101,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
||||
|
||||
if (city.isPuppet) {
|
||||
val puppetImage = ImageGetter.getImage("OtherIcons/Puppet")
|
||||
puppetImage.setColor(secondaryColor)
|
||||
puppetImage.color = secondaryColor
|
||||
iconTable.add(puppetImage).size(20f).pad(2f).padLeft(5f)
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ class DiplomacyScreen(val viewingCiv:CivilizationInfo):CameraStageBaseScreen() {
|
||||
val ally = otherCiv.getAllyCiv()
|
||||
if (ally != "")
|
||||
{
|
||||
diplomacyTable.add(("Ally: ".tr() + ally!!.tr() + " " + "Influence: ".tr()
|
||||
diplomacyTable.add(("Ally: ".tr() + ally.tr() + " " + "Influence: ".tr()
|
||||
+ otherCiv.getDiplomacyManager(ally).influence.toString().tr()).toLabel()).row()
|
||||
}
|
||||
val nextLevelString: String
|
||||
|
@ -11,7 +11,7 @@ import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
class DropBox(){
|
||||
class DropBox {
|
||||
|
||||
fun dropboxApi(url:String, data:String="",contentType:String="",dropboxApiArg:String=""): InputStream? {
|
||||
|
||||
@ -84,7 +84,7 @@ class DropBox(){
|
||||
|
||||
}
|
||||
|
||||
class OnlineMultiplayer(){
|
||||
class OnlineMultiplayer {
|
||||
fun getGameLocation(gameId:String) = "/MultiplayerGames/$gameId"
|
||||
|
||||
fun tryUploadGame(gameInfo: GameInfo){
|
||||
|
@ -16,7 +16,7 @@ import kotlin.concurrent.thread
|
||||
class Language(val language:String){
|
||||
val percentComplete:Int
|
||||
init{
|
||||
val availableTranslations = GameBasics.Translations.count() { it.value.containsKey(language) }
|
||||
val availableTranslations = GameBasics.Translations.count { it.value.containsKey(language) }
|
||||
if(language=="English") percentComplete = 100
|
||||
else percentComplete = (availableTranslations*100 / GameBasics.Translations.size)
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class NativeFont extends BitmapFont {
|
||||
EmojiDate date = this.emojiSet.get(css);
|
||||
appendEmoji(c2 + "", date.path, date.size);
|
||||
} else {
|
||||
putGlyph(c2, this.listener.getFontPixmap(txt, this.paint));
|
||||
putGlyph(c2, listener.getFontPixmap(txt, this.paint));
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ public class NativeFont extends BitmapFont {
|
||||
|
||||
for (Glyph glyph : page) {
|
||||
if (glyph != null) {
|
||||
TextureRegion region = (TextureRegion) getRegions().get(glyph.page);
|
||||
TextureRegion region = getRegions().get(glyph.page);
|
||||
if (region == null) {
|
||||
throw new IllegalArgumentException("BitmapFont texture region array cannot contain null elements.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user