SteamWar/BauSystem2.0
Archiviert
12
0

Temporarily removed trace from lua api
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
D4rkr34lm 2024-03-02 21:35:51 +01:00
Ursprung 8aa0ee4d9d
Commit e4346a36e1

Datei anzeigen

@ -20,9 +20,6 @@
package de.steamwar.bausystem.features.script.lua.libs;
import de.steamwar.bausystem.features.loader.Loader;
import de.steamwar.bausystem.features.tracer.record.ActiveTracer;
import de.steamwar.bausystem.features.tracer.record.AutoTraceRecorder;
import de.steamwar.bausystem.features.tracer.record.Recorder;
import de.steamwar.bausystem.region.GlobalRegion;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.flags.Flag;
@ -71,13 +68,13 @@ public class RegionLib implements LuaLib {
table.set("freeze", getter(() -> region.get().getPlain(Flag.FREEZE, FreezeMode.class) == FreezeMode.ACTIVE));
table.set("protect", getter(() -> region.get().getPlain(Flag.PROTECT, ProtectMode.class) == ProtectMode.ACTIVE));
LuaValue traceLib = LuaValue.tableOf();
traceLib.set("active", getter(() -> !region.get().isGlobal() && Recorder.INSTANCE.get(region.get()) instanceof ActiveTracer));
traceLib.set("auto", getter(() -> !region.get().isGlobal() && Recorder.INSTANCE.get(region.get()) instanceof AutoTraceRecorder));
traceLib.set("status", getter(() -> Recorder.INSTANCE.get(region.get()).scriptState()));
traceLib.set("time", getter(() -> Recorder.INSTANCE.get(region.get()).scriptTime()));
//LuaValue traceLib = LuaValue.tableOf();
//traceLib.set("active", getter(() -> !region.get().isGlobal() && Recorder.INSTANCE.get(region.get()) instanceof ActiveTracer));
//traceLib.set("auto", getter(() -> !region.get().isGlobal() && Recorder.INSTANCE.get(region.get()) instanceof AutoTraceRecorder));
//traceLib.set("status", getter(() -> Recorder.INSTANCE.get(region.get()).scriptState()));
//traceLib.set("time", getter(() -> Recorder.INSTANCE.get(region.get()).scriptTime()));
table.set("trace", traceLib);
//table.set("trace", traceLib);
Loader loader = Loader.getLoader(player);
table.set("loader", getter(() -> loader == null ? "OFF" : loader.getStage().name()));