Added warnings for missing enemy cores
This commit is contained in:
@@ -216,7 +216,8 @@ text.custom=Custom
|
|||||||
text.builtin=Built-In
|
text.builtin=Built-In
|
||||||
text.map.delete.confirm=Are you sure you want to delete this map? This action cannot be undone!
|
text.map.delete.confirm=Are you sure you want to delete this map? This action cannot be undone!
|
||||||
text.map.random=[accent]Random Map
|
text.map.random=[accent]Random Map
|
||||||
text.map.nospawn=This map does not have any cores for the player to spawn in! Add a [ROYAL]blue[] core to this map in the editor.
|
text.map.nospawn=This map does not have any cores for the player to spawn in! Add a[ROYAL] blue[] core to this map in the editor.
|
||||||
|
text.map.nospawn.pvp=This map does not have any enemy cores for player to spawn into! Add[SCARLET] red[] cores to this map in the editor.
|
||||||
text.map.invalid=Error loading map: corrupted or invalid map file.
|
text.map.invalid=Error loading map: corrupted or invalid map file.
|
||||||
text.editor.brush=Brush
|
text.editor.brush=Brush
|
||||||
text.editor.slope=\\
|
text.editor.slope=\\
|
||||||
|
|||||||
@@ -254,14 +254,27 @@ public class World extends Module{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!headless && state.teams.get(players[0].getTeam()).cores.size == 0){
|
if(!headless){
|
||||||
|
if(state.teams.get(players[0].getTeam()).cores.size == 0){
|
||||||
ui.showError("$text.map.nospawn");
|
ui.showError("$text.map.nospawn");
|
||||||
threads.runDelay(() -> state.set(State.menu));
|
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
|
}else if(state.mode.isPvp){
|
||||||
|
invalidMap = true;
|
||||||
|
for(Team team : Team.all){
|
||||||
|
if(state.teams.get(team).cores.size != 0 && team != players[0].getTeam()){
|
||||||
|
invalidMap = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(invalidMap){
|
||||||
|
ui.showError("$text.map.nospawn.pvp");
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
invalidMap = false;
|
invalidMap = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(invalidMap) threads.runDelay(() -> state.set(State.menu));
|
||||||
|
|
||||||
endMapLoad();
|
endMapLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user