SteamWar/BauSystem2.0
Archiviert
12
0

Reintroduced id return on trace recording start
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
D4rkr34lm 2024-03-02 22:18:04 +01:00
Ursprung 6ec62d9720
Commit 4620e83a82
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -111,11 +111,12 @@ public class Recorder implements Listener {
*
* @param region region to be recorded
*/
public void startRecording(Region region){
if(activeTraces.containsKey(region)) return;
public int startRecording(Region region){
if(activeTraces.containsKey(region)) return -1;
if(autoTraceRegions.contains(region)) noTntRecordedCounter.put(region, 0);
Trace trace = new Trace(region);
activeTraces.put(region, trace);
return manager.add(trace);
}
/** Stops the recording at the given region

Datei anzeigen

@ -56,12 +56,14 @@ public class TraceManager implements Listener {
/** Adds a new trace to the global record
*
* @param trace Trace to be added
* @return id of the created trace
*/
protected void add(Trace trace){
protected int add(Trace trace){
for(Player player: viewFlagMap.keySet())
trace.render(player, viewFlagMap.get(player), bundleFilterMap.get(player));
traces.put(nextOpenId, trace);
nextOpenId++;
return nextOpenId--;
}
/** Removes the trace with the given id