1
0
mirror of synced 2024-11-23 23:21:06 +01:00

0.6.0.13 - Unlockables with fulfilled conditions can be obtained directly on the select screen/my room by Decide input

- Unlockables with fulfilled conditions can be obtained directly on the select screen/my room by Decide input
This commit is contained in:
0auBSQ 2024-11-01 19:53:18 +09:00
parent 30f5bdc48b
commit 1d1ebf14ca
4 changed files with 42 additions and 6 deletions

View File

@ -187,6 +187,22 @@ class DBUnlockables {
this.Type = "me";
bool fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
return (fulfiled, CLangManager.LangInstance.GetString(fulfiled ? "UNLOCK_COIN_BOUGHT" : "UNLOCK_COIN_MORE"));
case "ce":
case "tp":
case "ap":
case "aw":
case "sd":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
return (fulfiled, null);
case "dp":
case "lp":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[2]);
return (fulfiled, null);
case "sp":
case "sg":
case "sc":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Reference.Length);
return (fulfiled, null);
default:
return (false, null); // Return the same text if my room
}
@ -239,6 +255,22 @@ class DBUnlockables {
this.Type = "me";
bool fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
return (fulfiled, CLangManager.LangInstance.GetString(fulfiled ? "UNLOCK_COIN_BOUGHT" : "UNLOCK_COIN_MORE"));
case "ce":
case "tp":
case "ap":
case "aw":
case "sd":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
return (fulfiled, null);
case "dp":
case "lp":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[2]);
return (fulfiled, null);
case "sp":
case "sg":
case "sc":
fulfiled = this.tValueRequirementMet(inputValues[0], this.Reference.Length);
return (fulfiled, null);
default:
return (false, null);
}

View File

@ -871,7 +871,8 @@ internal class CStage選曲 : CStage {
"unlocked_songs",
this.rNowSelectedSong?.tGetUniqueId() ?? "" // Can't be null in this context
);
OpenTaiko.SaveFileInstances[OpenTaiko.SaveFile].tSpendCoins(SongToUnlock.unlockConditions.Values[0]);
if (SongToUnlock.unlockConditions.Condition == "cm")
OpenTaiko.SaveFileInstances[OpenTaiko.SaveFile].tSpendCoins(SongToUnlock.unlockConditions.Values[0]);
// Play modal animation here ?
} else
OpenTaiko.Skin.soundError.tPlay();

View File

@ -569,7 +569,8 @@ class CStageHeya : CStage {
//TJAPlayer3.NamePlateConfig.tSpendCoins(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0], iPlayer);
OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Add(OpenTaiko.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
DBSaves.RegisterStringUnlockedAsset(OpenTaiko.SaveFileInstances[iPlayer].data.SaveId, "unlocked_puchicharas", OpenTaiko.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
OpenTaiko.SaveFileInstances[iPlayer].tSpendCoins(OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0]);
if (OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock.Condition == "ch")
OpenTaiko.SaveFileInstances[iPlayer].tSpendCoins(OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0]);
}
} else if (iCurrentMenu == 1) {
@ -597,7 +598,8 @@ class CStageHeya : CStage {
} else if (ess == ESelectStatus.SUCCESS) {
OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedCharacters.Add(OpenTaiko.Skin.Characters_DirName[iCharacterCurrent]);
DBSaves.RegisterStringUnlockedAsset(OpenTaiko.SaveFileInstances[iPlayer].data.SaveId, "unlocked_characters", OpenTaiko.Skin.Characters_DirName[iCharacterCurrent]);
OpenTaiko.SaveFileInstances[iPlayer].tSpendCoins(OpenTaiko.Tx.Characters[iCharacterCurrent].unlock.Values[0]);
if (OpenTaiko.Tx.Characters[iCharacterCurrent].unlock.Condition == "ch")
OpenTaiko.SaveFileInstances[iPlayer].tSpendCoins(OpenTaiko.Tx.Characters[iCharacterCurrent].unlock.Values[0]);
// Play modal animation here ?
}
} else if (iCurrentMenu == 2) {

View File

@ -1,5 +1,4 @@
using System.Drawing;
using DiscordRPC;
using FDK;
namespace OpenTaiko;
@ -254,7 +253,8 @@ class CActNewHeya : CActivity {
//TJAPlayer3.NamePlateConfig.data.UnlockedPuchicharas[iPlayer].Add(TJAPlayer3.Skin.Puchicharas_Name[iPuchiCharaCurrent]);
//TJAPlayer3.NamePlateConfig.tSpendCoins(TJAPlayer3.Tx.Puchichara[iPuchiCharaCurrent].unlock.Values[0], iPlayer);
OpenTaiko.SaveFileInstances[CurrentPlayer].data.UnlockedPuchicharas.Add(OpenTaiko.Skin.Puchicharas_Name[CurrentIndex]);
OpenTaiko.SaveFileInstances[CurrentPlayer].tSpendCoins(OpenTaiko.Tx.Puchichara[CurrentIndex].unlock.Values[0]);
if (OpenTaiko.Tx.Puchichara[CurrentIndex].unlock.Condition == "ch")
OpenTaiko.SaveFileInstances[CurrentPlayer].tSpendCoins(OpenTaiko.Tx.Puchichara[CurrentIndex].unlock.Values[0]);
OpenTaiko.Skin.soundDecideSFX.tPlay();
} else {
OpenTaiko.Skin.soundError.tPlay();
@ -286,7 +286,8 @@ class CActNewHeya : CActivity {
CurrentMode = ModeType.None;
} else if (ess == ESelectStatus.SUCCESS) {
OpenTaiko.SaveFileInstances[CurrentPlayer].data.UnlockedCharacters.Add(OpenTaiko.Skin.Characters_DirName[CurrentIndex]);
OpenTaiko.SaveFileInstances[CurrentPlayer].tSpendCoins(OpenTaiko.Tx.Characters[CurrentIndex].unlock.Values[0]);
if (OpenTaiko.Tx.Characters[CurrentIndex].unlock.Condition == "ch")
OpenTaiko.SaveFileInstances[CurrentPlayer].tSpendCoins(OpenTaiko.Tx.Characters[CurrentIndex].unlock.Values[0]);
OpenTaiko.Skin.soundDecideSFX.tPlay();
} else {
OpenTaiko.Skin.soundError.tPlay();