mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-12 12:24:35 +01:00
Fix story red dot (untested)
This commit is contained in:
@@ -821,7 +821,7 @@ public class Player implements GameDatabaseObject {
|
||||
|
||||
// Set player states
|
||||
var state = proto.getMutableState()
|
||||
.setStorySet(true)
|
||||
.setStorySet(this.getStoryManager().hasNew())
|
||||
.setFriend(this.getFriendList().hasPendingRequests());
|
||||
|
||||
state.getMutableMail()
|
||||
|
||||
@@ -39,6 +39,18 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
||||
this.save();
|
||||
}
|
||||
|
||||
public boolean hasNew() {
|
||||
if (this.getCompletedStories().size() < GameData.getStoryDataTable().size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.getCompletedSets().size() < GameData.getStorySetSectionDataTable().size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public PlayerChangeInfo settle(IntList list) {
|
||||
// Player change info
|
||||
var changes = new PlayerChangeInfo();
|
||||
@@ -63,6 +75,7 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
||||
Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "completedStories", id);
|
||||
}
|
||||
|
||||
// Complete
|
||||
return changes;
|
||||
}
|
||||
|
||||
@@ -90,6 +103,7 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
||||
// Save to db
|
||||
Nebula.getGameDatabase().update(this, this.getPlayerUid(), "completedSets." + chapterId, sectionIndex);
|
||||
|
||||
// Complete
|
||||
return changes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user