Marker instruction rework

This commit is contained in:
Anuken
2023-09-28 01:04:03 -04:00
parent 68a5ab14be
commit 8bbf5b1f52
18 changed files with 202 additions and 89 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 int varTime, varTick, varSecond, varMinute, varWave, varWaveTime, varServer;
private static int varTime, varTick, varSecond, varMinute, varWave, varWaveTime, varServer, varClient;
private ObjectIntMap<String> namesToIds = new ObjectIntMap<>();
private Seq<Var> vars = new Seq<>(Var.class);
@@ -57,6 +57,7 @@ public class GlobalVars{
varWaveTime = put("@waveTime", 0);
varServer = put("@server", 0);
varClient = put("@server", 0);
//special enums
put("@ctrlProcessor", ctrlProcessor);
@@ -152,6 +153,7 @@ public class GlobalVars{
//network
vars.items[varServer].numval = (net.server() || !net.active()) ? 1 : 0;
vars.items[varServer].numval = net.client() ? 1 : 0;
}
/** @return a piece of content based on its logic ID. This is not equivalent to content ID. */