Added Water Mill building

This commit is contained in:
Yair Morgenstern
2020-07-13 22:42:30 +03:00
parent 0c7d4b296a
commit e179f1a472
6 changed files with 444 additions and 425 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

After

Width:  |  Height:  |  Size: 468 KiB

View File

@ -78,6 +78,15 @@
"hurryCostModifier": 25, "hurryCostModifier": 25,
"requiredTech": "Trapping" "requiredTech": "Trapping"
}, },
{
"name": "Water Mill",
"maintenance": 2,
"food": 2,
"production": 1,
"hurryCostModifier": 25,
"uniques": ["Must be next to river"],
"requiredTech": "The Wheel"
},
/* /*
{ {

View File

@ -248,6 +248,9 @@ class Building : NamedStats(), IConstruction{
&& !cityCenter.neighbors.any { it.baseTerrain == Constants.mountain }) && !cityCenter.neighbors.any { it.baseTerrain == Constants.mountain })
return "Must be next to mountain" return "Must be next to mountain"
if("Must be next to river" in uniques && !cityCenter.isAdjacentToRiver())
return "Must be next to river"
if("Must have an owned mountain within 2 tiles" in uniques if("Must have an owned mountain within 2 tiles" in uniques
&& !cityCenter.getTilesInDistance(2) && !cityCenter.getTilesInDistance(2)
.any { it.baseTerrain==Constants.mountain && it.getOwner()==construction.cityInfo.civInfo }) .any { it.baseTerrain==Constants.mountain && it.getOwner()==construction.cityInfo.civInfo })

View File

@ -94,11 +94,11 @@ class NewGameScreen(previousScreen:CameraStageBaseScreen, _gameSetupInfo: GameSe
OnlineMultiplayer().tryUploadGame(newGame!!) OnlineMultiplayer().tryUploadGame(newGame!!)
GameSaver.autoSave(newGame!!) {} GameSaver.autoSave(newGame!!) {}
//Saved as Multiplayer game to show up in the session browser // Saved as Multiplayer game to show up in the session browser
GameSaver.saveGame(newGame!!, newGame!!.gameId, true) GameSaver.saveGame(newGame!!, newGame!!.gameId, true)
//Save gameId to clipboard because you have to do it anyway. // Save gameId to clipboard because you have to do it anyway.
Gdx.app.clipboard.contents = newGame!!.gameId Gdx.app.clipboard.contents = newGame!!.gameId
//Popup to notify the User that the gameID got copied to the clipboard // Popup to notify the User that the gameID got copied to the clipboard
Gdx.app.postRunnable { ResponsePopup("gameID copied to clipboard".tr(), UncivGame.Current.worldScreen, 2500) } Gdx.app.postRunnable { ResponsePopup("gameID copied to clipboard".tr(), UncivGame.Current.worldScreen, 2500) }
} catch (ex: Exception) { } catch (ex: Exception) {
Gdx.app.postRunnable { Gdx.app.postRunnable {