st shortener config
This commit is contained in:
parent
656af97389
commit
a3aaef41df
3 changed files with 19 additions and 11 deletions
|
@ -35,7 +35,7 @@ public class ZombiesUtils {
|
|||
logger = event.getModLog();
|
||||
ZombiesUtilsConfig.config = new Configuration(
|
||||
event.getSuggestedConfigurationFile(),
|
||||
"1.2.1"
|
||||
"1.2.0"
|
||||
);
|
||||
ZombiesUtilsConfig.load();
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ public class ZombiesUtilsConfig {
|
|||
public static Configuration config;
|
||||
private static boolean slaToggle;
|
||||
private static boolean slaShortener;
|
||||
private static boolean shortSpawntime;
|
||||
|
||||
private static String chatMacro;
|
||||
private static String defaultCategory;
|
||||
private static short waveOffset;
|
||||
|
@ -21,13 +23,13 @@ public class ZombiesUtilsConfig {
|
|||
slaToggle = config.getBoolean(
|
||||
"SLA Launcher",
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
slaToggle,
|
||||
false,
|
||||
"Should SLA be started when a game starts?"
|
||||
);
|
||||
slaShortener = config.getBoolean(
|
||||
"shortened SLA",
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
slaShortener,
|
||||
true,
|
||||
"If on, inactive windows / rooms will not show"
|
||||
);
|
||||
chatMacro = config.getString(
|
||||
|
@ -50,10 +52,12 @@ public class ZombiesUtilsConfig {
|
|||
200,
|
||||
"max: 200 ticks"
|
||||
);
|
||||
|
||||
ZombiesUtils.getInstance().getLogger().debug("Saving Config...");
|
||||
config.save();
|
||||
ZombiesUtils.getInstance().getLogger().debug("Config saved.");
|
||||
shortSpawntime = config.getBoolean(
|
||||
"passed wave spawns",
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
true,
|
||||
"Display spawn-time for passed waves"
|
||||
);
|
||||
}
|
||||
|
||||
public static short getWaveOffset() {
|
||||
|
@ -73,6 +77,9 @@ public class ZombiesUtilsConfig {
|
|||
public static boolean isSlaShortened() {
|
||||
return slaShortener;
|
||||
}
|
||||
public static boolean isSpawntimeNotShortened() {
|
||||
return shortSpawntime;
|
||||
}
|
||||
public static String getChatMacro() {
|
||||
return chatMacro;
|
||||
}
|
||||
|
|
|
@ -80,11 +80,12 @@ public class RenderGameOverlayHandler {
|
|||
int color = 0xFFFF55;
|
||||
|
||||
for (byte waveTime: waveTimes) {
|
||||
int clonedColor = color;
|
||||
final short waveTicks = (short) ((waveTime * 20)-rl);
|
||||
|
||||
if (roundTicks>waveTicks) {
|
||||
heightIndex++;
|
||||
continue;
|
||||
if (ZombiesUtilsConfig.isSpawntimeNotShortened()) clonedColor = 0x555555;
|
||||
else continue;
|
||||
}
|
||||
|
||||
final String time = getWaveString(waveTicks, heightIndex + 1);
|
||||
|
@ -97,9 +98,9 @@ public class RenderGameOverlayHandler {
|
|||
time,
|
||||
screenWidth - width,
|
||||
screenHeight - fontRenderer.FONT_HEIGHT * (length-heightIndex),
|
||||
color
|
||||
clonedColor
|
||||
);
|
||||
color = 0xAAAAAA;
|
||||
if (clonedColor!=0x555555) color = 0xAAAAAA;
|
||||
heightIndex++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue