mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-15 13:54:51 +01:00
Implement tutorial levels
This commit is contained in:
@@ -8,6 +8,7 @@ import dev.morphia.annotations.Id;
|
||||
import emu.nebula.Nebula;
|
||||
import emu.nebula.data.GameData;
|
||||
import emu.nebula.database.GameDatabaseObject;
|
||||
import emu.nebula.game.tutorial.TutorialLevelLog;
|
||||
import emu.nebula.game.vampire.VampireSurvivorLog;
|
||||
import emu.nebula.proto.PlayerData.PlayerInfo;
|
||||
import emu.nebula.proto.Public.CharGemInstance;
|
||||
@@ -48,6 +49,9 @@ public class PlayerProgress extends PlayerManager implements GameDatabaseObject
|
||||
|
||||
// Fate cards
|
||||
private IntSet fateCards;
|
||||
|
||||
// Tutorial
|
||||
private Map<Integer, TutorialLevelLog> tutorialLog;
|
||||
|
||||
@Deprecated // Morphia only
|
||||
public PlayerProgress() {
|
||||
@@ -74,8 +78,13 @@ public class PlayerProgress extends PlayerManager implements GameDatabaseObject
|
||||
// Vampire Survivor
|
||||
this.vampireLog = new HashMap<>();
|
||||
this.vampireTalents = new Bitset();
|
||||
|
||||
// Fate cards
|
||||
this.fateCards = new IntOpenHashSet();
|
||||
|
||||
// Tutorials
|
||||
this.tutorialLog = new HashMap<>();
|
||||
|
||||
// Save to database
|
||||
this.save();
|
||||
}
|
||||
@@ -219,5 +228,10 @@ public class PlayerProgress extends PlayerManager implements GameDatabaseObject
|
||||
vsProto.addRecords(log.toProto());
|
||||
}
|
||||
}
|
||||
|
||||
// Tutorials
|
||||
for (var tutorial : this.getTutorialLog().values()) {
|
||||
proto.addTutorialLevels(tutorial.toProto());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user