游戏王残局简化版

Diff
Login

Diff

Differences From Artifact [b7c3b4fbca]:

To Artifact [8d93103f41]:


1
2
3
4
5
6
7
8
9

10
11
12
13

14
15
16
17
18
19


20
21
22
23

24
25
26
27

28
29
30
31

32
33
34
35
36
37
38
39
40
41







42
43
44
45

46
47
48
1
2
3
4
5
6
7
8

9
10
11
12

13
14
15
16
17


18
19
20
21
22

23
24
25
26

27
28
29
30

31
32
33
34







35
36
37
38
39
40
41
42
43
44

45
46
47
48








-
+



-
+




-
-
+
+



-
+



-
+



-
+



-
-
-
-
-
-
-
+
+
+
+
+
+
+



-
+



package.path = [[.\lua_lib\?.lua;]] .. package.path
package.cpath = [[.\lua_lib\?.dll;]] .. package.cpath
local 字集码互转库 = require("u8_to_a")
local u8 = 字集码互转库.u8_to_a
local f = require(u8("常用库"))
local d_3 = {}
--~ 文件路
--~ 普常量文件名
function d_3.产普常量文件(o1, o2)
function d_3.产普常量文件(u1, u2)
  local k1, k2
  local h1_0
  --~ 文
  k1 = f.读文件(o1)
  k1 = f.读文件(u1)
  k1 = string.gsub(k1, "%-%-" .. "[^\n]*", "")
  k1 = string.gsub(k1, "[ \t]", "")
  --~ 常量排
  h1_0 = f.历文(k1, string.gmatch, "[^\n]+")
  for o1 = 1, #h1_0 do
    h1_0[o1] = f.加前缀(h1_0[o1], [[h1_0.]])
  for u1 = 1, #h1_0 do
    h1_0[u1] = f.加前缀(h1_0[u1], [[h1_0.]])
    end
  --~ 文
  k2 = f.加对限(h1_0)
  f.写文件(k2, o2)
  f.写文件(k2, u2)
  end
--~ 文件路
--~ 字段名文件名
function d_3.产字段名文件(o1, o2)
function d_3.产字段名文件(u1, u2)
  local k1, k2
  local h1_0
  --~ 文
  k1 = f.读文件(o1)
  k1 = f.读文件(u1)
  --~ 常量排
  h1_0 = f.历文(k1, string.gmatch, "[^\n]+")
  h1_0 = f.历排(h1_0, f.全筛文, "^!setname")
  for o3 = 1, #h1_0 do
    h1_0[o3] = f.删左右空白(h1_0[o3])
    h1_0[o3] = string.gsub(h1_0[o3], "^!setname ", "")
    h1_0[o3] = string.gsub(h1_0[o3], "[|\t].+", "")
    h1_0[o3] = string.gsub(h1_0[o3], " ", "=", 1)
    h1_0[o3] = string.gsub(h1_0[o3], "[0-9a-z]+", "h1_0[%1]", 1)
    h1_0[o3] = string.gsub(h1_0[o3], "=([^\n]+)", [[="%1"]], 1)
  for u3 = 1, #h1_0 do
    h1_0[u3] = f.删左右空白(h1_0[u3])
    h1_0[u3] = string.gsub(h1_0[u3], "^!setname ", "")
    h1_0[u3] = string.gsub(h1_0[u3], "[|\t].+", "")
    h1_0[u3] = string.gsub(h1_0[u3], " ", "=", 1)
    h1_0[u3] = string.gsub(h1_0[u3], "[0-9a-z]+", "h1_0[%1]", 1)
    h1_0[u3] = string.gsub(h1_0[u3], "=([^\n]+)", [[="%1"]], 1)
    end
  --~ 文
  k2 = f.加对限(h1_0)
  f.写文件(k2, o2)
  f.写文件(k2, u2)
  end
d_3.产普常量文件([[D:\install\YGOPro/script/constant.lua]], u8("普常量.lua"))
d_3.产字段名文件([[D:\install\YGOPro/strings.conf]], u8("字段名.lua"))