Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
聖園ミカ
DataEditorX
Commits
db508261
Commit
db508261
authored
Apr 15, 2018
by
Yumekaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8b057a54
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1735 additions
and
13 deletions
+1735
-13
DataEditorX/Core/CardEdit.cs
DataEditorX/Core/CardEdit.cs
+23
-12
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+22
-1
DataEditorX/data/constant.lua
DataEditorX/data/constant.lua
+797
-0
DataEditorX/data/strings.conf
DataEditorX/data/strings.conf
+893
-0
No files found.
DataEditorX/Core/CardEdit.cs
View file @
db508261
...
@@ -276,18 +276,29 @@ public bool OpenScript(bool openinthis, string addrequire)
...
@@ -276,18 +276,29 @@ public bool OpenScript(bool openinthis, string addrequire)
FileMode
.
OpenOrCreate
,
FileAccess
.
Write
))
FileMode
.
OpenOrCreate
,
FileAccess
.
Write
))
{
{
StreamWriter
sw
=
new
StreamWriter
(
fs
,
new
UTF8Encoding
(
false
));
StreamWriter
sw
=
new
StreamWriter
(
fs
,
new
UTF8Encoding
(
false
));
if
(
c
.
id
>
0
)
{
//card script
if
(
string
.
IsNullOrEmpty
(
addrequire
))
sw
.
WriteLine
(
"--"
+
c
.
name
);
{
sw
.
WriteLine
(
"local m="
+
id
.
ToString
());
// OCG script
sw
.
WriteLine
(
"local cm=_G[\"c\"..m]"
);
sw
.
WriteLine
(
"--"
+
c
.
name
);
if
(
addrequire
.
Length
>
0
)
sw
.
WriteLine
(
"function c"
+
id
.
ToString
()
+
".initial_effect(c)"
);
sw
.
WriteLine
(
"xpcall(function() require(\"expansions/script/"
+
addrequire
+
"\") end,function() require(\"script/"
+
addrequire
+
"\") end)"
);
sw
.
WriteLine
(
"\t"
);
sw
.
WriteLine
(
"function cm.initial_effect(c)"
);
sw
.
WriteLine
(
"end"
);
sw
.
WriteLine
(
"\t"
);
}
sw
.
WriteLine
(
"end"
);
else
}
else
{
//module script
{
sw
.
WriteLine
(
"--Module script \""
+
addrequire
+
"\""
);
// DIY script
}
sw
.
WriteLine
(
"--"
+
c
.
name
);
sw
.
WriteLine
(
"local m="
+
id
.
ToString
());
sw
.
WriteLine
(
"local cm=_G[\"c\"..m]"
);
sw
.
WriteLine
(
"xpcall(function() require(\"expansions/script/"
+
addrequire
+
"\") end,function() require(\"script/"
+
addrequire
+
"\") end)"
);
sw
.
WriteLine
(
"function cm.initial_effect(c)"
);
sw
.
WriteLine
(
"\t"
);
sw
.
WriteLine
(
"end"
);
}
/*else
{ //module script
sw.WriteLine("--Module script \"" + addrequire + "\"");
}*/
sw
.
Close
();
sw
.
Close
();
fs
.
Close
();
fs
.
Close
();
}
}
...
...
DataEditorX/DataEditForm.cs
View file @
db508261
...
@@ -23,7 +23,28 @@ namespace DataEditorX
...
@@ -23,7 +23,28 @@ namespace DataEditorX
{
{
public
partial
class
DataEditForm
:
DockContent
,
IDataForm
public
partial
class
DataEditForm
:
DockContent
,
IDataForm
{
{
public
string
addrequire
;
private
string
addrequire_str
;
public
string
addrequire
{
get
{
if
(!
string
.
IsNullOrEmpty
(
addrequire_str
))
return
addrequire_str
;
else
{
string
cdbName
=
Path
.
GetFileNameWithoutExtension
(
nowCdbFile
);
if
(
cdbName
.
Length
>
0
&&
File
.
Exists
(
GetPath
().
GetModuleScript
(
cdbName
)))
return
cdbName
;
}
return
""
;
}
set
{
addrequire_str
=
value
;
}
}
#
region
成员变量
/
构造
#
region
成员变量
/
构造
TaskHelper
tasker
=
null
;
TaskHelper
tasker
=
null
;
string
taskname
;
string
taskname
;
...
...
DataEditorX/data/constant.lua
0 → 100644
View file @
db508261
This diff is collapsed.
Click to expand it.
DataEditorX/data/strings.conf
0 → 100644
View file @
db508261
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment