[SabreTools, README, DatFiles] Add prefix/postfix everywhere

This commit is contained in:
Matt Nadareski
2018-02-24 13:14:58 -08:00
parent 8b9ac5dca5
commit b92cfd8455
14 changed files with 68 additions and 11 deletions

View File

@@ -896,6 +896,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (rom.Type)
{
case ItemType.Archive:

View File

@@ -5962,6 +5962,8 @@ namespace SabreTools.Library.DatFiles
.Replace("%sha512%", sha512)
.Replace("%size%", size);
// TODO: Add GameName logic here too?
return fix;
}

View File

@@ -269,6 +269,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (rom.Type)
{
case ItemType.Archive:

View File

@@ -199,6 +199,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (_hash)
{
case Hash.MD5:

View File

@@ -408,6 +408,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (rom.Type)
{
case ItemType.Archive:

View File

@@ -781,6 +781,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (rom.Type)
{
case ItemType.Archive:

View File

@@ -890,6 +890,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
switch (rom.Type)
{
case ItemType.Archive:

View File

@@ -155,6 +155,7 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "", name = "", pre = "", post = "";
pre = CreatePrefixPostfix(rom, true);
post = CreatePrefixPostfix(rom, false);

View File

@@ -954,6 +954,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
state += "\t\t<game>\n"
+ "\t\t\t<imageNumber>1</imageNumber>\n"
+ "\t\t\t<releaseNumber>1</releaseNumber>\n"

View File

@@ -339,6 +339,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
if (rom.Type == ItemType.Rom)
{
state += "¬" + (String.IsNullOrWhiteSpace(rom.CloneOf) ? "" : HttpUtility.HtmlEncode(rom.CloneOf)) +

View File

@@ -829,6 +829,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "", prefix = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
for (int i = 0; i < depth; i++)
{
prefix += "\t";

View File

@@ -785,6 +785,11 @@ namespace SabreTools.Library.DatFiles
try
{
string state = "";
// Pre-process the item name
rom.Name = CreatePrefixPostfix(rom, true) + rom.Name + CreatePrefixPostfix(rom, false);
rom.Name = rom.Name.Replace("\"", ""); // Quotes are not needed here
state += "\t\t<part name=\"" + rom.PartName + "\" interface=\"" + rom.PartInterface + "\">\n";
foreach (Tuple<string, string> kvp in rom.Features)