!fixup: sif: Make some user/ui preferences configurable

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2024-02-01 15:57:52 +08:00
parent 9603234e29
commit 66459e7a64
3 changed files with 39 additions and 38 deletions
+36 -35
View File
@@ -4,6 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"honoka-chan/config"
"honoka-chan/database"
"honoka-chan/encrypt"
"honoka-chan/model"
@@ -517,7 +518,7 @@ func PlayScore(ctx *gin.Context) {
},
RankInfo: ranks,
CanActivateEffect: true,
ServerTimestamp: int(time.Now().Unix()),
ServerTimestamp: time.Now().Unix(),
},
ReleaseInfo: []any{},
StatusCode: 200,
@@ -573,22 +574,22 @@ func PlayReward(ctx *gin.Context) {
IsHighScore: true,
HiScore: totalScore,
BaseRewardInfo: model.BaseRewardInfo{
PlayerExp: 830,
PlayerExp: 0,
PlayerExpUnitMax: model.PlayerExpUnitMax{
Before: 900,
After: 900,
Before: 0,
After: 0,
},
PlayerExpFriendMax: model.PlayerExpFriendMax{
Before: 99,
After: 99,
},
PlayerExpLpMax: model.PlayerExpLpMax{
Before: 417,
After: 417,
Before: config.Conf.UserPrefs.EnergyMax,
After: config.Conf.UserPrefs.EnergyMax,
},
GameCoin: 4500,
GameCoin: 0,
GameCoinRewardBoxFlag: false,
SocialPoint: 10,
SocialPoint: 0,
},
RewardUnitList: model.RewardUnitList{
LiveClear: []model.LiveClear{},
@@ -602,57 +603,57 @@ func PlayReward(ctx *gin.Context) {
LimitedEffortBox: []any{},
UnitList: unitsList,
BeforeUserInfo: model.BeforeUserInfo{
Level: 1028,
Exp: 28823566,
PreviousExp: 27734700,
NextExp: 28941885,
GameCoin: 86505544,
SnsCoin: 49,
FreeSnsCoin: 48,
PaidSnsCoin: 1,
Level: config.Conf.UserPrefs.Level,
Exp: config.Conf.UserPrefs.ExpNumerator,
PreviousExp: 0,
NextExp: config.Conf.UserPrefs.ExpDenominator,
GameCoin: config.Conf.UserPrefs.GameCoin,
SnsCoin: config.Conf.UserPrefs.SnsCoin,
FreeSnsCoin: config.Conf.UserPrefs.SnsCoin,
PaidSnsCoin: 0,
SocialPoint: 1438165,
UnitMax: 5000,
WaitingUnitMax: 1000,
CurrentEnergy: 392,
EnergyMax: 417,
CurrentEnergy: config.Conf.UserPrefs.EnergyMax,
EnergyMax: config.Conf.UserPrefs.EnergyMax,
TrainingEnergy: 9,
TrainingEnergyMax: 10,
EnergyFullTime: "2023-03-20 01:28:55",
LicenseLiveEnergyRecoverlyTime: 60,
FriendMax: 99,
TutorialState: -1,
OverMaxEnergy: 0,
OverMaxEnergy: config.Conf.UserPrefs.OverMaxEnergy,
UnlockRandomLiveMuse: 1,
UnlockRandomLiveAqours: 1,
},
AfterUserInfo: model.AfterUserInfo{
Level: 1028,
Exp: 28824396,
PreviousExp: 27734700,
NextExp: 28941885,
GameCoin: 86520044,
SnsCoin: 50,
FreeSnsCoin: 49,
PaidSnsCoin: 1,
Level: config.Conf.UserPrefs.Level,
Exp: config.Conf.UserPrefs.ExpNumerator,
PreviousExp: 0,
NextExp: config.Conf.UserPrefs.ExpDenominator,
GameCoin: config.Conf.UserPrefs.GameCoin,
SnsCoin: config.Conf.UserPrefs.SnsCoin,
FreeSnsCoin: config.Conf.UserPrefs.SnsCoin,
PaidSnsCoin: 0,
SocialPoint: 1438375,
UnitMax: 5000,
WaitingUnitMax: 1000,
CurrentEnergy: 392,
EnergyMax: 417,
CurrentEnergy: config.Conf.UserPrefs.EnergyMax,
EnergyMax: config.Conf.UserPrefs.EnergyMax,
TrainingEnergy: 9,
TrainingEnergyMax: 10,
EnergyFullTime: "2023-03-20 01:28:55",
LicenseLiveEnergyRecoverlyTime: 60,
FriendMax: 99,
TutorialState: -1,
OverMaxEnergy: 0,
OverMaxEnergy: config.Conf.UserPrefs.OverMaxEnergy,
UnlockRandomLiveMuse: 1,
UnlockRandomLiveAqours: 1,
},
NextLevelInfo: []model.NextLevelInfo{
{
Level: 1028,
FromExp: 28823566,
Level: config.Conf.UserPrefs.Level,
FromExp: config.Conf.UserPrefs.ExpNumerator,
},
},
GoalAccompInfo: model.GoalAccompInfo{
@@ -675,12 +676,12 @@ func PlayReward(ctx *gin.Context) {
IsVisible: true,
},
AccomplishedAchievementList: []model.AccomplishedAchievementList{},
UnaccomplishedAchievementCnt: 15,
UnaccomplishedAchievementCnt: 0,
AddedAchievementList: []any{},
MuseumInfo: model.Museum{},
UnitSupportList: []model.RewardUnitSupportList{},
ServerTimestamp: 1679238066,
PresentCnt: 2159,
ServerTimestamp: time.Now().Unix(),
PresentCnt: 0,
},
ReleaseInfo: []any{},
StatusCode: 200,