Fixed bug in GetVectorsAtDistance and bug where if you started the game with free techs to pick the next turn button would not be visible
This commit is contained in:
parent
c579215743
commit
727aad337a
4 changed files with 3 additions and 7 deletions
|
@ -59,7 +59,7 @@ public class CivilizationInfo {
|
|||
});
|
||||
}
|
||||
|
||||
public void nextTurn()//out boolean displayTech)
|
||||
public void nextTurn()
|
||||
{
|
||||
notifications.clear();
|
||||
CivStats nextTurnStats = getStatsForNextTurn();
|
||||
|
|
|
@ -48,6 +48,7 @@ public class HexMath
|
|||
|
||||
public static ArrayList<Vector2> GetVectorsAtDistance(Vector2 origin, int distance){
|
||||
ArrayList<Vector2> vectors = new ArrayList<Vector2>();
|
||||
if(distance==0){vectors.add(origin.cpy()); return vectors;}
|
||||
Vector2 Current = origin.cpy().sub(distance,distance); // start at 6 o clock
|
||||
for (int i = 0; i < distance; i++) { // From 6 to 8
|
||||
vectors.add(Current.cpy());
|
||||
|
@ -62,7 +63,7 @@ public class HexMath
|
|||
for (int i = 0; i < distance; i++) { // 10 to 12
|
||||
vectors.add(Current.cpy());
|
||||
vectors.add(origin.cpy().scl(2).sub(Current)); // Get vector on other side of cloick
|
||||
Current.add(1,1);
|
||||
Current.add(0,1);
|
||||
};
|
||||
return vectors;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,6 @@ public class WorldScreen extends CameraStageBaseScreen {
|
|||
public void update(){
|
||||
if(game.civInfo.tech.freeTechs!=0) {
|
||||
game.setScreen(new TechPickerScreen(game, true));
|
||||
return;
|
||||
}
|
||||
updateTechButton();
|
||||
updateTileTable();
|
||||
|
|
|
@ -93,14 +93,10 @@ public class TechPickerScreen extends PickerScreen {
|
|||
StringBuilder text = new StringBuilder(techName);
|
||||
|
||||
if (selectedTech != null) {
|
||||
Technology thisTech = GameBasics.Technologies.get(techName);
|
||||
if (techName.equals(selectedTech.name)) {
|
||||
TB.setChecked(true);
|
||||
TB.setColor(TB.getColor().lerp(Color.LIGHT_GRAY, 0.5f));
|
||||
}
|
||||
|
||||
if (thisTech.prerequisites.contains(selectedTech.name)) text.insert(0, "*");
|
||||
else if (selectedTech.prerequisites.contains(techName)) text.append("*");
|
||||
}
|
||||
if (techsToResearch.contains(techName)) {
|
||||
text.append(" (").append(techsToResearch.indexOf(techName)).append(")");
|
||||
|
|
Loading…
Reference in a new issue