Revert "Avoid progression lockout if deco parts are unintentionally force unlocked and updated in the achivements table for pop'n Unilab and pop'n Kaimei Riddles"

This reverts commit 56068edf37.
This commit is contained in:
tyam 2025-01-20 21:10:05 -06:00
parent 56068edf37
commit 398188189c
2 changed files with 55 additions and 59 deletions

View File

@ -444,7 +444,6 @@ class PopnMusicKaimei(PopnMusicModernBase):
def unformat_profile(self, userid: UserID, request: Node, oldprofile: Profile) -> Profile:
newprofile = super().unformat_profile(userid, request, oldprofile)
game_config = self.get_game_config()
account = request.child("account")
if account is not None:
newprofile.replace_int("card_again_count", account.child_value("card_again_count"))
@ -476,21 +475,20 @@ class PopnMusicKaimei(PopnMusicModernBase):
elif playedRiddle == riddle_id:
select_count += 1
if not game_config.get_bool("force_unlock_deco"):
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
riddle_id,
"riddle",
{
"kaimei_gauge": kaimei_gauge,
"is_cleared": is_cleared,
"riddles_cleared": riddles_cleared,
"select_count": select_count,
"other_count": other_count,
},
)
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
riddle_id,
"riddle",
{
"kaimei_gauge": kaimei_gauge,
"is_cleared": is_cleared,
"riddles_cleared": riddles_cleared,
"select_count": select_count,
"other_count": other_count,
},
)
riddle_id += 1

View File

@ -535,7 +535,6 @@ class PopnMusicUnilab(PopnMusicModernBase):
def unformat_profile(self, userid: UserID, request: Node, oldprofile: Profile) -> Profile:
newprofile = super().unformat_profile(userid, request, oldprofile)
game_config = self.get_game_config()
account = request.child("account")
if account is not None:
newprofile.replace_int("card_again_count", account.child_value("card_again_count"))
@ -571,21 +570,21 @@ class PopnMusicUnilab(PopnMusicModernBase):
select_count = 3
elif playedRiddle == riddle_id:
select_count += 1
if not game_config.get_bool("force_unlock_deco"):
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
riddle_id,
"riddle",
{
"kaimei_gauge": kaimei_gauge,
"is_cleared": is_cleared,
"riddles_cleared": riddles_cleared,
"select_count": select_count,
"other_count": other_count,
},
)
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
riddle_id,
"riddle",
{
"kaimei_gauge": kaimei_gauge,
"is_cleared": is_cleared,
"riddles_cleared": riddles_cleared,
"select_count": select_count,
"other_count": other_count,
},
)
riddle_id += 1
# Unilab event
@ -604,20 +603,19 @@ class PopnMusicUnilab(PopnMusicModernBase):
ex_no = lab_data.child_value("ex_no")
point = lab_data.child_value("point")
is_cleared = lab_data.child_value("is_cleared")
if not game_config.get_bool("force_unlock_deco"):
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
ex_no,
"lab",
{
"team_id": team_id,
"ex_no": ex_no,
"point": point,
"is_cleared": is_cleared,
},
)
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
ex_no,
"lab",
{
"team_id": team_id,
"ex_no": ex_no,
"point": point,
"is_cleared": is_cleared,
},
)
# Extract Kakusei no Elem achievements
battery_data = event_p27.child("battery")
@ -625,18 +623,18 @@ class PopnMusicUnilab(PopnMusicModernBase):
battery_id = battery_data.child_value("battery_id")
energy = battery_data.child_value("energy")
is_cleared = battery_data.child_value("is_cleared")
if not game_config.get_bool("force_unlock_deco"):
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
battery_id,
"battery",
{
"battery_id": battery_id,
"energy": energy,
"is_cleared": is_cleared,
},
)
self.data.local.user.put_achievement(
self.game,
self.version,
userid,
battery_id,
"battery",
{
"battery_id": battery_id,
"energy": energy,
"is_cleared": is_cleared,
},
)
return newprofile