mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 00:39:56 +07:00
Added techs and buildings up to industral era
Added option to remove jungles, forests and marshes
This commit is contained in:
@ -174,6 +174,7 @@
|
|||||||
maintainance:2,
|
maintainance:2,
|
||||||
percentStatBonus:{science:33},
|
percentStatBonus:{science:33},
|
||||||
requiredBuilding:"Library",
|
requiredBuilding:"Library",
|
||||||
|
unique:"JunglesProvideScience",
|
||||||
requiredTech:"Metal Casting"
|
requiredTech:"Metal Casting"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -194,6 +195,99 @@
|
|||||||
isWonder:true,
|
isWonder:true,
|
||||||
unique:"NewTileCostReduction",
|
unique:"NewTileCostReduction",
|
||||||
requiredTech:"Education"
|
requiredTech:"Education"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
name:"Ironworks",
|
||||||
|
description: "",
|
||||||
|
production:8,
|
||||||
|
culture:1,
|
||||||
|
isWonder:true,
|
||||||
|
requiredBuildingInAllCities:"Workshop",
|
||||||
|
requiredTech:"Machinery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Observatory",
|
||||||
|
description: "City must be bordering a mountain",
|
||||||
|
maintainance:2,
|
||||||
|
percentStatBonus:{science:50},
|
||||||
|
requiredBuilding:"Library",
|
||||||
|
requiredTech:"Metal Casting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Opera House",
|
||||||
|
description: "",
|
||||||
|
culture:4,
|
||||||
|
requiredBuilding:"Temple",
|
||||||
|
maintainance:2,
|
||||||
|
requiredTech:"Acoustics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Sistine Chapel",
|
||||||
|
description: "Culture in all cities increased by 25%",
|
||||||
|
culture:1,
|
||||||
|
isWonder:true,
|
||||||
|
unique:"CultureIncrease",
|
||||||
|
requiredTech:"Acoustics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Bank",
|
||||||
|
description: "",
|
||||||
|
gold:2,
|
||||||
|
percentStatBonus:{gold:25},
|
||||||
|
requiredBuilding:"Market",
|
||||||
|
requiredTech:"Banking"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Theatre",
|
||||||
|
description: "",
|
||||||
|
happiness:3,
|
||||||
|
maintainance:2,
|
||||||
|
requiredBuilding:"Colloseum",
|
||||||
|
requiredTech:"Banking"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Taj Mahal",
|
||||||
|
description: "Empire enters a golden age",
|
||||||
|
culture:1,
|
||||||
|
happiness:4,
|
||||||
|
isWonder:true,
|
||||||
|
unique:"EmpireEntersGoldenAge",
|
||||||
|
requiredTech:"Acoustics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Windmill",
|
||||||
|
description: "",
|
||||||
|
production:2,
|
||||||
|
maintainance:2,
|
||||||
|
percentStatBonus:{production:10},
|
||||||
|
requiredTech:"Economics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Museum",
|
||||||
|
description: "",
|
||||||
|
culture:5,
|
||||||
|
requiredBuilding:"Opera House",
|
||||||
|
maintainance:3,
|
||||||
|
requiredTech:"Archaeology"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Hermitage",
|
||||||
|
description: "",
|
||||||
|
percentStatBonus:{culture:50},
|
||||||
|
culture:5,
|
||||||
|
isWonder:true,
|
||||||
|
requiredBuildingInAllCities:"Opera House",
|
||||||
|
requiredTech:"Archaeology"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"The Louvre",
|
||||||
|
description: "Free Great Artist appears near the city - TODO",
|
||||||
|
culture:1,
|
||||||
|
happiness:4,
|
||||||
|
isWonder:true,
|
||||||
|
unique:"FreeGreatArtistAppears",
|
||||||
|
requiredTech:"Archaeology"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
@ -32,7 +32,7 @@
|
|||||||
name:"Sailing",
|
name:"Sailing",
|
||||||
row:1,
|
row:1,
|
||||||
prerequisites:["Pottery"],
|
prerequisites:["Pottery"],
|
||||||
description:"Allows access to sea resources by building work boats"
|
description:"Does nothing since we have no sea tiles - In theory, Allows access to sea resources by building work boats"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Calendar",
|
name:"Calendar",
|
||||||
@ -83,7 +83,7 @@
|
|||||||
cost:95,
|
cost:95,
|
||||||
row:1,
|
row:1,
|
||||||
prerequisites:["Sailing"],
|
prerequisites:["Sailing"],
|
||||||
description:"Allows construction of lighthouses, providing more food for sea tiles"
|
description:"Does nothing since we have no sea tiles - In theory, Allows construction of lighthouses, providing more food for sea tiles"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Philosophy",
|
name:"Philosophy",
|
||||||
@ -127,7 +127,7 @@
|
|||||||
name:"Theology",
|
name:"Theology",
|
||||||
row:2,
|
row:2,
|
||||||
prerequisites:["Calendar","Philosophy"],
|
prerequisites:["Calendar","Philosophy"],
|
||||||
description:"???"
|
description:"Unclear what this does in Vanilla civ"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Civil Service",
|
name:"Civil Service",
|
||||||
@ -166,7 +166,7 @@
|
|||||||
row:1,
|
row:1,
|
||||||
cost:415,
|
cost:415,
|
||||||
prerequisites:["Optics"],
|
prerequisites:["Optics"],
|
||||||
description:"???"
|
description:"Does nothing since we have no sea tiles - In theory, allows construction of harbors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Education",
|
name:"Education",
|
||||||
@ -184,19 +184,19 @@
|
|||||||
name:"Machinery",
|
name:"Machinery",
|
||||||
row:8,
|
row:8,
|
||||||
prerequisites:["Engineering"],
|
prerequisites:["Engineering"],
|
||||||
description:"???"
|
description:"Speeds movement speed on roads and allows you to construct the Ironworks wonder, which gives a massive boost in production"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Physics",
|
name:"Physics",
|
||||||
row:9,
|
row:9,
|
||||||
prerequisites:["Engineering","Metal Casting"],
|
prerequisites:["Engineering","Metal Casting"],
|
||||||
description:"???"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Steel",
|
name:"Steel",
|
||||||
row:10,
|
row:10,
|
||||||
prerequisites:["Metal Casting"],
|
prerequisites:["Metal Casting"],
|
||||||
description:"???"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -210,31 +210,31 @@
|
|||||||
name:"Astronomy",
|
name:"Astronomy",
|
||||||
row:2,
|
row:2,
|
||||||
prerequisites:["Compass","Education"],
|
prerequisites:["Compass","Education"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Enables construction of Observatories in cities near mountains"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Acoustics",
|
name:"Acoustics",
|
||||||
row:4,
|
row:4,
|
||||||
prerequisites:["Education","Chivalry"],
|
prerequisites:["Education","Chivalry"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Enables construction of Opera Houses and the Sistine Chapel, providing culture"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Banking",
|
name:"Banking",
|
||||||
row:6,
|
row:6,
|
||||||
prerequisites:["Chivalry"],
|
prerequisites:["Chivalry"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Enables construction of banks, giving a serious boost in gold to your empire"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Printing Press",
|
name:"Printing Press",
|
||||||
row:8,
|
row:8,
|
||||||
prerequisites:["Machinery","Physics"],
|
prerequisites:["Machinery","Physics"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Eables construction of the Theatre and Taj Mahal, increasing happiness"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Gunpowder",
|
name:"Gunpowder",
|
||||||
row:10,
|
row:10,
|
||||||
prerequisites:["Physics","Steel"],
|
prerequisites:["Physics","Steel"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -248,25 +248,25 @@
|
|||||||
name:"Navigation",
|
name:"Navigation",
|
||||||
row:2,
|
row:2,
|
||||||
prerequisites:["Astronomy"],
|
prerequisites:["Astronomy"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Does nothing since we have no sea tiles - In theory, allows construction of Frigates and Seaports"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Economics",
|
name:"Economics",
|
||||||
row:6,
|
row:6,
|
||||||
prerequisites:["Banking","Printing Press"],
|
prerequisites:["Banking","Printing Press"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Camps and Trading Posts provide +1 gold, allows construction of Windmill"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Chemistry",
|
name:"Chemistry",
|
||||||
row:9,
|
row:9,
|
||||||
prerequisites:["Gunpowder"],
|
prerequisites:["Gunpowder"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Mines and Quarries provide +1 production"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Metallurgy",
|
name:"Metallurgy",
|
||||||
row:10,
|
row:10,
|
||||||
prerequisites:["Gunpowder"],
|
prerequisites:["Gunpowder"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -277,10 +277,10 @@
|
|||||||
wonderCost:750,
|
wonderCost:750,
|
||||||
techs:[
|
techs:[
|
||||||
{
|
{
|
||||||
name:"Archaology",
|
name:"Archaeology",
|
||||||
row:2,
|
row:2,
|
||||||
prerequisites:["Navigation"],
|
prerequisites:["Navigation"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Allows construction of Museums and the Hermitage and Louvre wonders, providing culture"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Scientific Theory",
|
name:"Scientific Theory",
|
||||||
@ -292,19 +292,71 @@
|
|||||||
name:"Military Science",
|
name:"Military Science",
|
||||||
row:6,
|
row:6,
|
||||||
prerequisites:["Economics","Chemistry"],
|
prerequisites:["Economics","Chemistry"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Fertilizer",
|
name:"Fertilizer",
|
||||||
row:9,
|
row:9,
|
||||||
prerequisites:["Chemistry"],
|
prerequisites:["Chemistry"],
|
||||||
description:"This is a lie, change!!!"
|
description:"+1 food from Farms, Plantations and Pastures"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Rifling",
|
name:"Rifling",
|
||||||
row:10,
|
row:10,
|
||||||
prerequisites:["Metallurgy"],
|
prerequisites:["Metallurgy"],
|
||||||
description:"This is a lie, change!!!"
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnNumber: 9,
|
||||||
|
techCost: 2585,
|
||||||
|
buildingCost:360,
|
||||||
|
wonderCost:920,
|
||||||
|
techs:[
|
||||||
|
{
|
||||||
|
name:"Biology",
|
||||||
|
row:4,
|
||||||
|
prerequisites:["Archaeology","Scientific Theory"],
|
||||||
|
description:"Reveals oil and allows construction of oil wells - Todo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Steam Power",
|
||||||
|
row:6,
|
||||||
|
prerequisites:["Scientific Theory","Military Science"],
|
||||||
|
description:"Enables construction of factories and - Todo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Dynamite",
|
||||||
|
row:9,
|
||||||
|
prerequisites:["Military Science","Fertilizer","Rifling"],
|
||||||
|
description:"Contributes only war-relatied things - on hold until AI is introduced"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnNumber: 10,
|
||||||
|
techCost: 3405,
|
||||||
|
buildingCost:500,
|
||||||
|
wonderCost:1060,
|
||||||
|
techs:[
|
||||||
|
{
|
||||||
|
name:"Electricity",
|
||||||
|
row:4,
|
||||||
|
prerequisites:["Biology","Steam Power"],
|
||||||
|
description:"Reveals Aluminium on map and allows construction of stock exchange, providing gold - todo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Replaceable Parts",
|
||||||
|
row:6,
|
||||||
|
prerequisites:["Steam Power"],
|
||||||
|
description:"Contributes only war-relatied things - on hold until AI is introduced - todo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Railroad",
|
||||||
|
row:8,
|
||||||
|
prerequisites:["Steam Power","Dynamite"],
|
||||||
|
description:"Allows construction of railroads, providing fast transport and a 25% production boost to cities - todo"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,7 @@
|
|||||||
movementCost:2,
|
movementCost:2,
|
||||||
overrideStats:true,
|
overrideStats:true,
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
occursOn:["Tundra","Plains","Grassland"],
|
occursOn:["Tundra","Plains","Grassland"]
|
||||||
removalTech: "Mining"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Jungle",
|
name:"Jungle",
|
||||||
@ -62,8 +61,7 @@
|
|||||||
movementCost:2,
|
movementCost:2,
|
||||||
overrideStats:true,
|
overrideStats:true,
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
occursOn:["Plains","Grassland"],
|
occursOn:["Plains","Grassland"]
|
||||||
removalTech: "Bronze Working"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Marsh",
|
name:"Marsh",
|
||||||
@ -71,8 +69,7 @@
|
|||||||
food:-1,
|
food:-1,
|
||||||
movementCost:2,
|
movementCost:2,
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
occursOn:["Grassland"],
|
occursOn:["Grassland"]
|
||||||
removalTech: "Masonry"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Oasis",
|
name:"Oasis",
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Oil well",
|
name:"Oil well",
|
||||||
turnsToBuild:6
|
turnsToBuild:6,
|
||||||
|
techRequired:"Biology",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Pasture",
|
name:"Pasture",
|
||||||
@ -76,5 +77,24 @@
|
|||||||
name:"Railroad",
|
name:"Railroad",
|
||||||
turnsToBuild:12,
|
turnsToBuild:12,
|
||||||
techRequired:"Railroad"
|
techRequired:"Railroad"
|
||||||
}
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name:"Remove Forest",
|
||||||
|
turnsToBuild:6,
|
||||||
|
terrainsCanBeBuiltOn:["Forest"],
|
||||||
|
techRequired:"Mining"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Remove Jungle",
|
||||||
|
turnsToBuild:6,
|
||||||
|
terrainsCanBeBuiltOn:["Jungle"],
|
||||||
|
techRequired:"Bronze Working"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name:"Remove Marsh",
|
||||||
|
turnsToBuild:6,
|
||||||
|
terrainsCanBeBuiltOn:["Marsh"],
|
||||||
|
techRequired:"Masonry"
|
||||||
|
},
|
||||||
]
|
]
|
@ -105,10 +105,10 @@ public class TileInfo
|
|||||||
return resource != null && getTileResource().improvement.equals(improvement.name);
|
return resource != null && getTileResource().improvement.equals(improvement.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startWorkingOnImprovement(TileImprovement improvement)
|
public void startWorkingOnImprovement(String improvementName,int turnsToBuild)
|
||||||
{
|
{
|
||||||
improvementInProgress = improvement.name;
|
improvementInProgress = improvementName;
|
||||||
turnsToImprovement = improvement.turnsToBuild;
|
turnsToImprovement = turnsToBuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopWorkingOnImprovement()
|
public void stopWorkingOnImprovement()
|
||||||
|
@ -8,7 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ImageGetter {
|
public class ImageGetter {
|
||||||
static HashMap<String, TextureRegion> textureRegionByFileName = new HashMap<String, TextureRegion>();
|
public static HashMap<String, TextureRegion> textureRegionByFileName = new HashMap<String, TextureRegion>();
|
||||||
|
|
||||||
public static Image getImageByFilename(String fileName) {
|
public static Image getImageByFilename(String fileName) {
|
||||||
if (!textureRegionByFileName.containsKey(fileName))
|
if (!textureRegionByFileName.containsKey(fileName))
|
||||||
|
@ -6,6 +6,8 @@ import com.badlogic.gdx.scenes.scene2d.Group;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Container;
|
import com.badlogic.gdx.scenes.scene2d.ui.Container;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||||
import com.unciv.civinfo.CivilizationInfo;
|
import com.unciv.civinfo.CivilizationInfo;
|
||||||
import com.unciv.civinfo.RoadStatus;
|
import com.unciv.civinfo.RoadStatus;
|
||||||
import com.unciv.civinfo.TileInfo;
|
import com.unciv.civinfo.TileInfo;
|
||||||
@ -48,6 +50,9 @@ public class TileGroup extends Group {
|
|||||||
|
|
||||||
void update() {
|
void update() {
|
||||||
|
|
||||||
|
String terrainFileName ="TerrainIcons/" + tileInfo.getLastTerrain().name.replace(' ','_') + "_(Civ5).png";
|
||||||
|
terrainImage.setDrawable(new TextureRegionDrawable(ImageGetter.textureRegionByFileName.get(terrainFileName))); // In case we e.g. removed a jungle
|
||||||
|
|
||||||
if (tileInfo.hasViewableResource() && resourceImage == null) { // Need to add the resource image!
|
if (tileInfo.hasViewableResource() && resourceImage == null) { // Need to add the resource image!
|
||||||
String fileName = "ResourceIcons/" + tileInfo.resource + "_(Civ5).png";
|
String fileName = "ResourceIcons/" + tileInfo.resource + "_(Civ5).png";
|
||||||
Image image = ImageGetter.getImageByFilename(fileName);
|
Image image = ImageGetter.getImageByFilename(fileName);
|
||||||
|
@ -180,12 +180,12 @@ public class WorldScreen extends CameraStageBaseScreen {
|
|||||||
|
|
||||||
CivStats nextTurnStats = game.civInfo.getStatsForNextTurn();
|
CivStats nextTurnStats = game.civInfo.getStatsForNextTurn();
|
||||||
|
|
||||||
CivTable.add(new Label("gold: " + Math.round(currentStats.gold)
|
CivTable.add(new Label("Gold: " + Math.round(currentStats.gold)
|
||||||
+ "(" +(nextTurnStats.gold >0?"+":"") + Math.round(nextTurnStats.gold) +")", skin));
|
+ "(" +(nextTurnStats.gold >0?"+":"") + Math.round(nextTurnStats.gold) +")", skin));
|
||||||
|
|
||||||
CivTable.add(new Label("science: +" + Math.round(nextTurnStats.science), skin));
|
CivTable.add(new Label("Science: +" + Math.round(nextTurnStats.science), skin));
|
||||||
CivTable.add(new Label("happiness: " + Math.round(nextTurnStats.happiness), skin));
|
CivTable.add(new Label("Happiness: " + Math.round(nextTurnStats.happiness), skin));
|
||||||
CivTable.add(new Label("culture: " + Math.round(currentStats.culture) + "(+" + Math.round(nextTurnStats.culture) +")", skin));
|
CivTable.add(new Label("Culture: " + Math.round(currentStats.culture) + "(+" + Math.round(nextTurnStats.culture) +")", skin));
|
||||||
|
|
||||||
CivTable.pack();
|
CivTable.pack();
|
||||||
|
|
||||||
|
@ -6,12 +6,14 @@ import com.badlogic.gdx.scenes.scene2d.Touchable;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;
|
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
|
import com.unciv.civinfo.CivilizationInfo;
|
||||||
import com.unciv.game.UnCivGame;
|
import com.unciv.game.UnCivGame;
|
||||||
import com.unciv.models.gamebasics.GameBasics;
|
import com.unciv.models.gamebasics.GameBasics;
|
||||||
import com.unciv.models.gamebasics.TileImprovement;
|
import com.unciv.models.gamebasics.TileImprovement;
|
||||||
|
|
||||||
public class ImprovementPickerScreen extends PickerScreen {
|
public class ImprovementPickerScreen extends PickerScreen {
|
||||||
TileImprovement SelectedImprovement;
|
String SelectedImprovement;
|
||||||
|
int TurnsToImprovement;
|
||||||
|
|
||||||
public ImprovementPickerScreen(final UnCivGame game, final com.unciv.civinfo.TileInfo tileInfo) {
|
public ImprovementPickerScreen(final UnCivGame game, final com.unciv.civinfo.TileInfo tileInfo) {
|
||||||
super(game);
|
super(game);
|
||||||
@ -21,7 +23,7 @@ public class ImprovementPickerScreen extends PickerScreen {
|
|||||||
rightSideButton.addListener(new ClickListener(){
|
rightSideButton.addListener(new ClickListener(){
|
||||||
@Override
|
@Override
|
||||||
public void clicked(InputEvent event, float x, float y) {
|
public void clicked(InputEvent event, float x, float y) {
|
||||||
tileInfo.startWorkingOnImprovement(SelectedImprovement);
|
tileInfo.startWorkingOnImprovement(SelectedImprovement, TurnsToImprovement);
|
||||||
game.setWorldScreen();
|
game.setWorldScreen();
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
@ -38,9 +40,10 @@ public class ImprovementPickerScreen extends PickerScreen {
|
|||||||
TB.addListener(new ClickListener(){
|
TB.addListener(new ClickListener(){
|
||||||
@Override
|
@Override
|
||||||
public void clicked(InputEvent event, float x, float y) {
|
public void clicked(InputEvent event, float x, float y) {
|
||||||
SelectedImprovement = improvement;
|
SelectedImprovement = improvement.name;
|
||||||
|
TurnsToImprovement = improvement.turnsToBuild;
|
||||||
rightSideButton.setTouchable(Touchable.enabled);
|
rightSideButton.setTouchable(Touchable.enabled);
|
||||||
rightSideButton.setText("Construct "+improvement.name);
|
rightSideButton.setText(improvement.name);
|
||||||
rightSideButton.setColor(Color.WHITE);
|
rightSideButton.setColor(Color.WHITE);
|
||||||
descriptionLabel.setText(improvement.getDescription());
|
descriptionLabel.setText(improvement.getDescription());
|
||||||
}
|
}
|
||||||
|
@ -100,14 +100,14 @@ public class TechPickerScreen extends PickerScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Technology technology : GameBasics.Technologies.linqValues()) {
|
for (Technology technology : GameBasics.Technologies.linqValues()) {
|
||||||
techMatrix[technology.column.columnNumber][technology.row - 1] = technology;
|
techMatrix[technology.column.columnNumber-1][technology.row - 1] = technology;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table topTable = new Table();
|
// Table topTable = new Table();
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
topTable.row().pad(5);
|
topTable.row().pad(5);
|
||||||
|
|
||||||
for (int j = 0; j < 8; j++) {
|
for (int j = 0; j < 9; j++) {
|
||||||
final Technology tech = techMatrix[j][i];
|
final Technology tech = techMatrix[j][i];
|
||||||
if (tech == null) topTable.add(); // empty cell
|
if (tech == null) topTable.add(); // empty cell
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user