Avoid caching paths on servers
This commit is contained in:
@@ -585,6 +585,7 @@ loadout = Loadout
|
|||||||
resources = Resources
|
resources = Resources
|
||||||
resources.max = Max
|
resources.max = Max
|
||||||
bannedblocks = Banned Blocks
|
bannedblocks = Banned Blocks
|
||||||
|
objectives = Objectives
|
||||||
bannedunits = Banned Units
|
bannedunits = Banned Units
|
||||||
addall = Add All
|
addall = Add All
|
||||||
launch.from = Launching From: [accent]{0}
|
launch.from = Launching From: [accent]{0}
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ public class Pathfinder implements Runnable{
|
|||||||
tiles[i] = packTile(tile);
|
tiles[i] = packTile(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.rules.waveTeam.needsFlowField()){
|
//don't bother setting up paths unless necessary
|
||||||
|
if(state.rules.waveTeam.needsFlowField() && !net.client()){
|
||||||
preloadPath(getField(state.rules.waveTeam, costGround, fieldCore));
|
preloadPath(getField(state.rules.waveTeam, costGround, fieldCore));
|
||||||
|
|
||||||
//preload water on naval maps
|
//preload water on naval maps
|
||||||
|
|||||||
@@ -164,11 +164,16 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
i -> true,
|
i -> true,
|
||||||
() -> rules.loadout.clear().add(new ItemStack(Items.copper, 100)),
|
() -> rules.loadout.clear().add(new ItemStack(Items.copper, 100)),
|
||||||
() -> {}, () -> {}
|
() -> {}, () -> {}
|
||||||
)).left().width(300f);
|
)).left().width(300f).row();
|
||||||
main.row();
|
|
||||||
|
|
||||||
main.button("@bannedblocks", () -> showBanned("@bannedblocks", ContentType.block, rules.bannedBlocks, Block::canBeBuilt)).left().width(300f);
|
main.button("@bannedblocks", () -> showBanned("@bannedblocks", ContentType.block, rules.bannedBlocks, Block::canBeBuilt)).left().width(300f).row();
|
||||||
main.row();
|
|
||||||
|
//TODO objectives would be nice
|
||||||
|
if(experimental && false){
|
||||||
|
main.button("@objectives", () -> {
|
||||||
|
|
||||||
|
}).left().width(300f).row();
|
||||||
|
}
|
||||||
|
|
||||||
title("@rules.title.unit");
|
title("@rules.title.unit");
|
||||||
check("@rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
check("@rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
||||||
@@ -177,8 +182,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
number("@rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
number("@rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
||||||
number("@rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier, 0f, 50f);
|
number("@rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier, 0f, 50f);
|
||||||
|
|
||||||
main.button("@bannedunits", () -> showBanned("@bannedunits", ContentType.unit, rules.bannedUnits, u -> !u.isHidden())).left().width(300f);
|
main.button("@bannedunits", () -> showBanned("@bannedunits", ContentType.unit, rules.bannedUnits, u -> !u.isHidden())).left().width(300f).row();
|
||||||
main.row();
|
|
||||||
|
|
||||||
title("@rules.title.enemy");
|
title("@rules.title.enemy");
|
||||||
check("@rules.attack", b -> rules.attackMode = b, () -> rules.attackMode);
|
check("@rules.attack", b -> rules.attackMode = b, () -> rules.attackMode);
|
||||||
|
|||||||
Reference in New Issue
Block a user