Added icon for lakes
Added more sound effects Added Leaning Tower of Pisa
This commit is contained in:
parent
3edc95dd3e
commit
94fd43f422
18 changed files with 423 additions and 393 deletions
|
@ -373,6 +373,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
||||||
* [Palm Tree](https://thenounproject.com/search/?q=palm%20tree&i=366833) By Tatiana for Oasis
|
* [Palm Tree](https://thenounproject.com/search/?q=palm%20tree&i=366833) By Tatiana for Oasis
|
||||||
* [Water](https://thenounproject.com/term/water/1762848/) By Kozan for Marsh
|
* [Water](https://thenounproject.com/term/water/1762848/) By Kozan for Marsh
|
||||||
* [Harvest](https://thenounproject.com/term/harvest/1022373/) By Made for Flood plains
|
* [Harvest](https://thenounproject.com/term/harvest/1022373/) By Made for Flood plains
|
||||||
|
* [Puddle](https://thenounproject.com/search/?q=puddle&i=1138155) By Bakunetsu Kaito for Lakes
|
||||||
|
|
||||||
## Others
|
## Others
|
||||||
|
|
||||||
|
@ -398,7 +399,10 @@ Sounds are from FreeSound.org and are either Creative Commons or Public Domain
|
||||||
* [Pencil1](https://freesound.org/people/stijn/sounds/43673/) By stijn as 'paper' for opening and closing the tech picker
|
* [Pencil1](https://freesound.org/people/stijn/sounds/43673/) By stijn as 'paper' for opening and closing the tech picker
|
||||||
* [SawInOut01](https://freesound.org/people/kingof_thelab/sounds/340243/) By kingof_thelab for construction picking?
|
* [SawInOut01](https://freesound.org/people/kingof_thelab/sounds/340243/) By kingof_thelab for construction picking?
|
||||||
* [Chain Snare #1](https://freesound.org/people/lovesbody/sounds/322079/) By lovesbody as 'fortify'
|
* [Chain Snare #1](https://freesound.org/people/lovesbody/sounds/322079/) By lovesbody as 'fortify'
|
||||||
* [Level up](https://freesound.org/people/Marregheriti/sounds/266100/) By Marregheriti as 'promote' for Promote action and upgrading units
|
* [Level up](https://freesound.org/people/Marregheriti/sounds/266100/) By Marregheriti as 'upgrade' for upgrading units
|
||||||
* [levelup](https://freesound.org/people/Seidhepriest/sounds/382915/) By Seidhepriest as 'chimes' for special actions (free tech, build city, hurry wonder etc.)
|
* [levelup](https://freesound.org/people/Seidhepriest/sounds/382915/) By Seidhepriest as 'chimes' for special actions (free tech, build city, hurry wonder etc.)
|
||||||
* [Coin](https://freesound.org/people/TheDJoe93/sounds/97373/) By TheDJoe93 as 'coin' for purchasing tiles and constructions
|
* [Coin](https://freesound.org/people/TheDJoe93/sounds/97373/) By TheDJoe93 as 'coin' for purchasing tiles and constructions
|
||||||
* [fast simple chop 1](https://freesound.org/people/dave.des/sounds/127196/) By dave.dev as 'whoosh' for moving units around
|
* [fast simple chop 1](https://freesound.org/people/dave.des/sounds/127196/) By dave.dev as 'whoosh' for moving units around
|
||||||
|
* [Military kick](https://freesound.org/people/Dodgy%20C/sounds/72070/) By Dodgy C as 'promote' for unit promotions
|
||||||
|
* [Tank reload](https://freesound.org/people/KieranKeegan/sounds/418882/) By KieranKeegan as 'setup' for siege unit setup
|
||||||
|
* [Scribble_short](https://freesound.org/people/waldram/sounds/257518/) By waldram as 'policy' for adopting policies
|
BIN
android/Images/BuildingIcons/Leaning Tower of Pisa.png
Normal file
BIN
android/Images/BuildingIcons/Leaning Tower of Pisa.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
BIN
android/Images/TerrainIcons/Lakes.png
Normal file
BIN
android/Images/TerrainIcons/Lakes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 825 KiB After Width: | Height: | Size: 832 KiB |
|
@ -104,7 +104,7 @@
|
||||||
xpForNewUnits:15,
|
xpForNewUnits:15,
|
||||||
hurryCostModifier:25,
|
hurryCostModifier:25,
|
||||||
maintenance:1,
|
maintenance:1,
|
||||||
uniques:["Culture and Gold costs of acquiring new tiles reduced by 25% in this city"] // todo implement
|
uniques:["Culture and Gold costs of acquiring new tiles reduced by 25% in this city"]
|
||||||
requiredTech:"Bronze Working"
|
requiredTech:"Bronze Working"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -403,6 +403,13 @@
|
||||||
requiredBuilding:"Colloseum",
|
requiredBuilding:"Colloseum",
|
||||||
requiredTech:"Printing Press"
|
requiredTech:"Printing Press"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name:"Leaning Tower of Pisa",
|
||||||
|
culture:1,
|
||||||
|
isWonder:true,
|
||||||
|
uniques:["Free Great Person"]
|
||||||
|
requiredTech:"Printing Press"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"Museum",
|
name:"Museum",
|
||||||
culture:5,
|
culture:5,
|
||||||
|
|
BIN
android/assets/sounds/choir.mp3
Normal file
BIN
android/assets/sounds/choir.mp3
Normal file
Binary file not shown.
BIN
android/assets/sounds/policy.mp3
Normal file
BIN
android/assets/sounds/policy.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
android/assets/sounds/setup.mp3
Normal file
BIN
android/assets/sounds/setup.mp3
Normal file
Binary file not shown.
BIN
android/assets/sounds/upgrade.mp3
Normal file
BIN
android/assets/sounds/upgrade.mp3
Normal file
Binary file not shown.
|
@ -9,7 +9,7 @@ class GameSettings {
|
||||||
var resolution: String = "1050x700"
|
var resolution: String = "1050x700"
|
||||||
var tutorialsShown = ArrayList<String>()
|
var tutorialsShown = ArrayList<String>()
|
||||||
var hasCrashedRecently = false
|
var hasCrashedRecently = false
|
||||||
var soundEffectsVolume = 1.0f
|
var soundEffectsVolume = 0.5f
|
||||||
|
|
||||||
fun save(){
|
fun save(){
|
||||||
GameSaver().setGeneralSettings(this)
|
GameSaver().setGeneralSettings(this)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class UnCivGame : Game() {
|
||||||
val viewEntireMapForDebug = false
|
val viewEntireMapForDebug = false
|
||||||
|
|
||||||
// For when you need to test something in an advanced game and don't have time to faff around
|
// For when you need to test something in an advanced game and don't have time to faff around
|
||||||
val superchargedForDebug = false
|
val superchargedForDebug = true
|
||||||
|
|
||||||
lateinit var worldScreen: WorldScreen
|
lateinit var worldScreen: WorldScreen
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.unciv.logic.city.IConstruction
|
||||||
import com.unciv.models.gamebasics.tech.Technology
|
import com.unciv.models.gamebasics.tech.Technology
|
||||||
import com.unciv.models.stats.NamedStats
|
import com.unciv.models.stats.NamedStats
|
||||||
import com.unciv.models.stats.Stats
|
import com.unciv.models.stats.Stats
|
||||||
|
import com.unciv.ui.utils.getRandom
|
||||||
|
|
||||||
class Building : NamedStats(), IConstruction{
|
class Building : NamedStats(), IConstruction{
|
||||||
override val description: String
|
override val description: String
|
||||||
|
@ -234,15 +235,17 @@ class Building : NamedStats(), IConstruction{
|
||||||
}
|
}
|
||||||
|
|
||||||
when {
|
when {
|
||||||
"Empire enters golden age" in uniques-> civInfo.goldenAges.enterGoldenAge()
|
"Empire enters golden age" in uniques -> civInfo.goldenAges.enterGoldenAge()
|
||||||
"Free Great Artist Appears" in uniques-> civInfo.addGreatPerson("Great Artist")
|
"Free Great Artist Appears" in uniques -> civInfo.addGreatPerson("Great Artist")
|
||||||
"Free great scientist appears" in uniques -> civInfo.addGreatPerson("Great Scientist")
|
"Free great scientist appears" in uniques -> civInfo.addGreatPerson("Great Scientist")
|
||||||
"Provides 2 free workers" in uniques -> {
|
"Provides 2 free workers" in uniques -> {
|
||||||
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
||||||
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
||||||
}
|
}
|
||||||
"Free Social Policy" in uniques -> {
|
"Free Social Policy" in uniques -> civInfo.policies.freePolicies++
|
||||||
civInfo.policies.freePolicies++
|
"Free Great Person" in uniques -> {
|
||||||
|
if (civInfo.isPlayerCivilization()) civInfo.greatPeople.freeGreatPeople++
|
||||||
|
else civInfo.addGreatPerson(GameBasics.Units.keys.filter { it.startsWith("Great") }.getRandom())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class GreatPersonPickerScreen : PickerScreen() {
|
||||||
topTable.add(button).pad(10f)
|
topTable.add(button).pad(10f)
|
||||||
}
|
}
|
||||||
|
|
||||||
rightSideButton.onClick {
|
rightSideButton.onClick("choir") {
|
||||||
val civInfo = UnCivGame.Current.gameInfo.getPlayerCivilization()
|
val civInfo = UnCivGame.Current.gameInfo.getPlayerCivilization()
|
||||||
civInfo.placeUnitNearTile(civInfo.cities[0].location, theChosenOne!!.name)
|
civInfo.placeUnitNearTile(civInfo.cities[0].location, theChosenOne!!.name)
|
||||||
civInfo.greatPeople.freeGreatPeople--
|
civInfo.greatPeople.freeGreatPeople--
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PolicyPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen(
|
||||||
}
|
}
|
||||||
else onBackButtonClicked { UnCivGame.Current.setWorldScreen(); dispose() }
|
else onBackButtonClicked { UnCivGame.Current.setWorldScreen(); dispose() }
|
||||||
|
|
||||||
rightSideButton.onClick {
|
rightSideButton.onClick("policy") {
|
||||||
civInfo.policies.adopt(pickedPolicy!!)
|
civInfo.policies.adopt(pickedPolicy!!)
|
||||||
|
|
||||||
// If we've moved to another screen in the meantime (great person pick, victory screen) ignore this
|
// If we've moved to another screen in the meantime (great person pick, victory screen) ignore this
|
||||||
|
|
|
@ -111,7 +111,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
||||||
|
|
||||||
private fun queueAddMoveHereButton(selectedUnit: MapUnit, tileInfo: TileInfo) {
|
private fun queueAddMoveHereButton(selectedUnit: MapUnit, tileInfo: TileInfo) {
|
||||||
thread {
|
thread {
|
||||||
/** LibGdx sometimes has these wierd errors when you try to edit the UI layout from 2 separate thread.
|
/** LibGdx sometimes has these weird errors when you try to edit the UI layout from 2 separate thread.
|
||||||
* And so, all UI editing will be done on the main thread.
|
* And so, all UI editing will be done on the main thread.
|
||||||
* The only "heavy lifting" that needs to be done is getting the turns to get there,
|
* The only "heavy lifting" that needs to be done is getting the turns to get there,
|
||||||
* so that and that alone will be relegated to the concurrent thread.
|
* so that and that alone will be relegated to the concurrent thread.
|
||||||
|
@ -140,30 +140,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
||||||
moveHereButton.addActor(unitIcon)
|
moveHereButton.addActor(unitIcon)
|
||||||
|
|
||||||
if (dto.unit.currentMovement > 0)
|
if (dto.unit.currentMovement > 0)
|
||||||
moveHereButton.onClick("") {
|
moveHereButton.onClick(""){onMoveButtonClick(dto)}
|
||||||
// this can take a long time, because of the unit-to-tile calculation needed, so we put it in a different thread
|
|
||||||
kotlin.concurrent.thread {
|
|
||||||
if (dto.unit.movementAlgs().canReach(dto.tileInfo)) {
|
|
||||||
try {
|
|
||||||
// Because this is darned concurrent (as it MUST be to avoid ANRs),
|
|
||||||
// there are edge cases where the canReach is true,
|
|
||||||
// but until it reaches the headTowards the board has changed and so the headTowards fails.
|
|
||||||
// I can't think of any way to avoid this,
|
|
||||||
// but it's so rare and edge-case-y that ignoring its failure is actually acceptable, hence the empty catch
|
|
||||||
dto.unit.movementAlgs().headTowards(dto.tileInfo)
|
|
||||||
Sounds.play("whoosh")
|
|
||||||
if (dto.unit.currentTile != dto.tileInfo)
|
|
||||||
dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt()
|
|
||||||
}
|
|
||||||
catch (e:Exception){}
|
|
||||||
}
|
|
||||||
|
|
||||||
// we don't update it directly because we're on a different thread; instead, we tell it to update itself
|
|
||||||
worldScreen.shouldUpdate = true
|
|
||||||
moveToOverlay?.remove()
|
|
||||||
moveToOverlay = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else moveHereButton.color.a = 0.5f
|
else moveHereButton.color.a = 0.5f
|
||||||
addOverlayOnTileGroup(tileGroup, moveHereButton).apply { width = size; height = size }
|
addOverlayOnTileGroup(tileGroup, moveHereButton).apply { width = size; height = size }
|
||||||
|
@ -171,6 +148,31 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
||||||
moveToOverlay = moveHereButton
|
moveToOverlay = moveHereButton
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun onMoveButtonClick(dto: MoveHereButtonDto) {
|
||||||
|
// this can take a long time, because of the unit-to-tile calculation needed, so we put it in a different thread
|
||||||
|
thread {
|
||||||
|
if (dto.unit.movementAlgs().canReach(dto.tileInfo)) {
|
||||||
|
try {
|
||||||
|
// Because this is darned concurrent (as it MUST be to avoid ANRs),
|
||||||
|
// there are edge cases where the canReach is true,
|
||||||
|
// but until it reaches the headTowards the board has changed and so the headTowards fails.
|
||||||
|
// I can't think of any way to avoid this,
|
||||||
|
// but it's so rare and edge-case-y that ignoring its failure is actually acceptable, hence the empty catch
|
||||||
|
dto.unit.movementAlgs().headTowards(dto.tileInfo)
|
||||||
|
Sounds.play("whoosh")
|
||||||
|
if (dto.unit.currentTile != dto.tileInfo)
|
||||||
|
dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// we don't update it directly because we're on a different thread; instead, we tell it to update itself
|
||||||
|
worldScreen.shouldUpdate = true
|
||||||
|
moveToOverlay?.remove()
|
||||||
|
moveToOverlay = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun addOverlayOnTileGroup(group:WorldTileGroup, actor: Actor) {
|
private fun addOverlayOnTileGroup(group:WorldTileGroup, actor: Actor) {
|
||||||
actor.center(group)
|
actor.center(group)
|
||||||
actor.x+=group.x
|
actor.x+=group.x
|
||||||
|
|
|
@ -91,13 +91,13 @@ class UnitActions {
|
||||||
newunit.promotions = unit.promotions
|
newunit.promotions = unit.promotions
|
||||||
newunit.updateUniques()
|
newunit.updateUniques()
|
||||||
newunit.currentMovement = 0f
|
newunit.currentMovement = 0f
|
||||||
}.sound("promote")
|
}.sound("upgrade")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit.hasUnique("Must set up to ranged attack") && unit.action != "Set Up" && !unit.isEmbarked())
|
if(unit.hasUnique("Must set up to ranged attack") && unit.action != "Set Up" && !unit.isEmbarked())
|
||||||
actionList+=UnitAction("Set up",unit.currentMovement != 0f)
|
actionList+=UnitAction("Set up",unit.currentMovement != 0f)
|
||||||
{unit.action="Set Up"; unit.currentMovement = max(0f, unit.currentMovement-1)}
|
{unit.action="Set Up"; unit.currentMovement = max(0f, unit.currentMovement-1)}.sound("setup")
|
||||||
|
|
||||||
if (unit.hasUnique("Founds a new city") && !unit.isEmbarked()) {
|
if (unit.hasUnique("Founds a new city") && !unit.isEmbarked()) {
|
||||||
actionList += UnitAction("Found city",
|
actionList += UnitAction("Found city",
|
||||||
|
|
Loading…
Reference in a new issue