1
0
mirror of synced 2024-11-24 07:30:21 +01:00

Remove unnecessary database files and code

This commit is contained in:
0aubsq 2022-06-23 08:38:13 +02:00
parent 24b5152f76
commit 4a3aef6cb0
11 changed files with 5 additions and 189 deletions

View File

@ -6,17 +6,6 @@ namespace TJAPlayer3
{
class DBCharacter
{
public void tDBCharacter()
{
if (!File.Exists(@".\Databases\Character.json"))
tSaveFile();
tLoadFile();
}
#region [Auxiliary classes]
public class CharacterData
{
public CharacterData()
@ -44,22 +33,5 @@ namespace TJAPlayer3
public string Author;
}
#endregion
public Dictionary<int, CharacterData> data = new Dictionary<int, CharacterData>();
#region [private]
private void tSaveFile()
{
ConfigManager.SaveConfig(data, @".\Databases\Character.json");
}
private void tLoadFile()
{
data = ConfigManager.GetConfig<Dictionary<int, CharacterData>>(@".\Databases\Character.json");
}
#endregion
}
}

View File

@ -6,17 +6,6 @@ namespace TJAPlayer3
{
class DBPuchichara
{
public void tDBPuchichara()
{
if (!File.Exists(@".\Databases\Puchichara.json"))
tSaveFile();
tLoadFile();
}
#region [Auxiliary classes]
public class PuchicharaData
{
public PuchicharaData()
@ -44,22 +33,5 @@ namespace TJAPlayer3
public string Author;
}
#endregion
public Dictionary<int, PuchicharaData> data = new Dictionary<int, PuchicharaData>();
#region [private]
private void tSaveFile()
{
ConfigManager.SaveConfig(data, @".\Databases\Puchichara.json");
}
private void tLoadFile()
{
data = ConfigManager.GetConfig<Dictionary<int, PuchicharaData>>(@".\Databases\Puchichara.json");
}
#endregion
}
}

View File

@ -6,17 +6,7 @@ namespace TJAPlayer3
{
class DBUnlockables
{
public void tDBUnlockables()
{
if (!File.Exists(@".\Databases\Unlockables.json"))
tSaveFile();
tLoadFile();
}
#region [Auxilliary classes]
public Dictionary<string, int> RequiredArgs = new Dictionary<string, int>()
public static Dictionary<string, int> RequiredArgs = new Dictionary<string, int>()
{
["ch"] = 1,
["cs"] = 1,
@ -104,8 +94,8 @@ namespace TJAPlayer3
*/
public (bool, string) tConditionMet(int[] inputValues)
{
if (RequiredArgCount < 0 && TJAPlayer3.Databases.DBUnlockables.RequiredArgs.ContainsKey(Condition))
RequiredArgCount = TJAPlayer3.Databases.DBUnlockables.RequiredArgs[Condition];
if (RequiredArgCount < 0 && RequiredArgs.ContainsKey(Condition))
RequiredArgCount = RequiredArgs[Condition];
if (this.Values.Length < this.RequiredArgCount)
return (false, CLangManager.LangInstance.GetString(90005) + this.Condition + " requires " + this.RequiredArgCount.ToString() + " values.");
@ -126,8 +116,8 @@ namespace TJAPlayer3
public string tConditionMessage()
{
if (RequiredArgCount < 0 && TJAPlayer3.Databases.DBUnlockables.RequiredArgs.ContainsKey(Condition))
RequiredArgCount = TJAPlayer3.Databases.DBUnlockables.RequiredArgs[Condition];
if (RequiredArgCount < 0 && RequiredArgs.ContainsKey(Condition))
RequiredArgCount = RequiredArgs[Condition];
if (this.Values.Length < this.RequiredArgCount)
return (CLangManager.LangInstance.GetString(90005) + this.Condition + " requires " + this.RequiredArgCount.ToString() + " values.");
@ -144,30 +134,6 @@ namespace TJAPlayer3
}
#endregion
public class CUnlockables
{
[JsonProperty("puchichara")]
public Dictionary<int, CUnlockConditions> Puchichara = new Dictionary<int, CUnlockConditions>();
}
public CUnlockables data = new CUnlockables();
#region [private]
private void tSaveFile()
{
ConfigManager.SaveConfig(data, @".\Databases\Unlockables.json");
}
private void tLoadFile()
{
data = ConfigManager.GetConfig<CUnlockables>(@".\Databases\Unlockables.json");
}
#endregion
}

View File

@ -7,20 +7,11 @@ namespace TJAPlayer3
{
public void tDatabases()
{
//DBPuchichara = new DBPuchichara();
DBUnlockables = new DBUnlockables();
//DBCharacter = new DBCharacter();
DBCDN = new DBCDN();
//DBPuchichara.tDBPuchichara();
DBUnlockables.tDBUnlockables();
//DBCharacter.tDBCharacter();
DBCDN.tDBCDN();
}
//public DBPuchichara DBPuchichara;
public DBUnlockables DBUnlockables;
//public DBCharacter DBCharacter;
public DBCDN DBCDN;
}
}

View File

@ -1,7 +0,0 @@
{
0: {
"name" : "None",
"rarity": "Common",
"author": "",
},
}

View File

@ -1,52 +0,0 @@
{
0: {
"name" : "None",
"rarity": "Common",
"author": "",
},
1: {
"name" : "Placeholder",
"rarity": "Common",
"author": "[Author]",
},
2: {
"name" : "Placeholder",
"rarity": "Poor",
"author": "[Author]",
},
3: {
"name" : "Placeholder",
"rarity": "Uncommon",
"author": "[Author]",
},
4: {
"name" : "Placeholder",
"rarity": "Common",
"author": "[Author]",
},
5: {
"name" : "Placeholder",
"rarity": "Epic",
"author": "[Author]",
},
6: {
"name" : "Placeholder",
"rarity": "Common",
"author": "[Author]",
},
7: {
"name" : "Placeholder",
"rarity": "Rare",
"author": "[Author]",
},
8: {
"name" : "Placeholder",
"rarity": "Uncommon",
"author": "[Author]",
},
9: {
"name" : "Placeholder",
"rarity": "Legendary",
"author": "[Author]",
},
}

View File

@ -1,26 +0,0 @@
{
"puchichara": {
7: {
"condition": "ch",
"type": "me",
"values": [
450,
],
},
5: {
"condition": "ch",
"type": "me",
"values": [
1400,
],
},
9: {
"condition": "cs",
"type": "me",
"values": [
5000,
],
},
},
}

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB