Commit 88a6406b authored by keyongyu's avatar keyongyu

2.2.5.0

parent 65399193
......@@ -178,6 +178,12 @@
<None Include="chinese\mse-spelltrap.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="chinese\single.lua">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="chinese\strings.conf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="chinese\_functions.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......@@ -235,6 +241,12 @@
<None Include="english\mse-spelltrap.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="english\single.lua">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="english\strings.conf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="english\_functions.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
......@@ -32,7 +32,7 @@ public partial class MainForm : Form
List<string> cdblist;
string datapath;
string conflang,conflang_de,conflang_ce,confmsg,conflang_pe;
string funtxt,conlua,fieldtxt;
string funtxt,conlua,fieldtxt,confstring;
DataEditForm compare1,compare2;
Card[] tCards;
Dictionary<DataEditForm,string> list;
......@@ -77,6 +77,7 @@ void Init(string datapath)
confmsg = MyPath.Combine(datapath, "message.txt");
funtxt = MyPath.Combine(datapath, "_functions.txt");
conlua = MyPath.Combine(datapath, "constant.lua");
confstring = MyPath.Combine(datapath, "strings.conf");
InitializeComponent();
LANG.InitForm(this, conflang);
LANG.LoadMessage(confmsg);
......@@ -517,6 +518,7 @@ void InitCodeEditor(string funtxt,string conlua)
conList.Clear();
AddFunction(funtxt);
AddConstant(conlua);
foreach(long k in datacfg.dicSetnames.Keys)
{
string key="0x"+k.ToString("x");
......@@ -525,7 +527,29 @@ void InitCodeEditor(string funtxt,string conlua)
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());
}
void ReadStrings(string txt)
{
}
#endregion
......@@ -599,32 +623,46 @@ void AddFuncTooltip(string name,string desc)
{
if(!string.IsNullOrEmpty(name))
{
AddAutoMenuItem(funList, name, desc);
string fname=GetFunName(name);
if(!tooltipDic.ContainsKey(fname)){
tooltipDic.Add(fname, desc );
AutocompleteItem aitem=new AutocompleteItem(name);
aitem.ToolTipTitle = name;
aitem.ToolTipText = desc;
funList.Add(aitem);
}
else
tooltipDic[fname] += Environment.NewLine + desc;
tooltipDic[fname] += Environment.NewLine + "●"+desc;
}
}
#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
void AddConToolTip(string key, string desc)
{
AutocompleteItem aitem=new AutocompleteItem(key);
aitem.ToolTipTitle = key;
aitem.ToolTipText = desc;
conList.Add(aitem);
tooltipDic.Add(key, desc);
AddAutoMenuItem(conList, key,desc);
if(tooltipDic.ContainsKey(key))
tooltipDic[key] += Environment.NewLine + desc;
else
tooltipDic.Add(key, desc);
}
void AddConstant(string conlua)
{
//conList.Add("con");
......
......@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// 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]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -73,6 +73,9 @@ Email:247321453@qq.com
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.5.0
lua编辑器支持,读取和提示指示物代码。
添加残局示例single.lua
2.2.4.1
修复部分条件搜索
2.2.4.0
......
No preview for this file type
......@@ -5,15 +5,16 @@ F:\games\ygocore\script\constant.lua
F:\games\ygocore\script\utility.lua
F:\games\ygocore\script\c99995595.lua
F:\games\ygocore\single\[sample]BerserkDragon.lua
F:\games\ygopro\script\c102380.lua
F:\games\ygocore\script\c131182.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\ygocore\script\c135598.lua
F:\games\ygocore\script\c126218.lua
E:\github\DataEditorX\DataEditorX\chinese\constant.lua
F:\games\ygocore\script\c900787.lua
F:\games\ygocore\script\c114932.lua
F:\games\ygopro\cards.cdb
\ No newline at end of file
F:\games\ygopro\cards.cdb
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]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -73,6 +73,9 @@ Email:247321453@qq.com
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.5.0
lua编辑器支持,读取和提示指示物代码。
添加残局示例single.lua
2.2.4.1
修复部分条件搜索
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