mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
update
This commit is contained in:
@@ -70,8 +70,8 @@ public class GameScene extends HudScene {
|
|||||||
if (skipRoads) {
|
if (skipRoads) {
|
||||||
location = forHeader ? "Waste Map" : "waste";
|
location = forHeader ? "Waste Map" : "waste";
|
||||||
} else {
|
} else {
|
||||||
//should load while walking on "road"
|
//current workaround to get the POI town name
|
||||||
location = "";
|
location = WorldStage.getInstance().getBoundary();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BiomeData data = biomeData.get(currentBiome);
|
BiomeData data = biomeData.get(currentBiome);
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ public class GameHUD extends Stage {
|
|||||||
case "town":
|
case "town":
|
||||||
changeBGM(MusicPlaylist.TOWN);
|
changeBGM(MusicPlaylist.TOWN);
|
||||||
break;
|
break;
|
||||||
|
case "dungeon":
|
||||||
case "cave":
|
case "cave":
|
||||||
changeBGM(MusicPlaylist.CAVE);
|
changeBGM(MusicPlaylist.CAVE);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -63,6 +63,30 @@ public class MapSprite extends Actor {
|
|||||||
return actorGroup;
|
return actorGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getBoundaryName(int chunkX, int chunkY) {
|
||||||
|
String boundary = "";
|
||||||
|
List<PointOfInterest> poi = WorldSave.getCurrentSave().getWorld().getPointsOfInterest(chunkX, chunkY);
|
||||||
|
|
||||||
|
for (PointOfInterest p : poi) {
|
||||||
|
if ("town".equalsIgnoreCase(p.getData().type)) {
|
||||||
|
if (p.getData().name.startsWith("Waste"))
|
||||||
|
boundary = "waste";
|
||||||
|
else if (p.getData().name.startsWith("Plains"))
|
||||||
|
boundary = "white";
|
||||||
|
else if (p.getData().name.startsWith("Forest"))
|
||||||
|
boundary = "green";
|
||||||
|
else if (p.getData().name.startsWith("Island"))
|
||||||
|
boundary = "blue";
|
||||||
|
else if (p.getData().name.startsWith("Mountain"))
|
||||||
|
boundary = "red";
|
||||||
|
else if (p.getData().name.startsWith("Swamp"))
|
||||||
|
boundary = "black";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return boundary;
|
||||||
|
}
|
||||||
|
|
||||||
//BitmapFont font;
|
//BitmapFont font;
|
||||||
@Override
|
@Override
|
||||||
public void draw(Batch batch, float parentAlpha) {
|
public void draw(Batch batch, float parentAlpha) {
|
||||||
|
|||||||
@@ -294,6 +294,10 @@ public class WorldStage extends GameStage implements SaveFileContent {
|
|||||||
background.loadChunk(pos.x, pos.y);
|
background.loadChunk(pos.x, pos.y);
|
||||||
handlePointsOfInterestCollision();
|
handlePointsOfInterestCollision();
|
||||||
}
|
}
|
||||||
|
public String getBoundary() {
|
||||||
|
GridPoint2 pos = background.translateFromWorldToChunk(player.getX(), player.getY());
|
||||||
|
return MapSprite.getBoundaryName(pos.x, pos.y);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void leave() {
|
public void leave() {
|
||||||
|
|||||||
Reference in New Issue
Block a user