Better implementation of #10047

This commit is contained in:
Anuken
2024-08-03 00:51:31 -04:00
parent c1309c4701
commit 27f20b7a36
4 changed files with 20 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ public class GlobalVars{
public static final Rand rand = new Rand();
//non-constants that depend on state
private static LVar varTime, varTick, varSecond, varMinute, varWave, varWaveTime, varMapW, varMapH, varServer, varClient, varClientLocale, varClientUnit, varClientName, varClientTeam, varClientMobile;
private static LVar varTime, varTick, varSecond, varMinute, varWave, varWaveTime, varMapW, varMapH, varWait, varServer, varClient, varClientLocale, varClientUnit, varClientName, varClientTeam, varClientMobile;
private ObjectMap<String, LVar> vars = new ObjectMap<>();
private Seq<VarEntry> varEntries = new Seq<>();
@@ -73,6 +73,7 @@ public class GlobalVars{
varMapW = putEntry("@mapw", 0);
varMapH = putEntry("@maph", 0);
varWait = putEntry("@wait", null);
putEntryOnly("sectionNetwork");
@@ -209,6 +210,10 @@ public class GlobalVars{
}
}
public LVar waitVar(){
return varWait;
}
public Seq<VarEntry> getEntries(){
return varEntries;
}