Per-team AI settings / Errors for missing player cores
This commit is contained in:
@@ -345,9 +345,9 @@ custom = Custom
|
|||||||
builtin = Built-In
|
builtin = Built-In
|
||||||
map.delete.confirm = Are you sure you want to delete this map? This action cannot be undone!
|
map.delete.confirm = Are you sure you want to delete this map? This action cannot be undone!
|
||||||
map.random = [accent]Random Map
|
map.random = [accent]Random Map
|
||||||
map.nospawn = This map does not have any cores for the player to spawn in! Add a[accent] orange[] core to this map in the editor.
|
map.nospawn = This map does not have any cores for the player to spawn in! Add a [#{0}]{1}[] core to this map in the editor.
|
||||||
map.nospawn.pvp = This map does not have any enemy cores for player to spawn into! Add[scarlet] non-orange[] cores to this map in the editor.
|
map.nospawn.pvp = This map does not have any enemy cores for player to spawn into! Add[scarlet] non-orange[] cores to this map in the editor.
|
||||||
map.nospawn.attack = This map does not have any enemy cores for player to attack! Add[scarlet] red[] cores to this map in the editor.
|
map.nospawn.attack = This map does not have any enemy cores for player to attack! Add [#{0}]{1}[] cores to this map in the editor.
|
||||||
map.invalid = Error loading map: corrupted or invalid map file.
|
map.invalid = Error loading map: corrupted or invalid map file.
|
||||||
workshop.update = Update Item
|
workshop.update = Update Item
|
||||||
workshop.error = Error fetching workshop details: {0}
|
workshop.error = Error fetching workshop details: {0}
|
||||||
@@ -1001,6 +1001,7 @@ rules.wavetimer = Wave Timer
|
|||||||
rules.waves = Waves
|
rules.waves = Waves
|
||||||
rules.attack = Attack Mode
|
rules.attack = Attack Mode
|
||||||
rules.buildai = AI Building
|
rules.buildai = AI Building
|
||||||
|
rules.aitier = AI Tier
|
||||||
rules.cleanupdeadteams = Clean Up Defeated Team Buildings (PvP)
|
rules.cleanupdeadteams = Clean Up Defeated Team Buildings (PvP)
|
||||||
rules.corecapture = Capture Core On Destruction
|
rules.corecapture = Capture Core On Destruction
|
||||||
rules.polygoncoreprotection = Polygonal Core Protection
|
rules.polygoncoreprotection = Polygonal Core Protection
|
||||||
|
|||||||
@@ -326,8 +326,8 @@ public class World{
|
|||||||
invalidMap = false;
|
invalidMap = false;
|
||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
if(state.teams.playerCores().size == 0 && !checkRules.pvp){
|
if(state.teams.cores(checkRules.defaultTeam).size == 0 && !checkRules.pvp){
|
||||||
ui.showErrorMessage("@map.nospawn");
|
ui.showErrorMessage(Core.bundle.format("map.nospawn", checkRules.defaultTeam.color, checkRules.defaultTeam.localized()));
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
||||||
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
||||||
@@ -337,7 +337,7 @@ public class World{
|
|||||||
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
||||||
invalidMap = state.rules.waveTeam.data().noCores();
|
invalidMap = state.rules.waveTeam.data().noCores();
|
||||||
if(invalidMap){
|
if(invalidMap){
|
||||||
ui.showErrorMessage("@map.nospawn.attack");
|
ui.showErrorMessage(Core.bundle.format("map.nospawn.attack", checkRules.waveTeam.color, checkRules.waveTeam.localized()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
boolean[] shown = {false};
|
boolean[] shown = {false};
|
||||||
Table wasMain = main;
|
Table wasMain = main;
|
||||||
|
|
||||||
|
|
||||||
main.button("[#" + team.color + "]" + team.localized() + (team.emoji.isEmpty() ? "" : "[] " + team.emoji), Icon.downOpen, Styles.togglet, () -> {
|
main.button("[#" + team.color + "]" + team.localized() + (team.emoji.isEmpty() ? "" : "[] " + team.emoji), Icon.downOpen, Styles.togglet, () -> {
|
||||||
shown[0] = !shown[0];
|
shown[0] = !shown[0];
|
||||||
}).marginLeft(14f).width(260f).height(55f).checked(a -> shown[0]).row();
|
}).marginLeft(14f).width(260f).height(55f).checked(a -> shown[0]).row();
|
||||||
@@ -224,11 +223,15 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
number("@rules.blockhealthmultiplier", f -> teams.blockHealthMultiplier = f, () -> teams.blockHealthMultiplier);
|
number("@rules.blockhealthmultiplier", f -> teams.blockHealthMultiplier = f, () -> teams.blockHealthMultiplier);
|
||||||
number("@rules.blockdamagemultiplier", f -> teams.blockDamageMultiplier = f, () -> teams.blockDamageMultiplier);
|
number("@rules.blockdamagemultiplier", f -> teams.blockDamageMultiplier = f, () -> teams.blockDamageMultiplier);
|
||||||
|
|
||||||
|
check("@rules.buildai", b -> teams.ai = b, () -> teams.ai, () -> team != rules.defaultTeam);
|
||||||
|
number("@rules.aitier", false, f -> teams.aiTier = f, () -> teams.aiTier, () -> teams.ai, 0, 1);
|
||||||
|
|
||||||
|
check("@rules.infiniteresources", b -> teams.infiniteResources = b, () -> teams.infiniteResources);
|
||||||
|
number("@rules.buildspeedmultiplier", f -> teams.buildSpeedMultiplier = f, () -> teams.buildSpeedMultiplier, 0.001f, 50f);
|
||||||
|
|
||||||
number("@rules.unitdamagemultiplier", f -> teams.unitDamageMultiplier = f, () -> teams.unitDamageMultiplier);
|
number("@rules.unitdamagemultiplier", f -> teams.unitDamageMultiplier = f, () -> teams.unitDamageMultiplier);
|
||||||
number("@rules.unitbuildspeedmultiplier", f -> teams.unitBuildSpeedMultiplier = f, () -> teams.unitBuildSpeedMultiplier, 0.001f, 50f);
|
number("@rules.unitbuildspeedmultiplier", f -> teams.unitBuildSpeedMultiplier = f, () -> teams.unitBuildSpeedMultiplier, 0.001f, 50f);
|
||||||
|
|
||||||
number("@rules.buildspeedmultiplier", f -> teams.buildSpeedMultiplier = f, () -> teams.buildSpeedMultiplier, 0.001f, 50f);
|
|
||||||
|
|
||||||
main = wasMain;
|
main = wasMain;
|
||||||
}, () -> shown[0]).growX().row();
|
}, () -> shown[0]).growX().row();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user