!fixup: sif: Make some user/ui preferences configurable
Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
+36
-35
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/model"
|
"honoka-chan/model"
|
||||||
@@ -517,7 +518,7 @@ func PlayScore(ctx *gin.Context) {
|
|||||||
},
|
},
|
||||||
RankInfo: ranks,
|
RankInfo: ranks,
|
||||||
CanActivateEffect: true,
|
CanActivateEffect: true,
|
||||||
ServerTimestamp: int(time.Now().Unix()),
|
ServerTimestamp: time.Now().Unix(),
|
||||||
},
|
},
|
||||||
ReleaseInfo: []any{},
|
ReleaseInfo: []any{},
|
||||||
StatusCode: 200,
|
StatusCode: 200,
|
||||||
@@ -573,22 +574,22 @@ func PlayReward(ctx *gin.Context) {
|
|||||||
IsHighScore: true,
|
IsHighScore: true,
|
||||||
HiScore: totalScore,
|
HiScore: totalScore,
|
||||||
BaseRewardInfo: model.BaseRewardInfo{
|
BaseRewardInfo: model.BaseRewardInfo{
|
||||||
PlayerExp: 830,
|
PlayerExp: 0,
|
||||||
PlayerExpUnitMax: model.PlayerExpUnitMax{
|
PlayerExpUnitMax: model.PlayerExpUnitMax{
|
||||||
Before: 900,
|
Before: 0,
|
||||||
After: 900,
|
After: 0,
|
||||||
},
|
},
|
||||||
PlayerExpFriendMax: model.PlayerExpFriendMax{
|
PlayerExpFriendMax: model.PlayerExpFriendMax{
|
||||||
Before: 99,
|
Before: 99,
|
||||||
After: 99,
|
After: 99,
|
||||||
},
|
},
|
||||||
PlayerExpLpMax: model.PlayerExpLpMax{
|
PlayerExpLpMax: model.PlayerExpLpMax{
|
||||||
Before: 417,
|
Before: config.Conf.UserPrefs.EnergyMax,
|
||||||
After: 417,
|
After: config.Conf.UserPrefs.EnergyMax,
|
||||||
},
|
},
|
||||||
GameCoin: 4500,
|
GameCoin: 0,
|
||||||
GameCoinRewardBoxFlag: false,
|
GameCoinRewardBoxFlag: false,
|
||||||
SocialPoint: 10,
|
SocialPoint: 0,
|
||||||
},
|
},
|
||||||
RewardUnitList: model.RewardUnitList{
|
RewardUnitList: model.RewardUnitList{
|
||||||
LiveClear: []model.LiveClear{},
|
LiveClear: []model.LiveClear{},
|
||||||
@@ -602,57 +603,57 @@ func PlayReward(ctx *gin.Context) {
|
|||||||
LimitedEffortBox: []any{},
|
LimitedEffortBox: []any{},
|
||||||
UnitList: unitsList,
|
UnitList: unitsList,
|
||||||
BeforeUserInfo: model.BeforeUserInfo{
|
BeforeUserInfo: model.BeforeUserInfo{
|
||||||
Level: 1028,
|
Level: config.Conf.UserPrefs.Level,
|
||||||
Exp: 28823566,
|
Exp: config.Conf.UserPrefs.ExpNumerator,
|
||||||
PreviousExp: 27734700,
|
PreviousExp: 0,
|
||||||
NextExp: 28941885,
|
NextExp: config.Conf.UserPrefs.ExpDenominator,
|
||||||
GameCoin: 86505544,
|
GameCoin: config.Conf.UserPrefs.GameCoin,
|
||||||
SnsCoin: 49,
|
SnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
FreeSnsCoin: 48,
|
FreeSnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
PaidSnsCoin: 1,
|
PaidSnsCoin: 0,
|
||||||
SocialPoint: 1438165,
|
SocialPoint: 1438165,
|
||||||
UnitMax: 5000,
|
UnitMax: 5000,
|
||||||
WaitingUnitMax: 1000,
|
WaitingUnitMax: 1000,
|
||||||
CurrentEnergy: 392,
|
CurrentEnergy: config.Conf.UserPrefs.EnergyMax,
|
||||||
EnergyMax: 417,
|
EnergyMax: config.Conf.UserPrefs.EnergyMax,
|
||||||
TrainingEnergy: 9,
|
TrainingEnergy: 9,
|
||||||
TrainingEnergyMax: 10,
|
TrainingEnergyMax: 10,
|
||||||
EnergyFullTime: "2023-03-20 01:28:55",
|
EnergyFullTime: "2023-03-20 01:28:55",
|
||||||
LicenseLiveEnergyRecoverlyTime: 60,
|
LicenseLiveEnergyRecoverlyTime: 60,
|
||||||
FriendMax: 99,
|
FriendMax: 99,
|
||||||
TutorialState: -1,
|
TutorialState: -1,
|
||||||
OverMaxEnergy: 0,
|
OverMaxEnergy: config.Conf.UserPrefs.OverMaxEnergy,
|
||||||
UnlockRandomLiveMuse: 1,
|
UnlockRandomLiveMuse: 1,
|
||||||
UnlockRandomLiveAqours: 1,
|
UnlockRandomLiveAqours: 1,
|
||||||
},
|
},
|
||||||
AfterUserInfo: model.AfterUserInfo{
|
AfterUserInfo: model.AfterUserInfo{
|
||||||
Level: 1028,
|
Level: config.Conf.UserPrefs.Level,
|
||||||
Exp: 28824396,
|
Exp: config.Conf.UserPrefs.ExpNumerator,
|
||||||
PreviousExp: 27734700,
|
PreviousExp: 0,
|
||||||
NextExp: 28941885,
|
NextExp: config.Conf.UserPrefs.ExpDenominator,
|
||||||
GameCoin: 86520044,
|
GameCoin: config.Conf.UserPrefs.GameCoin,
|
||||||
SnsCoin: 50,
|
SnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
FreeSnsCoin: 49,
|
FreeSnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
PaidSnsCoin: 1,
|
PaidSnsCoin: 0,
|
||||||
SocialPoint: 1438375,
|
SocialPoint: 1438375,
|
||||||
UnitMax: 5000,
|
UnitMax: 5000,
|
||||||
WaitingUnitMax: 1000,
|
WaitingUnitMax: 1000,
|
||||||
CurrentEnergy: 392,
|
CurrentEnergy: config.Conf.UserPrefs.EnergyMax,
|
||||||
EnergyMax: 417,
|
EnergyMax: config.Conf.UserPrefs.EnergyMax,
|
||||||
TrainingEnergy: 9,
|
TrainingEnergy: 9,
|
||||||
TrainingEnergyMax: 10,
|
TrainingEnergyMax: 10,
|
||||||
EnergyFullTime: "2023-03-20 01:28:55",
|
EnergyFullTime: "2023-03-20 01:28:55",
|
||||||
LicenseLiveEnergyRecoverlyTime: 60,
|
LicenseLiveEnergyRecoverlyTime: 60,
|
||||||
FriendMax: 99,
|
FriendMax: 99,
|
||||||
TutorialState: -1,
|
TutorialState: -1,
|
||||||
OverMaxEnergy: 0,
|
OverMaxEnergy: config.Conf.UserPrefs.OverMaxEnergy,
|
||||||
UnlockRandomLiveMuse: 1,
|
UnlockRandomLiveMuse: 1,
|
||||||
UnlockRandomLiveAqours: 1,
|
UnlockRandomLiveAqours: 1,
|
||||||
},
|
},
|
||||||
NextLevelInfo: []model.NextLevelInfo{
|
NextLevelInfo: []model.NextLevelInfo{
|
||||||
{
|
{
|
||||||
Level: 1028,
|
Level: config.Conf.UserPrefs.Level,
|
||||||
FromExp: 28823566,
|
FromExp: config.Conf.UserPrefs.ExpNumerator,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
GoalAccompInfo: model.GoalAccompInfo{
|
GoalAccompInfo: model.GoalAccompInfo{
|
||||||
@@ -675,12 +676,12 @@ func PlayReward(ctx *gin.Context) {
|
|||||||
IsVisible: true,
|
IsVisible: true,
|
||||||
},
|
},
|
||||||
AccomplishedAchievementList: []model.AccomplishedAchievementList{},
|
AccomplishedAchievementList: []model.AccomplishedAchievementList{},
|
||||||
UnaccomplishedAchievementCnt: 15,
|
UnaccomplishedAchievementCnt: 0,
|
||||||
AddedAchievementList: []any{},
|
AddedAchievementList: []any{},
|
||||||
MuseumInfo: model.Museum{},
|
MuseumInfo: model.Museum{},
|
||||||
UnitSupportList: []model.RewardUnitSupportList{},
|
UnitSupportList: []model.RewardUnitSupportList{},
|
||||||
ServerTimestamp: 1679238066,
|
ServerTimestamp: time.Now().Unix(),
|
||||||
PresentCnt: 2159,
|
PresentCnt: 0,
|
||||||
},
|
},
|
||||||
ReleaseInfo: []any{},
|
ReleaseInfo: []any{},
|
||||||
StatusCode: 200,
|
StatusCode: 200,
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ func UserInfo(ctx *gin.Context) {
|
|||||||
NextExp: config.Conf.UserPrefs.ExpDenominator,
|
NextExp: config.Conf.UserPrefs.ExpDenominator,
|
||||||
GameCoin: config.Conf.UserPrefs.GameCoin,
|
GameCoin: config.Conf.UserPrefs.GameCoin,
|
||||||
SnsCoin: config.Conf.UserPrefs.SnsCoin,
|
SnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
FreeSnsCoin: 0,
|
FreeSnsCoin: config.Conf.UserPrefs.SnsCoin,
|
||||||
PaidSnsCoin: 0,
|
PaidSnsCoin: 0,
|
||||||
SocialPoint: 1438395,
|
SocialPoint: 1438395,
|
||||||
UnitMax: 5000,
|
UnitMax: 5000,
|
||||||
|
|||||||
+2
-2
@@ -240,7 +240,7 @@ type PlayScoreRes struct {
|
|||||||
Off Off `json:"off"`
|
Off Off `json:"off"`
|
||||||
RankInfo []RankInfo `json:"rank_info"`
|
RankInfo []RankInfo `json:"rank_info"`
|
||||||
CanActivateEffect bool `json:"can_activate_effect"`
|
CanActivateEffect bool `json:"can_activate_effect"`
|
||||||
ServerTimestamp int `json:"server_timestamp"`
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PlayScoreResp ...
|
// PlayScoreResp ...
|
||||||
@@ -617,7 +617,7 @@ type RewardRes struct {
|
|||||||
AddedAchievementList []any `json:"added_achievement_list"`
|
AddedAchievementList []any `json:"added_achievement_list"`
|
||||||
MuseumInfo Museum `json:"museum_info"`
|
MuseumInfo Museum `json:"museum_info"`
|
||||||
UnitSupportList []RewardUnitSupportList `json:"unit_support_list"`
|
UnitSupportList []RewardUnitSupportList `json:"unit_support_list"`
|
||||||
ServerTimestamp int `json:"server_timestamp"`
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
PresentCnt int `json:"present_cnt"`
|
PresentCnt int `json:"present_cnt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user