Display unlocked songs/total songs per folder and localized character/puchichara names
This commit is contained in:
parent
c2af24f737
commit
6dd6f06419
Binary file not shown.
BIN
OpenTaiko/Databases/SongUnlockables.db3
Normal file
BIN
OpenTaiko/Databases/SongUnlockables.db3
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name" : "Template",
|
"name" : {
|
||||||
|
"strings": {
|
||||||
|
"default": "OpenTaiko-Kun",
|
||||||
|
"ja": "OpenTaiko君"
|
||||||
|
}
|
||||||
|
},
|
||||||
"rarity": "Common",
|
"rarity": "Common",
|
||||||
"author": "[Author]",
|
"author": "Komi"
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 23 KiB |
@ -59,15 +59,44 @@ namespace TJAPlayer3
|
|||||||
SpeechText = pcst;
|
SpeechText = pcst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string tGetName()
|
||||||
|
{
|
||||||
|
if (Name is string) return (string)Name;
|
||||||
|
else if (Name is CLocalizationData) return ((CLocalizationData)Name).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string tGetAuthor()
|
||||||
|
{
|
||||||
|
if (Author is string) return (string)Author;
|
||||||
|
else if (Author is CLocalizationData) return ((CLocalizationData)Author).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string tGetDescription()
|
||||||
|
{
|
||||||
|
if (Description is string) return (string)Description;
|
||||||
|
else if (Description is CLocalizationData) return ((CLocalizationData)Description).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name;
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Name;
|
||||||
|
|
||||||
[JsonProperty("rarity")]
|
[JsonProperty("rarity")]
|
||||||
public string Rarity;
|
public string Rarity;
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
[JsonProperty("author")]
|
[JsonProperty("author")]
|
||||||
public string Author;
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Author;
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
|
[JsonProperty("description")]
|
||||||
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Description;
|
||||||
|
|
||||||
[JsonProperty("speechtext")]
|
[JsonProperty("speechtext")]
|
||||||
public CLocalizationData[] SpeechText;
|
public CLocalizationData[] SpeechText;
|
||||||
|
@ -56,15 +56,44 @@ namespace TJAPlayer3
|
|||||||
Author = pca;
|
Author = pca;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string tGetName()
|
||||||
|
{
|
||||||
|
if (Name is string) return (string)Name;
|
||||||
|
else if (Name is CLocalizationData) return ((CLocalizationData)Name).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string tGetAuthor()
|
||||||
|
{
|
||||||
|
if (Author is string) return (string)Author;
|
||||||
|
else if (Author is CLocalizationData) return ((CLocalizationData)Author).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string tGetDescription()
|
||||||
|
{
|
||||||
|
if (Description is string) return (string)Description;
|
||||||
|
else if (Description is CLocalizationData) return ((CLocalizationData)Description).GetString("");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name;
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Name;
|
||||||
|
|
||||||
[JsonProperty("rarity")]
|
[JsonProperty("rarity")]
|
||||||
public string Rarity;
|
public string Rarity;
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
[JsonProperty("author")]
|
[JsonProperty("author")]
|
||||||
public string Author;
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Author;
|
||||||
|
|
||||||
|
// String or CLocalizationData
|
||||||
|
[JsonProperty("description")]
|
||||||
|
[JsonConverter(typeof(LocalizedStringConverter<CLocalizationData>))]
|
||||||
|
public object Description;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,8 @@ namespace TJAPlayer3
|
|||||||
this.Type = "me";
|
this.Type = "me";
|
||||||
bool fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
|
bool fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
|
||||||
return (fulfiled, CLangManager.LangInstance.GetString(90003 + ((fulfiled == false) ? 1 : 0)));
|
return (fulfiled, CLangManager.LangInstance.GetString(90003 + ((fulfiled == false) ? 1 : 0)));
|
||||||
|
default:
|
||||||
|
return (false, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +245,7 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// My Room menu usage, to improve later
|
// My Room menu usage, to improve later
|
||||||
public string tConditionMessage()
|
public string tConditionMessage(EScreen screen = EScreen.MyRoom)
|
||||||
{
|
{
|
||||||
if (RequiredArgCount < 0 && RequiredArgs.ContainsKey(Condition))
|
if (RequiredArgCount < 0 && RequiredArgs.ContainsKey(Condition))
|
||||||
RequiredArgCount = RequiredArgs[Condition];
|
RequiredArgCount = RequiredArgs[Condition];
|
||||||
@ -258,9 +260,23 @@ namespace TJAPlayer3
|
|||||||
switch (this.Condition)
|
switch (this.Condition)
|
||||||
{
|
{
|
||||||
case "ch":
|
case "ch":
|
||||||
return CLangManager.LangInstance.GetString(90002).SafeFormat(this.Values[0]);
|
{
|
||||||
|
if (screen == EScreen.MyRoom)
|
||||||
|
return CLangManager.LangInstance.GetString(90002).SafeFormat(this.Values[0]);
|
||||||
|
return (CLangManager.LangInstance.GetString(90000));
|
||||||
|
}
|
||||||
case "cs":
|
case "cs":
|
||||||
return (CLangManager.LangInstance.GetString(90001)); // Will be buyable later from the randomized shop
|
{
|
||||||
|
if (screen == EScreen.Shop)
|
||||||
|
return CLangManager.LangInstance.GetString(90002).SafeFormat(this.Values[0]);
|
||||||
|
return (CLangManager.LangInstance.GetString(90001));
|
||||||
|
}
|
||||||
|
case "cm":
|
||||||
|
{
|
||||||
|
if (screen == EScreen.SongSelect)
|
||||||
|
return CLangManager.LangInstance.GetString(90002).SafeFormat(this.Values[0]);
|
||||||
|
return (CLangManager.LangInstance.GetString(90000));
|
||||||
|
}
|
||||||
case "ce":
|
case "ce":
|
||||||
return CLangManager.LangInstance.GetString(90006).SafeFormat(this.Values[0], SaveData.TotalEarnedMedals);
|
return CLangManager.LangInstance.GetString(90006).SafeFormat(this.Values[0], SaveData.TotalEarnedMedals);
|
||||||
case "ap":
|
case "ap":
|
||||||
|
@ -31,7 +31,7 @@ namespace TJAPlayer3
|
|||||||
|
|
||||||
private static Dictionary<string, float> RarityToCoinMultiplier = new Dictionary<string, float>
|
private static Dictionary<string, float> RarityToCoinMultiplier = new Dictionary<string, float>
|
||||||
{
|
{
|
||||||
["Poor"] = 0.8f,
|
["Poor"] = 1f,
|
||||||
["Common"] = 1f,
|
["Common"] = 1f,
|
||||||
["Uncommon"] = 1f,
|
["Uncommon"] = 1f,
|
||||||
["Rare"] = 1f,
|
["Rare"] = 1f,
|
||||||
|
33
OpenTaiko/src/Helpers/HSongTraverse.cs
Normal file
33
OpenTaiko/src/Helpers/HSongTraverse.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TJAPlayer3
|
||||||
|
{
|
||||||
|
class HSongTraverse
|
||||||
|
{
|
||||||
|
public static List<string> SpecialFolders = new List<string> { "Favorite", "最近遊んだ曲", "SearchD" };
|
||||||
|
|
||||||
|
public static bool IsRegularFolder(CSongListNode node)
|
||||||
|
{
|
||||||
|
if (node.eノード種別 != CSongListNode.ENodeType.BOX) return false;
|
||||||
|
if (SpecialFolders.Contains(node.strジャンル)) return false;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
public static int GetSongsMatchingCondition(CSongListNode parentBox, Func<CSongListNode, bool> payload)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
foreach (CSongListNode child in parentBox.list子リスト)
|
||||||
|
{
|
||||||
|
if (IsRegularFolder(child)) count += GetSongsMatchingCondition(child, payload);
|
||||||
|
else if (child.eノード種別 == CSongListNode.ENodeType.SCORE && payload(child)) count += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
34
OpenTaiko/src/Helpers/LocalizedStringConverter.cs
Normal file
34
OpenTaiko/src/Helpers/LocalizedStringConverter.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace TJAPlayer3
|
||||||
|
{
|
||||||
|
internal class LocalizedStringConverter<T> : JsonConverter
|
||||||
|
{
|
||||||
|
public override bool CanConvert(Type objectType)
|
||||||
|
{
|
||||||
|
// CanConvert is not called when the [JsonConverter] attribute is used
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
JToken token = JToken.Load(reader);
|
||||||
|
if (token.Type == JTokenType.Object)
|
||||||
|
{
|
||||||
|
return token.ToObject<T>(serializer);
|
||||||
|
}
|
||||||
|
return token.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
serializer.Serialize(writer, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -93,7 +93,7 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TitleTextureKey ttkNowUnlockConditionText = null;
|
public TitleTextureKey? ttkNowUnlockConditionText = null;
|
||||||
|
|
||||||
public void ResetSongIndex()
|
public void ResetSongIndex()
|
||||||
{
|
{
|
||||||
@ -975,14 +975,36 @@ namespace TJAPlayer3
|
|||||||
// strboxText here
|
// strboxText here
|
||||||
if (this.rCurrentlySelectedSong != null)
|
if (this.rCurrentlySelectedSong != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++)
|
#region [Box text]
|
||||||
{
|
|
||||||
using (var texture = pfBoxText.DrawText(this.rCurrentlySelectedSong.strBoxText[i], rCurrentlySelectedSong.ForeColor, rCurrentlySelectedSong.BackColor, null, 26))
|
string _append = "";
|
||||||
{
|
if (HSongTraverse.IsRegularFolder(rCurrentlySelectedSong))
|
||||||
this.txBoxText[i] = TJAPlayer3.tテクスチャの生成(texture);
|
{
|
||||||
this.strBoxText = this.rCurrentlySelectedSong.strBoxText[0] + this.rCurrentlySelectedSong.strBoxText[1] + this.rCurrentlySelectedSong.strBoxText[2];
|
int countTotalSongs = HSongTraverse.GetSongsMatchingCondition(rCurrentlySelectedSong, (_) => true);
|
||||||
}
|
int countUnlockedSongs = HSongTraverse.GetSongsMatchingCondition(rCurrentlySelectedSong, (song) => !TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(song));
|
||||||
}
|
_append = " ({0}/{1})".SafeFormat(countUnlockedSongs, countTotalSongs);
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] boxText = new string[3]
|
||||||
|
{
|
||||||
|
rCurrentlySelectedSong.strBoxText[0],
|
||||||
|
rCurrentlySelectedSong.strBoxText[1],
|
||||||
|
rCurrentlySelectedSong.strBoxText[2] + _append
|
||||||
|
};
|
||||||
|
|
||||||
|
if (strBoxText != boxText[0] + boxText[1] + boxText[2])
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
using (var texture = pfBoxText.DrawText(boxText[i], rCurrentlySelectedSong.ForeColor, rCurrentlySelectedSong.BackColor, null, 26))
|
||||||
|
{
|
||||||
|
this.txBoxText[i] = TJAPlayer3.tテクスチャの生成(texture);
|
||||||
|
this.strBoxText = boxText[0] + boxText[1] + boxText[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1166,20 +1188,39 @@ namespace TJAPlayer3
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 本ステージは、(1)登場アニメフェーズ → (2)通常フェーズ と二段階にわけて進む。
|
// 本ステージは、(1)登場アニメフェーズ → (2)通常フェーズ と二段階にわけて進む。
|
||||||
|
|
||||||
if (strBoxText != rCurrentlySelectedSong.strBoxText[0] + rCurrentlySelectedSong.strBoxText[1] + rCurrentlySelectedSong.strBoxText[2])
|
#region [Box text]
|
||||||
|
|
||||||
|
string _append = "";
|
||||||
|
if (HSongTraverse.IsRegularFolder(rCurrentlySelectedSong))
|
||||||
|
{
|
||||||
|
int countTotalSongs = HSongTraverse.GetSongsMatchingCondition(rCurrentlySelectedSong, (_) => true);
|
||||||
|
int countUnlockedSongs = HSongTraverse.GetSongsMatchingCondition(rCurrentlySelectedSong, (song) => !TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(song));
|
||||||
|
_append = " ({0}/{1})".SafeFormat(countUnlockedSongs, countTotalSongs);
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] boxText = new string[3]
|
||||||
|
{
|
||||||
|
rCurrentlySelectedSong.strBoxText[0],
|
||||||
|
rCurrentlySelectedSong.strBoxText[1],
|
||||||
|
rCurrentlySelectedSong.strBoxText[2] + _append
|
||||||
|
};
|
||||||
|
|
||||||
|
if (strBoxText != boxText[0] + boxText[1] + boxText[2])
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
using (var texture = pfBoxText.DrawText(this.rCurrentlySelectedSong.strBoxText[i], rCurrentlySelectedSong.ForeColor, rCurrentlySelectedSong.BackColor, null, 26))
|
using (var texture = pfBoxText.DrawText(boxText[i], rCurrentlySelectedSong.ForeColor, rCurrentlySelectedSong.BackColor, null, 26))
|
||||||
{
|
{
|
||||||
this.txBoxText[i] = TJAPlayer3.tテクスチャの生成(texture);
|
this.txBoxText[i] = TJAPlayer3.tテクスチャの生成(texture);
|
||||||
this.strBoxText = this.rCurrentlySelectedSong.strBoxText[0] + this.rCurrentlySelectedSong.strBoxText[1] + this.rCurrentlySelectedSong.strBoxText[2];
|
this.strBoxText = boxText[0] + boxText[1] + boxText[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
this.ctScrollCounter.Tick();
|
this.ctScrollCounter.Tick();
|
||||||
|
|
||||||
// 進行。
|
// 進行。
|
||||||
@ -2826,7 +2867,7 @@ namespace TJAPlayer3
|
|||||||
string _cond = "???";
|
string _cond = "???";
|
||||||
if (HRarity.tRarityToModalInt(SongUnlockable.rarity)
|
if (HRarity.tRarityToModalInt(SongUnlockable.rarity)
|
||||||
< HRarity.tRarityToModalInt("Epic"))
|
< HRarity.tRarityToModalInt("Epic"))
|
||||||
_cond = SongUnlockable.unlockConditions.tConditionMessage();
|
_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2974,15 +3015,19 @@ namespace TJAPlayer3
|
|||||||
tex.Value.Opacity = opct;
|
tex.Value.Opacity = opct;
|
||||||
}
|
}
|
||||||
|
|
||||||
TJAPlayer3.Tx.SongSelect_Bar_Genre_Back.Opacity = opct;
|
TJAPlayer3.Tx.SongSelect_Bar_Genre_Back?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Bar_Genre_Random.Opacity = opct;
|
TJAPlayer3.Tx.SongSelect_Bar_Genre_Random?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.Opacity = opct;
|
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Favorite.Opacity = opct;
|
TJAPlayer3.Tx.SongSelect_Favorite?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.Opacity = opct;
|
TJAPlayer3.Tx.TowerResult_ScoreRankEffect?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.DanResult_Rank.Opacity = opct;
|
TJAPlayer3.Tx.DanResult_Rank?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Level_Number_Big?.tUpdateOpacity(opct);
|
TJAPlayer3.Tx.SongSelect_Level_Number_Big?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Level_Number_Big_Colored?.tUpdateOpacity(opct);
|
TJAPlayer3.Tx.SongSelect_Level_Number_Big_Colored?.tUpdateOpacity(opct);
|
||||||
TJAPlayer3.Tx.SongSelect_Level_Number_Big_Icon?.tUpdateOpacity(opct);
|
TJAPlayer3.Tx.SongSelect_Level_Number_Big_Icon?.tUpdateOpacity(opct);
|
||||||
|
TJAPlayer3.Tx.SongSelect_Lock?.tUpdateOpacity(opct);
|
||||||
|
TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked?.tUpdateOpacity(opct);
|
||||||
|
TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked_Top?.tUpdateOpacity(opct);
|
||||||
|
|
||||||
for (int i = 0; i < TJAPlayer3.Tx.SongSelect_Song_Panel.Length; i++)
|
for (int i = 0; i < TJAPlayer3.Tx.SongSelect_Song_Panel.Length; i++)
|
||||||
{
|
{
|
||||||
TJAPlayer3.Tx.SongSelect_Song_Panel[i]?.tUpdateOpacity(opct);
|
TJAPlayer3.Tx.SongSelect_Song_Panel[i]?.tUpdateOpacity(opct);
|
||||||
@ -3267,9 +3312,9 @@ namespace TJAPlayer3
|
|||||||
_score.MaxBpm * _speed
|
_score.MaxBpm * _speed
|
||||||
};
|
};
|
||||||
|
|
||||||
string bpm_str = "BPM: " + bpms[0].ToString();
|
string bpm_str = "BPM: " + String.Format("{0:0.###}", bpms[0]);
|
||||||
if (bpms[1] != bpms[0] || bpms[2] != bpms[0])
|
if (bpms[1] != bpms[0] || bpms[2] != bpms[0])
|
||||||
bpm_str += " (" + bpms[1].ToString() + "-" + bpms[2].ToString() + ")";
|
bpm_str += " (" + String.Format("{0:0.###}", bpms[1]) + "-" + String.Format("{0:0.###}", bpms[2]) + ")";
|
||||||
|
|
||||||
var _color = forecolor;
|
var _color = forecolor;
|
||||||
if (_speed > 1)
|
if (_speed > 1)
|
||||||
|
@ -8,6 +8,7 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using DiscordRPC;
|
using DiscordRPC;
|
||||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||||
|
using static TJAPlayer3.CActSelect曲リスト;
|
||||||
|
|
||||||
namespace TJAPlayer3
|
namespace TJAPlayer3
|
||||||
{
|
{
|
||||||
@ -520,7 +521,6 @@ namespace TJAPlayer3
|
|||||||
if (this.rNowSelectedSong.eノード種別 == CSongListNode.ENodeType.BOX)
|
if (this.rNowSelectedSong.eノード種別 == CSongListNode.ENodeType.BOX)
|
||||||
{
|
{
|
||||||
TJAPlayer3.Tx.SongSelect_Song_Panel[0]?.t2D描画(0, 0);
|
TJAPlayer3.Tx.SongSelect_Song_Panel[0]?.t2D描画(0, 0);
|
||||||
// To do: Add unlocked songs / all songs count
|
|
||||||
}
|
}
|
||||||
else if (this.rNowSelectedSong.eノード種別 == CSongListNode.ENodeType.SCORE)
|
else if (this.rNowSelectedSong.eノード種別 == CSongListNode.ENodeType.SCORE)
|
||||||
{
|
{
|
||||||
@ -632,7 +632,7 @@ namespace TJAPlayer3
|
|||||||
{
|
{
|
||||||
TJAPlayer3.Tx.SongSelect_Unlock_Conditions?.t2D描画(0, 0);
|
TJAPlayer3.Tx.SongSelect_Unlock_Conditions?.t2D描画(0, 0);
|
||||||
|
|
||||||
if (actSongList.ttkNowUnlockConditionText != null)
|
if (actSongList.ttkNowUnlockConditionText is not null)
|
||||||
{
|
{
|
||||||
actSongList.ResolveTitleTexture(actSongList.ttkNowUnlockConditionText)?.t2D描画(TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[0], TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[1]);
|
actSongList.ResolveTitleTexture(actSongList.ttkNowUnlockConditionText)?.t2D描画(TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[0], TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[1]);
|
||||||
}
|
}
|
||||||
@ -937,7 +937,7 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ Shift-F1: CONFIG画面 ]
|
#region [ Shift-F1: Config shortcut ]
|
||||||
if ((TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.RightShift) || TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.LeftShift)) &&
|
if ((TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.RightShift) || TJAPlayer3.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.LeftShift)) &&
|
||||||
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F1))
|
TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F1))
|
||||||
{ // [SHIFT] + [F1] CONFIG
|
{ // [SHIFT] + [F1] CONFIG
|
||||||
@ -949,21 +949,21 @@ namespace TJAPlayer3
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ F2 簡易オプション ]
|
#region [ F2 Quick Config ]
|
||||||
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.QuickConfig))
|
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.QuickConfig))
|
||||||
{
|
{
|
||||||
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
||||||
this.actQuickConfig.tActivatePopupMenu(EInstrumentPad.DRUMS);
|
this.actQuickConfig.tActivatePopupMenu(EInstrumentPad.DRUMS);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ F3 1PオートON/OFF ]
|
#region [ F3 1P AUTO ]
|
||||||
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.ToggleAutoP1))
|
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.ToggleAutoP1))
|
||||||
{
|
{
|
||||||
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
TJAPlayer3.Skin.soundChangeSFX.tPlay();
|
||||||
CUtility.ToggleBoolian(ref TJAPlayer3.ConfigIni.bAutoPlay[0]);
|
CUtility.ToggleBoolian(ref TJAPlayer3.ConfigIni.bAutoPlay[0]);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ F4 2PオートON/OFF ]
|
#region [ F4 2P AUTO ]
|
||||||
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.ToggleAutoP2))
|
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.ToggleAutoP2))
|
||||||
{
|
{
|
||||||
if (TJAPlayer3.ConfigIni.nPlayerCount > 1)
|
if (TJAPlayer3.ConfigIni.nPlayerCount > 1)
|
||||||
@ -973,7 +973,7 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ F5 スーパーハード ]
|
#region [ F5 Super Hard Mode (DEPRECATED / UNUSED) ]
|
||||||
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F5))
|
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F5))
|
||||||
{
|
{
|
||||||
// Deprecated, to delete
|
// Deprecated, to delete
|
||||||
@ -991,7 +991,7 @@ namespace TJAPlayer3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ F9 ]
|
#region [ F9 New Heya ]
|
||||||
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.NewHeya))
|
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.NewHeya))
|
||||||
{
|
{
|
||||||
actNewHeya.Open();
|
actNewHeya.Open();
|
||||||
@ -1020,8 +1020,39 @@ namespace TJAPlayer3
|
|||||||
|
|
||||||
if (IsSongLocked)
|
if (IsSongLocked)
|
||||||
{
|
{
|
||||||
// Handle the Coins Menu unlock condition here
|
var SongToUnlock = TJAPlayer3.Databases.DBSongUnlockables.tGetUnlockableByUniqueId(this.rNowSelectedSong);
|
||||||
TJAPlayer3.Skin.soundError.tPlay();
|
|
||||||
|
if (SongToUnlock != null)
|
||||||
|
{
|
||||||
|
(bool, string?) response = SongToUnlock.unlockConditions.tConditionMetWrapper(TJAPlayer3.SaveFile, DBUnlockables.CUnlockConditions.EScreen.SongSelect);
|
||||||
|
|
||||||
|
Color responseColor = (response.Item1) ? Color.Lime : Color.Red;
|
||||||
|
if (actSongList.ttkNowUnlockConditionText is not null)
|
||||||
|
{
|
||||||
|
actSongList.ttkNowUnlockConditionText = new TitleTextureKey(
|
||||||
|
response.Item2 ?? actSongList.ttkNowUnlockConditionText.str文字,
|
||||||
|
actSongList.ttkNowUnlockConditionText.cPrivateFastFont,
|
||||||
|
responseColor, Color.Black, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.Item1)
|
||||||
|
{
|
||||||
|
TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].data.UnlockedSongs.Add(this.rNowSelectedSong?.tGetUniqueId() ?? "");
|
||||||
|
DBSaves.RegisterStringUnlockedAsset(
|
||||||
|
TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].data.SaveId,
|
||||||
|
"unlocked_songs",
|
||||||
|
this.rNowSelectedSong?.tGetUniqueId() ?? "" // Can't be null in this context
|
||||||
|
);
|
||||||
|
TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].tSpendCoins(SongToUnlock.unlockConditions.Values[0]);
|
||||||
|
// Play modal animation here ?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TJAPlayer3.Skin.soundError.tPlay();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TJAPlayer3.Skin.soundError.tPlay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -130,8 +130,8 @@ namespace TJAPlayer3
|
|||||||
for (int i = 0; i < iPuchiCharaCount; i++)
|
for (int i = 0; i < iPuchiCharaCount; i++)
|
||||||
{
|
{
|
||||||
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Puchichara[i].metadata.Rarity);
|
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Puchichara[i].metadata.Rarity);
|
||||||
ttkPuchiCharaNames[i] = new TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.Name, this.pfHeyaFont, textColor, Color.Black, 1000);
|
ttkPuchiCharaNames[i] = new TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.tGetName(), this.pfHeyaFont, textColor, Color.Black, 1000);
|
||||||
ttkPuchiCharaAuthors[i] = new TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.Author, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
ttkPuchiCharaAuthors[i] = new TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.tGetAuthor(), this.pfHeyaFont, Color.White, Color.Black, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -146,8 +146,8 @@ namespace TJAPlayer3
|
|||||||
for (int i = 0; i < iCharacterCount; i++)
|
for (int i = 0; i < iCharacterCount; i++)
|
||||||
{
|
{
|
||||||
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Characters[i].metadata.Rarity);
|
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Characters[i].metadata.Rarity);
|
||||||
ttkCharacterNames[i] = new TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.Name, this.pfHeyaFont, textColor, Color.Black, 1000);
|
ttkCharacterNames[i] = new TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.tGetName(), this.pfHeyaFont, textColor, Color.Black, 1000);
|
||||||
ttkCharacterAuthors[i] = new TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.Author, this.pfHeyaFont, Color.White, Color.Black, 1000);
|
ttkCharacterAuthors[i] = new TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.tGetAuthor(), this.pfHeyaFont, Color.White, Color.Black, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -646,6 +646,7 @@ namespace TJAPlayer3
|
|||||||
TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedCharacters.Add(TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
|
TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedCharacters.Add(TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
|
||||||
DBSaves.RegisterStringUnlockedAsset(TJAPlayer3.SaveFileInstances[iPlayer].data.SaveId, "unlocked_characters", TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
|
DBSaves.RegisterStringUnlockedAsset(TJAPlayer3.SaveFileInstances[iPlayer].data.SaveId, "unlocked_characters", TJAPlayer3.Skin.Characters_DirName[iCharacterCurrent]);
|
||||||
TJAPlayer3.SaveFileInstances[iPlayer].tSpendCoins(TJAPlayer3.Tx.Characters[iCharacterCurrent].unlock.Values[0]);
|
TJAPlayer3.SaveFileInstances[iPlayer].tSpendCoins(TJAPlayer3.Tx.Characters[iCharacterCurrent].unlock.Values[0]);
|
||||||
|
// Play modal animation here ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,8 +191,8 @@ namespace TJAPlayer3
|
|||||||
for (int i = 0; i < TJAPlayer3.Skin.Puchichara_Ptn; i++)
|
for (int i = 0; i < TJAPlayer3.Skin.Puchichara_Ptn; i++)
|
||||||
{
|
{
|
||||||
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Puchichara[i].metadata.Rarity);
|
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Puchichara[i].metadata.Rarity);
|
||||||
ttkPuchiCharaNames[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.Name, this.MenuFont, textColor, Color.Black, 1000);
|
ttkPuchiCharaNames[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.tGetName(), this.MenuFont, textColor, Color.Black, 1000);
|
||||||
ttkPuchiCharaAuthors[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.Author, this.MenuFont, Color.White, Color.Black, 1000);
|
ttkPuchiCharaAuthors[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Puchichara[i].metadata.tGetAuthor(), this.MenuFont, Color.White, Color.Black, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -202,8 +202,8 @@ namespace TJAPlayer3
|
|||||||
for (int i = 0; i < TJAPlayer3.Skin.Characters_Ptn; i++)
|
for (int i = 0; i < TJAPlayer3.Skin.Characters_Ptn; i++)
|
||||||
{
|
{
|
||||||
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Characters[i].metadata.Rarity);
|
var textColor = HRarity.tRarityToColor(TJAPlayer3.Tx.Characters[i].metadata.Rarity);
|
||||||
ttkCharacterNames[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.Name, this.MenuFont, textColor, Color.Black, 1000);
|
ttkCharacterNames[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.tGetName(), this.MenuFont, textColor, Color.Black, 1000);
|
||||||
ttkCharacterAuthors[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.Author, this.MenuFont, Color.White, Color.Black, 1000);
|
ttkCharacterAuthors[i] = new CActSelect曲リスト.TitleTextureKey(TJAPlayer3.Tx.Characters[i].metadata.tGetAuthor(), this.MenuFont, Color.White, Color.Black, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user