Resolved #1177 - Great Improvements now provide Strategic resources

APK no longer bundles maps in assets
This commit is contained in:
Yair Morgenstern 2019-10-10 14:48:09 +03:00
parent bde11941c5
commit 8d58702d80
3 changed files with 16 additions and 12 deletions

View file

@ -41,7 +41,7 @@ android {
release {
// Don't add local save files and fonts to release, obviously
aaptOptions {
ignoreAssetsPattern "!SaveFiles:!fonts"
ignoreAssetsPattern "!SaveFiles:!fonts:!maps"
}
minifyEnabled false
@ -51,7 +51,7 @@ android {
debug {
// Don't add local save files and fonts to release, obviously
aaptOptions {
ignoreAssetsPattern "!SaveFiles:!fonts"
ignoreAssetsPattern "!SaveFiles:!fonts:!maps"
}
}
}

View file

@ -126,7 +126,9 @@ class CityInfo {
for (tileInfo in getTiles().filter { it.resource != null }) {
val resource = tileInfo.getTileResource()
if(resource.revealedBy!=null && !civInfo.tech.isResearched(resource.revealedBy!!)) continue
if (resource.improvement == tileInfo.improvement || tileInfo.isCityCenter()){
if (resource.improvement == tileInfo.improvement || tileInfo.isCityCenter()
// Per https://gaming.stackexchange.com/questions/53155/do-manufactories-and-customs-houses-sacrifice-the-strategic-or-luxury-resources
|| (resource.resourceType==ResourceType.Strategic && tileInfo.containsGreatImprovement())){
var amountToAdd = 1
if(resource.resourceType == ResourceType.Strategic){
amountToAdd = 2

View file

@ -10,7 +10,7 @@ import com.badlogic.gdx.utils.Align
import com.unciv.models.gamebasics.tr
import com.unciv.ui.utils.*
open class PopupTable(val screen: CameraStageBaseScreen): Table(CameraStageBaseScreen.skin){
open class PopupTable(val screen: CameraStageBaseScreen): Table(CameraStageBaseScreen.skin) {
init {
val tileTableBackground = ImageGetter.getBackground(ImageGetter.getBlue().lerp(Color.BLACK, 0.5f))
background = tileTableBackground
@ -19,35 +19,37 @@ open class PopupTable(val screen: CameraStageBaseScreen): Table(CameraStageBaseS
this.defaults().pad(5f)
}
fun open(){
fun open() {
pack()
center(screen.stage)
screen.stage.addActor(this)
}
open fun close(){ remove() }
open fun close() {
remove()
}
fun addGoodSizedLabel(text: String): Cell<Label> {
val label = text.toLabel()
label.setWrap(true)
label.setAlignment(Align.center)
return add(label).width(screen.stage.width/2)
return add(label).width(screen.stage.width / 2)
}
fun addButton(text:String, action:()->Unit): Cell<TextButton> {
val button = TextButton(text.tr(), skin).apply { color= ImageGetter.getBlue() }
fun addButton(text: String, action: () -> Unit): Cell<TextButton> {
val button = TextButton(text.tr(), skin).apply { color = ImageGetter.getBlue() }
button.onClick(action)
return add(button).apply { row() }
}
fun addSquareButton(text:String, action:()->Unit): Cell<Table> {
fun addSquareButton(text: String, action: () -> Unit): Cell<Table> {
val button = Table()
button.add(text.toLabel())
button.onClick(action)
button.touchable=Touchable.enabled
button.touchable = Touchable.enabled
return add(button).apply { row() }
}
fun addCloseButton() = addButton("Close"){close()}
fun addCloseButton() = addButton("Close") { close() }
}