Commit 88a6406b authored by keyongyu's avatar keyongyu

2.2.5.0

parent 65399193
...@@ -178,6 +178,12 @@ ...@@ -178,6 +178,12 @@
<None Include="chinese\mse-spelltrap.txt"> <None Include="chinese\mse-spelltrap.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="chinese\single.lua">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="chinese\strings.conf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="chinese\_functions.txt"> <None Include="chinese\_functions.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -235,6 +241,12 @@ ...@@ -235,6 +241,12 @@
<None Include="english\mse-spelltrap.txt"> <None Include="english\mse-spelltrap.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="english\single.lua">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="english\strings.conf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="english\_functions.txt"> <None Include="english\_functions.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
...@@ -32,7 +32,7 @@ public partial class MainForm : Form ...@@ -32,7 +32,7 @@ public partial class MainForm : Form
List<string> cdblist; List<string> cdblist;
string datapath; string datapath;
string conflang,conflang_de,conflang_ce,confmsg,conflang_pe; string conflang,conflang_de,conflang_ce,confmsg,conflang_pe;
string funtxt,conlua,fieldtxt; string funtxt,conlua,fieldtxt,confstring;
DataEditForm compare1,compare2; DataEditForm compare1,compare2;
Card[] tCards; Card[] tCards;
Dictionary<DataEditForm,string> list; Dictionary<DataEditForm,string> list;
...@@ -77,6 +77,7 @@ void Init(string datapath) ...@@ -77,6 +77,7 @@ void Init(string datapath)
confmsg = MyPath.Combine(datapath, "message.txt"); confmsg = MyPath.Combine(datapath, "message.txt");
funtxt = MyPath.Combine(datapath, "_functions.txt"); funtxt = MyPath.Combine(datapath, "_functions.txt");
conlua = MyPath.Combine(datapath, "constant.lua"); conlua = MyPath.Combine(datapath, "constant.lua");
confstring = MyPath.Combine(datapath, "strings.conf");
InitializeComponent(); InitializeComponent();
LANG.InitForm(this, conflang); LANG.InitForm(this, conflang);
LANG.LoadMessage(confmsg); LANG.LoadMessage(confmsg);
...@@ -517,6 +518,7 @@ void InitCodeEditor(string funtxt,string conlua) ...@@ -517,6 +518,7 @@ void InitCodeEditor(string funtxt,string conlua)
conList.Clear(); conList.Clear();
AddFunction(funtxt); AddFunction(funtxt);
AddConstant(conlua); AddConstant(conlua);
foreach(long k in datacfg.dicSetnames.Keys) foreach(long k in datacfg.dicSetnames.Keys)
{ {
string key="0x"+k.ToString("x"); string key="0x"+k.ToString("x");
...@@ -525,7 +527,29 @@ void InitCodeEditor(string funtxt,string conlua) ...@@ -525,7 +527,29 @@ void InitCodeEditor(string funtxt,string conlua)
AddConToolTip(key, datacfg.dicSetnames[k]); AddConToolTip(key, datacfg.dicSetnames[k]);
} }
} }
if(File.Exists(confstring))
{
string[] lines=File.ReadAllLines(confstring);
foreach(string line in lines)
{
if(line.StartsWith("!victory")
|| line.StartsWith("!counter"))
{
string[] ws = line.Split(' ');
if(ws.Length>2)
{
AddConToolTip(ws[1], ws[2]);
}
}
}
}
ReadStrings(confstring);
//MessageBox.Show(funList.Count.ToString()); //MessageBox.Show(funList.Count.ToString());
}
void ReadStrings(string txt)
{
} }
#endregion #endregion
...@@ -599,32 +623,46 @@ void AddFuncTooltip(string name,string desc) ...@@ -599,32 +623,46 @@ void AddFuncTooltip(string name,string desc)
{ {
if(!string.IsNullOrEmpty(name)) if(!string.IsNullOrEmpty(name))
{ {
AddAutoMenuItem(funList, name, desc);
string fname=GetFunName(name); string fname=GetFunName(name);
if(!tooltipDic.ContainsKey(fname)){ if(!tooltipDic.ContainsKey(fname)){
tooltipDic.Add(fname, desc ); tooltipDic.Add(fname, desc );
AutocompleteItem aitem=new AutocompleteItem(name);
aitem.ToolTipTitle = name;
aitem.ToolTipText = desc;
funList.Add(aitem);
} }
else else
tooltipDic[fname] += Environment.NewLine + desc; tooltipDic[fname] += Environment.NewLine + "●"+desc;
} }
} }
#endregion #endregion
void AddAutoMenuItem(List<AutocompleteItem> list,string key,string desc)
{
bool isExists=false;
foreach(AutocompleteItem ai in list)
{
if(ai.Text==key)
{
isExists=true;
ai.ToolTipText += Environment.NewLine + desc;
}
}
if(!isExists){
AutocompleteItem aitem=new AutocompleteItem(key);
aitem.ToolTipTitle = key;
aitem.ToolTipText = desc;
list.Add(aitem);
}
}
#region constant #region constant
void AddConToolTip(string key, string desc) void AddConToolTip(string key, string desc)
{ {
AutocompleteItem aitem=new AutocompleteItem(key); AddAutoMenuItem(conList, key,desc);
aitem.ToolTipTitle = key; if(tooltipDic.ContainsKey(key))
aitem.ToolTipText = desc; tooltipDic[key] += Environment.NewLine + desc;
conList.Add(aitem); else
tooltipDic.Add(key, desc); tooltipDic.Add(key, desc);
} }
void AddConstant(string conlua) void AddConstant(string conlua)
{ {
//conList.Add("con"); //conList.Add("con");
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
// //
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.2.4.1")] [assembly: AssemblyVersion("2.2.5.0")]
--created by DataEditorX
Debug.SetAIName("AI Name")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0) --player
Debug.SetPlayerInfo(1,15000,0,0) --AI
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position)
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position,bool revive_limit)
--Debug.PreAddCounter(Card card,int counter,int ccount)
--Debug.PreEquip(Card equip_card, Card target)
--Debug.PreSetTarget(Card card, Card target)
--end
Debug.ReloadFieldEnd()
Debug.ShowHint("Message")
aux.BeginPuzzle()
This diff is collapsed.
--created by DataEditorX
Debug.SetAIName("AI Name")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0) --player
Debug.SetPlayerInfo(1,15000,0,0) --AI
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position)
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position,bool revive_limit)
--Debug.PreAddCounter(Card card,int counter,int ccount)
--Debug.PreEquip(Card equip_card, Card target)
--Debug.PreSetTarget(Card card, Card target)
--end
Debug.ReloadFieldEnd()
Debug.ShowHint("Message")
aux.BeginPuzzle()
This diff is collapsed.
[DataEditorX]2.2.4.1[DataEditorX] [DataEditorX]2.2.5.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。 ★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...@@ -73,6 +73,9 @@ Email:247321453@qq.com ...@@ -73,6 +73,9 @@ Email:247321453@qq.com
描述不详细的bug,我修复不了。(都不知道是bug是什么) 描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史 ★更新历史
2.2.5.0
lua编辑器支持,读取和提示指示物代码。
添加残局示例single.lua
2.2.4.1 2.2.4.1
修复部分条件搜索 修复部分条件搜索
2.2.4.0 2.2.4.0
......
No preview for this file type
...@@ -5,15 +5,16 @@ F:\games\ygocore\script\constant.lua ...@@ -5,15 +5,16 @@ F:\games\ygocore\script\constant.lua
F:\games\ygocore\script\utility.lua F:\games\ygocore\script\utility.lua
F:\games\ygocore\script\c99995595.lua F:\games\ygocore\script\c99995595.lua
F:\games\ygocore\single\[sample]BerserkDragon.lua F:\games\ygocore\single\[sample]BerserkDragon.lua
F:\games\ygopro\script\c102380.lua
F:\games\ygocore\script\c131182.lua F:\games\ygocore\script\c131182.lua
F:\games\ygopro\script\c123709.lua F:\games\ygopro\script\c123709.lua
F:\games\ygopro\script\c126218.lua
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c191749.lua F:\games\ygopro\script\c191749.lua
F:\games\ygocore\script\c135598.lua F:\games\ygocore\script\c135598.lua
F:\games\ygocore\script\c126218.lua F:\games\ygocore\script\c126218.lua
E:\github\DataEditorX\DataEditorX\chinese\constant.lua E:\github\DataEditorX\DataEditorX\chinese\constant.lua
F:\games\ygocore\script\c900787.lua F:\games\ygocore\script\c900787.lua
F:\games\ygocore\script\c114932.lua F:\games\ygocore\script\c114932.lua
F:\games\ygopro\cards.cdb F:\games\ygopro\cards.cdb
\ No newline at end of file F:\single.lua
F:\games\ygopro\script\c126218.lua
F:\games\ygopro\script\c102380.lua
F:\games\ygopro\script\c168917.lua
\ No newline at end of file
--created by DataEditorX
Debug.SetAIName("AI Name")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0) --player
Debug.SetPlayerInfo(1,15000,0,0) --AI
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position)
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position,bool revive_limit)
--Debug.PreAddCounter(Card card,int counter,int ccount)
--Debug.PreEquip(Card equip_card, Card target)
--Debug.PreSetTarget(Card card, Card target)
--end
Debug.ReloadFieldEnd()
Debug.ShowHint("Message")
aux.BeginPuzzle()
This diff is collapsed.
--created by DataEditorX
Debug.SetAIName("AI Name")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0) --player
Debug.SetPlayerInfo(1,15000,0,0) --AI
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position)
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position,bool revive_limit)
--Debug.PreAddCounter(Card card,int counter,int ccount)
--Debug.PreEquip(Card equip_card, Card target)
--Debug.PreSetTarget(Card card, Card target)
--end
Debug.ReloadFieldEnd()
Debug.ShowHint("Message")
aux.BeginPuzzle()
This diff is collapsed.
[DataEditorX]2.2.4.1[DataEditorX] [DataEditorX]2.2.5.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。 ★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...@@ -73,6 +73,9 @@ Email:247321453@qq.com ...@@ -73,6 +73,9 @@ Email:247321453@qq.com
描述不详细的bug,我修复不了。(都不知道是bug是什么) 描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史 ★更新历史
2.2.5.0
lua编辑器支持,读取和提示指示物代码。
添加残局示例single.lua
2.2.4.1 2.2.4.1
修复部分条件搜索 修复部分条件搜索
2.2.4.0 2.2.4.0
......
No preview for this file type
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