mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-12 15:56:57 +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;
|
||||
}
|
||||
|
||||
getTile().workingCity = this.name;
|
||||
getTile().roadStatus = RoadStatus.Railroad;
|
||||
TileInfo tile = getTile();
|
||||
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();
|
||||
civInfo.cities.add(this);
|
||||
}
|
||||
|
||||
ArrayList<String> getLuxuryResources() {
|
||||
ArrayList<String> LuxuryResources = new ArrayList<String>();
|
||||
LinqCollection<String> LuxuryResources = new LinqCollection<String>();
|
||||
for (TileInfo tileInfo : getTilesInRange()) {
|
||||
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);
|
||||
}
|
||||
return LuxuryResources;
|
||||
return LuxuryResources.unique();
|
||||
}
|
||||
|
||||
|
||||
private int getWorkingPopulation() {
|
||||
return getTilesInRange().count(new Predicate<TileInfo>() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user