0.6.0.34 - Support for custom song unlockable text, no longer display ??? as unlockable message for Epic rarity assets
- Support for custom song unlockable text - No longer display "???" as unlockable message for Epic rarity assets
This commit is contained in:
parent
76303955b8
commit
1d154683a2
Binary file not shown.
@ -40,6 +40,7 @@ internal class DBSongUnlockables : CSavableT<Dictionary<string, SongUnlockable>>
|
|||||||
su.unlockConditions.Values = JsonConvert.DeserializeObject<int[]>((string)reader["UnlockValues"]) ?? new int[] { 0 };
|
su.unlockConditions.Values = JsonConvert.DeserializeObject<int[]>((string)reader["UnlockValues"]) ?? new int[] { 0 };
|
||||||
su.unlockConditions.Type = (string)reader["UnlockType"];
|
su.unlockConditions.Type = (string)reader["UnlockType"];
|
||||||
su.unlockConditions.Reference = JsonConvert.DeserializeObject<string[]>((string)reader["UnlockReferences"]) ?? new string[] { "" };
|
su.unlockConditions.Reference = JsonConvert.DeserializeObject<string[]>((string)reader["UnlockReferences"]) ?? new string[] { "" };
|
||||||
|
su.customUnlockText = JsonConvert.DeserializeObject<CLocalizationData>((string)reader["CustomUnlockText"]) ?? new CLocalizationData();
|
||||||
|
|
||||||
data[((string)reader["SongUniqueId"])] = su;
|
data[((string)reader["SongUniqueId"])] = su;
|
||||||
}
|
}
|
||||||
@ -56,6 +57,13 @@ internal class DBSongUnlockables : CSavableT<Dictionary<string, SongUnlockable>>
|
|||||||
|
|
||||||
[JsonProperty("UnlockCondition")]
|
[JsonProperty("UnlockCondition")]
|
||||||
public DBUnlockables.CUnlockConditions unlockConditions;
|
public DBUnlockables.CUnlockConditions unlockConditions;
|
||||||
|
|
||||||
|
[JsonProperty("CustomUnlockText")]
|
||||||
|
public CLocalizationData customUnlockText;
|
||||||
|
|
||||||
|
public string GetUnlockMessage() {
|
||||||
|
return customUnlockText.GetString(unlockConditions.tConditionMessage(DBUnlockables.CUnlockConditions.EScreen.SongSelect));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tGetUnlockedItems(int _player, ModalQueue mq) {
|
public void tGetUnlockedItems(int _player, ModalQueue mq) {
|
||||||
|
@ -2069,7 +2069,7 @@ internal class CActSelect曲リスト : CActivity {
|
|||||||
var searchType = TitleTextureKey.ResolveTitleTexture(searchTypeKey);
|
var searchType = TitleTextureKey.ResolveTitleTexture(searchTypeKey);
|
||||||
var searchText = TitleTextureKey.ResolveTitleTexture(searchTextKey);
|
var searchText = TitleTextureKey.ResolveTitleTexture(searchTextKey);
|
||||||
|
|
||||||
searchType?.tUpdateColor4(_contextVars[0] != 0 ? new Color4(0.5f, 0.5f, 0.5f, 1.0f) : new Color4(1.0f, 1.0f ,1.0f ,1.0f));
|
searchType?.tUpdateColor4(_contextVars[0] != 0 ? new Color4(0.5f, 0.5f, 0.5f, 1.0f) : new Color4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||||
searchText?.tUpdateColor4(_contextVars[0] != 1 ? new Color4(0.5f, 0.5f, 0.5f, 1.0f) : new Color4(1.0f, 1.0f, 1.0f, 1.0f));
|
searchText?.tUpdateColor4(_contextVars[0] != 1 ? new Color4(0.5f, 0.5f, 0.5f, 1.0f) : new Color4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||||
|
|
||||||
if (_contextVars[0] == 0)
|
if (_contextVars[0] == 0)
|
||||||
@ -2139,23 +2139,20 @@ internal class CActSelect曲リスト : CActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else if (emc == eMenuContext.SearchByText) {
|
||||||
else if (emc == eMenuContext.SearchByText) {
|
|
||||||
|
|
||||||
if (_contextVars[0] == 0) {
|
if (_contextVars[0] == 0) {
|
||||||
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
||||||
_contextVars[0]++;
|
_contextVars[0]++;
|
||||||
}
|
} else if (_contextVars[0] == 1
|
||||||
else if (_contextVars[0] == 1
|
&& !string.IsNullOrWhiteSpace(searchTextInput.Text)
|
||||||
&& !string.IsNullOrWhiteSpace(searchTextInput.Text)
|
&& OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return)) {
|
||||||
&& OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return)) {
|
|
||||||
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
||||||
_contextVars[0]++;
|
_contextVars[0]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_contextVars[0] >= 2) return true;
|
if (_contextVars[0] >= 2) return true;
|
||||||
}
|
} else if (emc == eMenuContext.Random) {
|
||||||
else if (emc == eMenuContext.Random) {
|
|
||||||
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
||||||
|
|
||||||
_contextVars[5]++;
|
_contextVars[5]++;
|
||||||
@ -2183,14 +2180,12 @@ internal class CActSelect曲リスト : CActivity {
|
|||||||
// Clamp values
|
// Clamp values
|
||||||
_contextVars[0] = Math.Max(0, Math.Min((int)Difficulty.Oni, _contextVars[0]));
|
_contextVars[0] = Math.Max(0, Math.Min((int)Difficulty.Oni, _contextVars[0]));
|
||||||
_contextVars[1] = Math.Max(1, Math.Min(13, _contextVars[1]));
|
_contextVars[1] = Math.Max(1, Math.Min(13, _contextVars[1]));
|
||||||
}
|
} else if (emc == eMenuContext.SearchByText) {
|
||||||
else if (emc == eMenuContext.SearchByText) {
|
|
||||||
if (_contextVars[0] == 0) {
|
if (_contextVars[0] == 0) {
|
||||||
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
||||||
_contextVars[1] = Math.Max(--_contextVars[1], 0);
|
_contextVars[1] = Math.Max(--_contextVars[1], 0);
|
||||||
}
|
}
|
||||||
}
|
} else if (emc == eMenuContext.Random) {
|
||||||
else if (emc == eMenuContext.Random) {
|
|
||||||
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
||||||
|
|
||||||
_contextVars[_contextVars[5]]--;
|
_contextVars[_contextVars[5]]--;
|
||||||
@ -2212,14 +2207,12 @@ internal class CActSelect曲リスト : CActivity {
|
|||||||
// Clamp values
|
// Clamp values
|
||||||
_contextVars[0] = Math.Max(0, Math.Min((int)Difficulty.Oni, _contextVars[0]));
|
_contextVars[0] = Math.Max(0, Math.Min((int)Difficulty.Oni, _contextVars[0]));
|
||||||
_contextVars[1] = Math.Max(1, Math.Min(13, _contextVars[1]));
|
_contextVars[1] = Math.Max(1, Math.Min(13, _contextVars[1]));
|
||||||
}
|
} else if (emc == eMenuContext.SearchByText) {
|
||||||
else if (emc == eMenuContext.SearchByText) {
|
|
||||||
if (_contextVars[0] == 0) {
|
if (_contextVars[0] == 0) {
|
||||||
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
||||||
_contextVars[1] = Math.Min(++_contextVars[1], 2);
|
_contextVars[1] = Math.Min(++_contextVars[1], 2);
|
||||||
}
|
}
|
||||||
}
|
} else if (emc == eMenuContext.Random) {
|
||||||
else if (emc == eMenuContext.Random) {
|
|
||||||
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
||||||
|
|
||||||
_contextVars[_contextVars[5]]++;
|
_contextVars[_contextVars[5]]++;
|
||||||
@ -2636,10 +2629,7 @@ internal class CActSelect曲リスト : CActivity {
|
|||||||
if (IsSongLocked) {
|
if (IsSongLocked) {
|
||||||
var SongUnlockable = OpenTaiko.Databases.DBSongUnlockables.tGetUnlockableByUniqueId(rCurrentlySelectedSong);
|
var SongUnlockable = OpenTaiko.Databases.DBSongUnlockables.tGetUnlockableByUniqueId(rCurrentlySelectedSong);
|
||||||
if (SongUnlockable != null) {
|
if (SongUnlockable != null) {
|
||||||
string _cond = "???";
|
string _cond = SongUnlockable.GetUnlockMessage();
|
||||||
if (HRarity.tRarityToModalInt(SongUnlockable.rarity)
|
|
||||||
< HRarity.tRarityToModalInt("Epic"))
|
|
||||||
_cond = SongUnlockable.unlockConditions.tConditionMessage(DBUnlockables.CUnlockConditions.EScreen.SongSelect);
|
|
||||||
this.ttkNowUnlockConditionText = new TitleTextureKey(_cond, this.pfBoxText, Color.White, Color.Black, 1000);
|
this.ttkNowUnlockConditionText = new TitleTextureKey(_cond, this.pfBoxText, Color.White, Color.Black, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -557,10 +557,8 @@ class CStageHeya : CStage {
|
|||||||
if (this.tMove(-1)) {
|
if (this.tMove(-1)) {
|
||||||
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
OpenTaiko.Skin.soundChangeSFX.tPlay();
|
||||||
}
|
}
|
||||||
}
|
} else if (iCurrentMenu != CurrentMenu.Name && (OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return) ||
|
||||||
else if (iCurrentMenu != CurrentMenu.Name && (OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return) ||
|
OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.Decide))) {
|
||||||
OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.Decide)))
|
|
||||||
{
|
|
||||||
|
|
||||||
#region [Decide]
|
#region [Decide]
|
||||||
|
|
||||||
@ -578,8 +576,7 @@ class CStageHeya : CStage {
|
|||||||
if (iCurrentMenu == CurrentMenu.Puchi) {
|
if (iCurrentMenu == CurrentMenu.Puchi) {
|
||||||
this.tUpdateUnlockableTextChara();
|
this.tUpdateUnlockableTextChara();
|
||||||
this.tUpdateUnlockableTextPuchi();
|
this.tUpdateUnlockableTextPuchi();
|
||||||
}
|
} else if (iCurrentMenu == CurrentMenu.Name) {
|
||||||
else if (iCurrentMenu == CurrentMenu.Name) {
|
|
||||||
textInput.Text = OpenTaiko.SaveFileInstances[iPlayer].data.Name;
|
textInput.Text = OpenTaiko.SaveFileInstances[iPlayer].data.Name;
|
||||||
}
|
}
|
||||||
} else if (iCurrentMenu == CurrentMenu.Puchi) {
|
} else if (iCurrentMenu == CurrentMenu.Puchi) {
|
||||||
@ -688,10 +685,8 @@ class CStageHeya : CStage {
|
|||||||
OpenTaiko.Skin.SoundBanapas.tPlay(); // To change with a more appropriate sfx sooner or later
|
OpenTaiko.Skin.SoundBanapas.tPlay(); // To change with a more appropriate sfx sooner or later
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
} else if (iCurrentMenu != CurrentMenu.Name && (OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape) ||
|
||||||
else if (iCurrentMenu != CurrentMenu.Name && (OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape) ||
|
OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.Cancel))) {
|
||||||
OpenTaiko.Pad.bPressed(EInstrumentPad.Drums, EPad.Cancel)))
|
|
||||||
{
|
|
||||||
|
|
||||||
OpenTaiko.Skin.soundCancelSFX.tPlay();
|
OpenTaiko.Skin.soundCancelSFX.tPlay();
|
||||||
|
|
||||||
@ -708,8 +703,7 @@ class CStageHeya : CStage {
|
|||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else if (iCurrentMenu == CurrentMenu.Name && OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return)) {
|
||||||
else if (iCurrentMenu == CurrentMenu.Name && OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Return)) {
|
|
||||||
OpenTaiko.SaveFileInstances[iPlayer].data.Name = textInput.Text;
|
OpenTaiko.SaveFileInstances[iPlayer].data.Name = textInput.Text;
|
||||||
OpenTaiko.SaveFileInstances[iPlayer].tApplyHeyaChanges();
|
OpenTaiko.SaveFileInstances[iPlayer].tApplyHeyaChanges();
|
||||||
OpenTaiko.NamePlate.tNamePlateRefreshTitles(iPlayer);
|
OpenTaiko.NamePlate.tNamePlateRefreshTitles(iPlayer);
|
||||||
@ -718,8 +712,7 @@ class CStageHeya : CStage {
|
|||||||
this.tResetOpts();
|
this.tResetOpts();
|
||||||
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
OpenTaiko.Skin.soundDecideSFX.tPlay();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else if (iCurrentMenu == CurrentMenu.Name && OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape)) {
|
||||||
else if (iCurrentMenu == CurrentMenu.Name && OpenTaiko.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape)) {
|
|
||||||
OpenTaiko.Skin.soundCancelSFX.tPlay();
|
OpenTaiko.Skin.soundCancelSFX.tPlay();
|
||||||
iCurrentMenu = CurrentMenu.ReturnToMenu;
|
iCurrentMenu = CurrentMenu.ReturnToMenu;
|
||||||
this.ttkInfoSection = null;
|
this.ttkInfoSection = null;
|
||||||
@ -889,10 +882,7 @@ class CStageHeya : CStage {
|
|||||||
|
|
||||||
if (OpenTaiko.Tx.Characters[iCharacterCurrent].unlock != null
|
if (OpenTaiko.Tx.Characters[iCharacterCurrent].unlock != null
|
||||||
&& !OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedCharacters.Contains(OpenTaiko.Skin.Characters_DirName[iCharacterCurrent])) {
|
&& !OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedCharacters.Contains(OpenTaiko.Skin.Characters_DirName[iCharacterCurrent])) {
|
||||||
string _cond = "???";
|
string _cond = OpenTaiko.Tx.Characters[iCharacterCurrent].unlock.tConditionMessage();
|
||||||
if (HRarity.tRarityToModalInt(OpenTaiko.Tx.Characters[iCharacterCurrent].metadata.Rarity)
|
|
||||||
< HRarity.tRarityToModalInt("Epic"))
|
|
||||||
_cond = OpenTaiko.Tx.Characters[iCharacterCurrent].unlock.tConditionMessage();
|
|
||||||
this.ttkInfoSection = new TitleTextureKey(_cond, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
this.ttkInfoSection = new TitleTextureKey(_cond, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
||||||
} else
|
} else
|
||||||
this.ttkInfoSection = null;
|
this.ttkInfoSection = null;
|
||||||
@ -929,10 +919,7 @@ class CStageHeya : CStage {
|
|||||||
|
|
||||||
if (OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock != null
|
if (OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock != null
|
||||||
&& !OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Contains(OpenTaiko.Skin.Puchicharas_Name[iPuchiCharaCurrent])) {
|
&& !OpenTaiko.SaveFileInstances[iPlayer].data.UnlockedPuchicharas.Contains(OpenTaiko.Skin.Puchicharas_Name[iPuchiCharaCurrent])) {
|
||||||
string _cond = "???";
|
string _cond = OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock.tConditionMessage();
|
||||||
if (HRarity.tRarityToModalInt(OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].metadata.Rarity)
|
|
||||||
< HRarity.tRarityToModalInt("Epic"))
|
|
||||||
_cond = OpenTaiko.Tx.Puchichara[iPuchiCharaCurrent].unlock.tConditionMessage();
|
|
||||||
this.ttkInfoSection = new TitleTextureKey(_cond, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
this.ttkInfoSection = new TitleTextureKey(_cond, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
||||||
} else
|
} else
|
||||||
this.ttkInfoSection = null;
|
this.ttkInfoSection = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user