Commit f41b50ec authored by Unicorn's avatar Unicorn

fix && update

parent 7a2e3e76
......@@ -37,6 +37,7 @@ sysinfo.txt
# ygopro
cdb/
deck/
expansions/
pack/
texture/
config/
......
......@@ -20,7 +20,7 @@ public class barPngLoader : MonoBehaviour {
api_timeBar.mainTexture = GameTextureManager.time;
try
{
string[] allLines = (File.ReadAllText("texture\\duel\\healthBar\\config.txt").Replace("\r", "").Replace(" ", "").Split("\n"));
string[] allLines = (File.ReadAllText("texture/duel/healthBar/config.txt").Replace("\r", "").Replace(" ", "").Split("\n"));
foreach (var item in allLines)
{
string[] mats = item.Split("=");
......
......@@ -191,7 +191,7 @@ static public class NGUITools
while (obj.transform.parent != null)
{
obj = obj.transform.parent.gameObject;
path = obj.name + "\\" + path;
path = obj.name + "/" + path;
}
return path;
}
......
fileFormatVersion: 2
guid: 2adb1a7c4890107419c4fe29be67995a
folderAsset: yes
timeCreated: 1533102220
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3c75bb5f4b7907b4db4b0495be562fbd
timeCreated: 1535354357
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 65c8eb999d542c94d9b46f8189bb2628
timeCreated: 1533102221
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 42df28d92d2b79340a3abcb902663ce6
folderAsset: yes
timeCreated: 1533102808
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8add322014fe0514e80ed2da92462f43
timeCreated: 1535354357
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -51,7 +51,7 @@ public static class Config
if (loaded == false)
{
loaded = true;
string[] lines = File.ReadAllText("texture\\ui\\config.txt").Replace("\r", "").Replace(" ", "").Split("\n");
string[] lines = File.ReadAllText("texture/ui/config.txt").Replace("\r", "").Replace(" ", "").Split("\n");
for (int i = 0; i < lines.Length; i++)
{
string[] mats = lines[i].Split("=");
......
......@@ -2263,7 +2263,7 @@ public class gameCard : OCGobject
}
else if (show_off_shokewave)
{
if (Program.I().setting.setting.showoff.value == false || File.Exists("picture\\closeup\\" + data.Id.ToString() + ".png") == false || (data.Attack < Program.I().setting.atk && data.Level < Program.I().setting.star))
if (Program.I().setting.setting.showoff.value == false || File.Exists("picture/closeup/" + data.Id.ToString() + ".png") == false || (data.Attack < Program.I().setting.atk && data.Level < Program.I().setting.star))
{
refreshFunctions.Add(SOH_nSum);
Program.I().ocgcore.Sleep(30);
......@@ -2276,7 +2276,7 @@ public class gameCard : OCGobject
}
else
{
if (Program.I().setting.setting.showoffWhenActived.value == false || File.Exists("picture\\closeup\\" + data.Id.ToString() + ".png") == false)
if (Program.I().setting.setting.showoffWhenActived.value == false || File.Exists("picture/closeup/" + data.Id.ToString() + ".png") == false)
{
refreshFunctions.Add(SOH_nAct);
Program.I().ocgcore.Sleep(42);
......
......@@ -427,10 +427,18 @@ public class GameField : OCGobject
{
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".png");
}
else
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".png");
}
else if (File.Exists("picture/field/" + code.ToString() + ".jpg"))
{
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".jpg");
}
else
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".jpg");
}
if (tex != null)
{
UIHelper.getByName<UITexture>(gameObject, "field_" + player.ToString()).mainTexture = tex;
......
......@@ -285,19 +285,19 @@ public class Program : MonoBehaviour
});
go(300, () =>
{
InterString.initialize("config\\translation.conf");
InterString.initialize("config/translation.conf");
GameTextureManager.initialize();
Config.initialize("config\\config.conf");
GameStringManager.initialize("config\\strings.conf");
if (File.Exists("cdb\\strings.conf"))
Config.initialize("config/config.conf");
GameStringManager.initialize("config/strings.conf");
if (File.Exists("cdb/strings.conf"))
{
GameStringManager.initialize("cdb\\strings.conf");
GameStringManager.initialize("cdb/strings.conf");
}
if (File.Exists("diy\\strings.conf"))
if (File.Exists("expansions/strings.conf"))
{
GameStringManager.initialize("diy\\strings.conf");
GameStringManager.initialize("expansions/strings.conf");
}
YGOSharp.BanlistManager.initialize("config\\lflist.conf");
YGOSharp.BanlistManager.initialize("config/lflist.conf");
var fileInfos = (new DirectoryInfo("cdb")).GetFiles();
for (int i = 0; i < fileInfos.Length; i++)
......@@ -306,21 +306,21 @@ public class Program : MonoBehaviour
{
if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 4, 4) == ".cdb")
{
YGOSharp.CardsManager.initialize("cdb\\" + fileInfos[i].Name);
YGOSharp.CardsManager.initialize("cdb/" + fileInfos[i].Name);
}
}
}
if (Directory.Exists("diy"))
if (Directory.Exists("expansions"))
{
fileInfos = (new DirectoryInfo("diy")).GetFiles();
fileInfos = (new DirectoryInfo("expansions")).GetFiles();
for (int i = 0; i < fileInfos.Length; i++)
{
if (fileInfos[i].Name.Length > 4)
{
if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 4, 4) == ".cdb")
{
YGOSharp.CardsManager.initialize("diy\\" + fileInfos[i].Name);
YGOSharp.CardsManager.initialize("expansions/" + fileInfos[i].Name);
}
}
}
......@@ -334,7 +334,7 @@ public class Program : MonoBehaviour
{
if (fileInfos[i].Name.Substring(fileInfos[i].Name.Length - 3, 3) == ".db")
{
YGOSharp.PacksManager.initialize("pack\\" + fileInfos[i].Name);
YGOSharp.PacksManager.initialize("pack/" + fileInfos[i].Name);
}
}
}
......
......@@ -119,11 +119,29 @@ public class GameStringHelper
public static string getName(YGOSharp.Card card)
{
string limitot = "";
switch(card.Ot)
{
case 1:
limitot = "[OCG] ";
break;
case 2:
limitot = "[TCG] ";
break;
case 3:
limitot = "[OCG/TCG] ";
break;
case 4:
limitot = "[Anime] ";
break;
}
string re = "";
try
{
re += "[b]" + card.Name + "[/b]";
re += "\n";
re += "[sup]" + limitot + "[/sup]";
re += "\r";
re += "[sup]" + card.Id.ToString() + "[/sup]";
re += "\n";
}
......
......@@ -268,9 +268,9 @@ public class GameTextureManager
private static void ProcessingCardFeature(PictureResource pic)
{
if (File.Exists("picture\\closeup\\" + pic.code.ToString() + ".png"))
if (File.Exists("picture/closeup/" + pic.code.ToString() + ".png"))
{
string path = "picture\\closeup\\" + pic.code.ToString() + ".png";
string path = "picture/closeup/" + pic.code.ToString() + ".png";
BitmapHelper bitmap = new BitmapHelper(path);
int left;
int right;
......@@ -308,16 +308,20 @@ public class GameTextureManager
}
else
{
string path = "picture\\card\\" + pic.code.ToString() + ".png";
string path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path))
{
path = "picture\\card\\" + pic.code.ToString() + ".jpg";
path = "picture/card/" + pic.code.ToString() + ".jpg";
}
bool Iam8 = false;
if (!File.Exists(path))
{
Iam8 = true;
path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg";
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
path = "expansions/pics/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
......@@ -566,19 +570,23 @@ public class GameTextureManager
private static void ProcessingVerticleDrawing(PictureResource pic)
{
string path = "picture\\closeup\\" + pic.code.ToString() + ".png";
string path = "picture/closeup/" + pic.code.ToString() + ".png";
if (!File.Exists(path))
{
path = "picture\\card\\" + pic.code.ToString() + ".png";
path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path))
{
path = "picture\\card\\" + pic.code.ToString() + ".jpg";
path = "picture/card/" + pic.code.ToString() + ".jpg";
}
bool Iam8 = false;
if (!File.Exists(path))
{
Iam8 = true;
path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg";
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
path = "expansions/pics/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
......@@ -706,14 +714,18 @@ public class GameTextureManager
private static void ProcessingCardPicture(PictureResource pic)
{
string path = "picture\\card\\" + pic.code.ToString() + ".png";
string path = "picture/card/" + pic.code.ToString() + ".png";
if (!File.Exists(path))
{
path = "picture/card/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
path = "picture\\card\\" + pic.code.ToString() + ".jpg";
path = "picture/cardIn8thEdition/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
path = "picture\\cardIn8thEdition\\" + pic.code.ToString() + ".jpg";
path = "expansions/pics/" + pic.code.ToString() + ".jpg";
}
if (!File.Exists(path))
{
......@@ -873,30 +885,30 @@ public class GameTextureManager
opBack = UIHelper.getTexture2D("texture/duel/opponent.jpg");
unknown = UIHelper.getTexture2D("texture/duel/unknown.jpg");
negated = UIHelper.getTexture2D("texture/duel/negated.png");
bar = UIHelper.getTexture2D("texture\\duel\\healthBar\\bg.png");
exBar = UIHelper.getTexture2D("texture\\duel\\healthBar\\excited.png");
time = UIHelper.getTexture2D("texture\\duel\\healthBar\\t.png");
lp = UIHelper.getTexture2D("texture\\duel\\healthBar\\lp.png");
L = UIHelper.getTexture2D("texture\\duel\\L.png");
R = UIHelper.getTexture2D("texture\\duel\\R.png");
LINK = UIHelper.getTexture2D("texture\\duel\\link.png");
LINKm = UIHelper.getTexture2D("texture\\duel\\linkMask.png");
Chain = UIHelper.getTexture2D("texture\\duel\\chain.png");
Mask = UIHelper.getTexture2D("texture\\duel\\mask.png");
nt = UIHelper.getTexture2D("texture\\duel\\phase\\nt.png");
bp = UIHelper.getTexture2D("texture\\duel\\phase\\bp.png");
ep = UIHelper.getTexture2D("texture\\duel\\phase\\ep.png");
mp1 = UIHelper.getTexture2D("texture\\duel\\phase\\mp1.png");
mp2 = UIHelper.getTexture2D("texture\\duel\\phase\\mp2.png");
dp = UIHelper.getTexture2D("texture\\duel\\phase\\dp.png");
sp = UIHelper.getTexture2D("texture\\duel\\phase\\sp.png");
phase = UIHelper.getTexture2D("texture\\duel\\phase\\phase.png");
rs = UIHelper.getTexture2D("texture\\duel\\phase\\rs.png");
ts = UIHelper.getTexture2D("texture\\duel\\phase\\ts.png");
bar = UIHelper.getTexture2D("texture/duel/healthBar/bg.png");
exBar = UIHelper.getTexture2D("texture/duel/healthBar/excited.png");
time = UIHelper.getTexture2D("texture/duel/healthBar/t.png");
lp = UIHelper.getTexture2D("texture/duel/healthBar/lp.png");
L = UIHelper.getTexture2D("texture/duel/L.png");
R = UIHelper.getTexture2D("texture/duel/R.png");
LINK = UIHelper.getTexture2D("texture/duel/link.png");
LINKm = UIHelper.getTexture2D("texture/duel/linkMask.png");
Chain = UIHelper.getTexture2D("texture/duel/chain.png");
Mask = UIHelper.getTexture2D("texture/duel/mask.png");
nt = UIHelper.getTexture2D("texture/duel/phase/nt.png");
bp = UIHelper.getTexture2D("texture/duel/phase/bp.png");
ep = UIHelper.getTexture2D("texture/duel/phase/ep.png");
mp1 = UIHelper.getTexture2D("texture/duel/phase/mp1.png");
mp2 = UIHelper.getTexture2D("texture/duel/phase/mp2.png");
dp = UIHelper.getTexture2D("texture/duel/phase/dp.png");
sp = UIHelper.getTexture2D("texture/duel/phase/sp.png");
phase = UIHelper.getTexture2D("texture/duel/phase/phase.png");
rs = UIHelper.getTexture2D("texture/duel/phase/rs.png");
ts = UIHelper.getTexture2D("texture/duel/phase/ts.png");
N = new Texture2D(10,10);
for (int i = 0; i < 10; i++)
......@@ -909,7 +921,7 @@ public class GameTextureManager
N.Apply();
try
{
UnityEngine.Color.TryParseHexString(File.ReadAllText("texture\\duel\\chainColor.txt"), out chainColor);
UnityEngine.Color.TryParseHexString(File.ReadAllText("texture/duel/chainColor.txt"), out chainColor);
}
catch (Exception)
{
......
......@@ -95,11 +95,11 @@ public class SelectServer : WindowServantSP
void printFile(bool first)
{
list.Clear();
if (File.Exists("config\\hosts.conf") == false)
if (File.Exists("config/hosts.conf") == false)
{
File.Create("config\\hosts.conf").Close();
File.Create("config/hosts.conf").Close();
}
string txtString = File.ReadAllText("config\\hosts.conf");
string txtString = File.ReadAllText("config/hosts.conf");
string[] lines = txtString.Replace("\r", "").Split("\n");
for (int i = 0; i < lines.Length; i++)
{
......@@ -175,7 +175,7 @@ public class SelectServer : WindowServantSP
{
all += list.items[i] + "\r\n";
}
File.WriteAllText("config\\hosts.conf", all);
File.WriteAllText("config/hosts.conf", all);
printFile(false);
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString,versionString); })).Start();
}
......
guid: 7222ecfae3a1484299c43f7272174c56
fileFormatVersion: 2
guid: 7222ecfae3a1484299c43f7272174c56
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
......@@ -19,19 +19,16 @@ namespace YGOSharp
{
nullName = InterString.Get("未知卡片");
nullString = "";
nullString += "欢迎使用 YGOPro2 1033.D.3";
nullString += "欢迎使用:\r\nYGOPro2";
nullString += "\r\n\r\n";
nullString += "使用本软件竞技前请在官方网站阅读竞技声明。";
//if (File.Exists("config/link.conf"))
//{
nullString += "\r\n";
nullString += "[url=http://ygopro2.lofter.com/lisence][u]http://ygopro2.lofter.com/lisence[/u][/url]";
nullString += "\r\n\r\n";
nullString += "官方网站:\r\n[url=http://ygopro2.lofter.com][u]http://ygopro2.lofter.com[/u][/url]\r\n请随时关注此页面的新卡消息和程序更新消息。";
//}
nullString += "\r\n\r\n";
nullString += "公测玩家交流群:\r\n[url=https://jq.qq.com/?_wv=1027&k=42Gsxgd][u]580454979[/u][/url]";
nullString += "\r\n[url=https://jq.qq.com/?_wv=1027&k=44aGRzz][u]428563714[/u][/url]";
nullString += "软件下载:";
nullString += "\r\n①:[url=https://pan.baidu.com/s/1PEulJRq8ztugD7PtH0ZSlA][u]https://pan.baidu.com/s/1PEulJRq8ztugD7PtH0ZSlA[/u][/url]";
nullString += "\r\n\r\n②:[url=https://github.com/Unicorn369/YGOPro2_Data][u]https://github.com/Unicorn369/YGOPro2_Data[/u][/url]";
nullString += "\r\n\r\n\r\n";
nullString += "欢迎加入QQ群:";
nullString += "\r\n①:[url=https://jq.qq.com/?_wv=1027&k=5nq6xJe][u]649612818[/u][/url]";
nullString += "\r\n②:[url=https://jq.qq.com/?_wv=1027&k=5idyod3][u]559276772[/u][/url]";
nullString += "\r\n③:[url=https://jq.qq.com/?_wv=1027&k=5kMUyu2][u]614684407[/u][/url]";
using (SqliteConnection connection = new SqliteConnection("Data Source=" + databaseFullPath))
{
connection.Open();
......
fileFormatVersion: 2
guid: 186c3391b4c56c541a6a7fdeee7eeac6
timeCreated: 1547543687
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment