mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-13 00:04:38 +07:00
Cities provide resources that are in the city center
Cities founded on forest/jungle/marsh remove terrain feature
This commit is contained in:
parent
65bff07905
commit
060be89e55
@ -59,24 +59,27 @@ public class CityInfo {
|
|||||||
tileInfo.owner = civInfo.civName;
|
tileInfo.owner = civInfo.civName;
|
||||||
}
|
}
|
||||||
|
|
||||||
getTile().workingCity = this.name;
|
TileInfo tile = getTile();
|
||||||
getTile().roadStatus = RoadStatus.Railroad;
|
tile.workingCity = this.name;
|
||||||
|
tile.roadStatus = RoadStatus.Railroad;
|
||||||
|
if("Forest".equals(tile.terrainFeature) || "Jungle".equals(tile.terrainFeature) || "Marsh".equals(tile.terrainFeature))
|
||||||
|
tile.terrainFeature=null;
|
||||||
|
|
||||||
autoAssignWorker();
|
autoAssignWorker();
|
||||||
civInfo.cities.add(this);
|
civInfo.cities.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<String> getLuxuryResources() {
|
ArrayList<String> getLuxuryResources() {
|
||||||
ArrayList<String> LuxuryResources = new ArrayList<String>();
|
LinqCollection<String> LuxuryResources = new LinqCollection<String>();
|
||||||
for (TileInfo tileInfo : getTilesInRange()) {
|
for (TileInfo tileInfo : getTilesInRange()) {
|
||||||
TileResource resource = tileInfo.getTileResource();
|
TileResource resource = tileInfo.getTileResource();
|
||||||
if (resource != null && resource.resourceType == ResourceType.Luxury && resource.improvement.equals(tileInfo.improvement))
|
if (resource != null && resource.resourceType == ResourceType.Luxury &&
|
||||||
|
(resource.improvement.equals(tileInfo.improvement) || tileInfo.isCityCenter()))
|
||||||
LuxuryResources.add(tileInfo.resource);
|
LuxuryResources.add(tileInfo.resource);
|
||||||
}
|
}
|
||||||
return LuxuryResources;
|
return LuxuryResources.unique();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private int getWorkingPopulation() {
|
private int getWorkingPopulation() {
|
||||||
return getTilesInRange().count(new Predicate<TileInfo>() {
|
return getTilesInRange().count(new Predicate<TileInfo>() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user