Removed the crutches for unit attack bugs - we want to figure them out!

This commit is contained in:
Yair Morgenstern 2020-05-11 20:33:53 +03:00
parent 3a2b8453d5
commit 1adb19787a
2 changed files with 7 additions and 18 deletions

View file

@ -115,7 +115,7 @@ class LoadGameScreen(previousScreen:CameraStageBaseScreen) : PickerScreen() {
private fun updateLoadableGames(showAutosaves:Boolean) {
saveTable.clear()
for (save in GameSaver.getSaves().sortedByDescending { GameSaver.getSave(it).lastModified() }) {
if(save.startsWith("Autosave") && !showAutosaves) continue
if (save.startsWith("Autosave") && !showAutosaves) continue
val textButton = TextButton(save, skin)
textButton.onClick {
selectedSave = save

View file

@ -208,14 +208,9 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
else {
attackButton.onClick {
try {
Battle.moveAndAttack(attacker, attackableTile)
worldScreen.mapHolder.unitActionOverlay?.remove() // the overlay was one of attacking
worldScreen.shouldUpdate = true
}
catch (ex:Exception){
openBugReportPopup()
}
Battle.moveAndAttack(attacker, attackableTile)
worldScreen.mapHolder.unitActionOverlay?.remove() // the overlay was one of attacking
worldScreen.shouldUpdate = true
}
}
@ -285,15 +280,9 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
}
else {
attackButton.onClick {
try {
Battle.nuke(attacker, targetTile)
worldScreen.mapHolder.unitActionOverlay?.remove() // the overlay was one of attacking
worldScreen.shouldUpdate = true
}
catch (ex:Exception){
openBugReportPopup()
}
Battle.nuke(attacker, targetTile)
worldScreen.mapHolder.unitActionOverlay?.remove() // the overlay was one of attacking
worldScreen.shouldUpdate = true
}
}