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
|
// Set player states
|
||||||
var state = proto.getMutableState()
|
var state = proto.getMutableState()
|
||||||
.setStorySet(true)
|
.setStorySet(this.getStoryManager().hasNew())
|
||||||
.setFriend(this.getFriendList().hasPendingRequests());
|
.setFriend(this.getFriendList().hasPendingRequests());
|
||||||
|
|
||||||
state.getMutableMail()
|
state.getMutableMail()
|
||||||
|
|||||||
@@ -38,6 +38,18 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
|||||||
|
|
||||||
this.save();
|
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) {
|
public PlayerChangeInfo settle(IntList list) {
|
||||||
// Player change info
|
// Player change info
|
||||||
@@ -63,6 +75,7 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
|||||||
Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "completedStories", id);
|
Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "completedStories", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Complete
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,6 +103,7 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject {
|
|||||||
// Save to db
|
// Save to db
|
||||||
Nebula.getGameDatabase().update(this, this.getPlayerUid(), "completedSets." + chapterId, sectionIndex);
|
Nebula.getGameDatabase().update(this, this.getPlayerUid(), "completedSets." + chapterId, sectionIndex);
|
||||||
|
|
||||||
|
// Complete
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user