Skip to content

Commit 12dec77

Browse files
committed
Update v3.0.8.0
2 parents d2de105 + 33aadbe commit 12dec77

File tree

18 files changed

+623
-392
lines changed

18 files changed

+623
-392
lines changed

xivModdingFramework/Materials/DataContainers/ShaderHelpers.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ private static void AddCustomNamesAndValues()
356356
UpdateKeyValueName(shKv.Key, 0x380CAED0, 0xF5673524, "PART_FACE");
357357
UpdateKeyValueName(shKv.Key, 0x380CAED0, 0x2BDB45F1, "PART_BODY");
358358
UpdateKeyValueName(shKv.Key, 0x380CAED0, 0x57FF3B64, "PART_BODY_HRO");
359+
UpdateKeyValueName(shKv.Key, 0x380CAED0, 0x72E697CD, "EMISSIVE");
359360

360361
// Hair Values
361362
UpdateKeyValueName(shKv.Key, 0x24826489, 0xF7B8956E, "PART_HAIR");

xivModdingFramework/Materials/FileTypes/Mtrl.cs

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,7 @@ public static async Task UpdateShaderDB(bool useIndex2 = false)
16071607

16081608
transaction.Commit();
16091609
}
1610+
16101611
}
16111612
}
16121613
catch
@@ -1615,14 +1616,33 @@ public static async Task UpdateShaderDB(bool useIndex2 = false)
16151616
}
16161617
}
16171618

1618-
/// <summary>
1619-
/// Retrieves simplified material info for ALL Materials in the entire game.
1620-
/// Used to collect data to store into SQLite DB or JSON.
1621-
///
1622-
/// Not Transaction Safe
1623-
/// </summary>
1624-
/// <returns></returns>
1625-
public static async Task<List<SimplifiedMtrlInfo>> GetAllMtrlInfo(bool useIndex2 = false)
1619+
1620+
public static async Task ShrinkShaderDB()
1621+
{
1622+
const string _ShaderDbFilePath = "./Resources/DB/shader_info.db";
1623+
const string _ShrinkDbScript = "ShrinkShaderCache.sql";
1624+
var connectionString = "Data Source=" + _ShaderDbFilePath + ";Pooling=False;";
1625+
using (var db = new SQLiteConnection(connectionString))
1626+
{
1627+
db.Open();
1628+
var lines = File.ReadAllLines("Resources\\SQL\\" + _ShrinkDbScript);
1629+
var sqlCmd = String.Join("\n", lines);
1630+
1631+
using (var cmd = new SQLiteCommand(sqlCmd, db))
1632+
{
1633+
cmd.ExecuteScalar();
1634+
}
1635+
}
1636+
}
1637+
1638+
/// <summary>
1639+
/// Retrieves simplified material info for ALL Materials in the entire game.
1640+
/// Used to collect data to store into SQLite DB or JSON.
1641+
///
1642+
/// Not Transaction Safe
1643+
/// </summary>
1644+
/// <returns></returns>
1645+
public static async Task<List<SimplifiedMtrlInfo>> GetAllMtrlInfo(bool useIndex2 = false)
16261646
{
16271647
if(ModTransaction.ActiveTransaction != null)
16281648
{

0 commit comments

Comments
 (0)