Implemented correct map loading, legacy format support
This commit is contained in:
@@ -144,11 +144,11 @@ public class ServerControl implements ApplicationListener{
|
||||
|
||||
Call.onInfoMessage((state.rules.pvp
|
||||
? "[YELLOW]The " + event.winner.name() + " team is victorious![]" : "[SCARLET]Game over![]")
|
||||
+ "\nNext selected map:[accent] "+map.name+"[]"
|
||||
+ (map.meta.author() != null ? " by[accent] " + map.meta.author() + "[]" : "") + "."+
|
||||
+ "\nNext selected map:[accent] "+map.name()+"[]"
|
||||
+ (map.author() != null ? " by[accent] " + map.author() + "[]" : "") + "."+
|
||||
"\nNew game begins in " + roundExtraTime + " seconds.");
|
||||
|
||||
info("Selected next map to be {0}.", map.name);
|
||||
info("Selected next map to be {0}.", map.name());
|
||||
|
||||
Map fmap = map;
|
||||
|
||||
@@ -199,7 +199,7 @@ public class ServerControl implements ApplicationListener{
|
||||
|
||||
if(lastTask != null) lastTask.cancel();
|
||||
|
||||
Map result = world.maps.all().find(map -> map.name.equalsIgnoreCase(arg[0]));
|
||||
Map result = world.maps.all().find(map -> map.name().equalsIgnoreCase(arg[0]));
|
||||
|
||||
if(result == null){
|
||||
err("No map with name &y'{0}'&lr found.", arg[0]);
|
||||
@@ -252,7 +252,7 @@ public class ServerControl implements ApplicationListener{
|
||||
if(!world.maps.all().isEmpty()){
|
||||
info("Maps:");
|
||||
for(Map map : world.maps.all()){
|
||||
info(" &ly{0}: &lb&fi{1} / {2}x{3}", map.name, map.custom ? "Custom" : "Default", map.meta.width, map.meta.height);
|
||||
info(" &ly{0}: &lb&fi{1} / {2}x{3}", map.name(), map.custom ? "Custom" : "Default", map.width, map.height);
|
||||
}
|
||||
}else{
|
||||
info("No maps found.");
|
||||
@@ -265,7 +265,7 @@ public class ServerControl implements ApplicationListener{
|
||||
info("Status: &rserver closed");
|
||||
}else{
|
||||
info("Status:");
|
||||
info(" &lyPlaying on map &fi{0}&fb &lb/&ly Wave {1}", Strings.capitalize(world.getMap().name), state.wave);
|
||||
info(" &lyPlaying on map &fi{0}&fb &lb/&ly Wave {1}", Strings.capitalize(world.getMap().name()), state.wave);
|
||||
|
||||
if(state.rules.waves){
|
||||
info("&ly {0} enemies.", unitGroups[Team.red.ordinal()].size());
|
||||
|
||||
Reference in New Issue
Block a user