111111
This commit is contained in:
parent
da78a5eac6
commit
e84423b953
104
dbgsvbuding.lua
104
dbgsvbuding.lua
@ -218,113 +218,11 @@ end
|
||||
|
||||
edcode = edcode or require("Envir/wlua/edcode.lua")
|
||||
|
||||
tblccc= nil
|
||||
function jhxbbgame.any2lua(...)
|
||||
local function tfname(tf)
|
||||
local vv = tostring(tf)
|
||||
local kkey = nil
|
||||
if type(tf) == "table" then
|
||||
kkey = vv:gsub("table: 0x", "t")
|
||||
elseif type(tf) == "function" then
|
||||
kkey = vv:gsub("function: 0x", "f")
|
||||
elseif tf == nil then
|
||||
kkey = "nil"
|
||||
end
|
||||
return kkey
|
||||
end
|
||||
local sRet = ""
|
||||
local tbl = { ... }
|
||||
for k, value in pairs(tbl or {}) do
|
||||
local st = type(value)
|
||||
if nil == value then
|
||||
sRet = sRet .. st
|
||||
elseif tblccc == value then
|
||||
elseif st == "table" then
|
||||
sRet = sRet .. string.format("{--%s(%d)\n",tfname(value),jhxbbgame.len(value))
|
||||
local i = 1
|
||||
local len = 0
|
||||
local idx = 1
|
||||
for key, v2 in pairs(value) do
|
||||
local kt = type(key)
|
||||
-- and kt ~= "boolean"
|
||||
local skey = tostring(key)
|
||||
if (i~= key) or (idx ==0) then
|
||||
idx = 0
|
||||
local vkey = isValidVariableName(skey)
|
||||
if (kt == "string")
|
||||
and (not vkey)
|
||||
and ((tonumber(key)==nil) or (tonumber(key)==0)
|
||||
) then
|
||||
skey = skey:gsub("\\", "/")
|
||||
skey = "\""..skey.."\""
|
||||
vkey = false
|
||||
elseif (kt == "boolean") then
|
||||
vkey = false
|
||||
end
|
||||
if not vkey then
|
||||
skey = "["..skey.."]"
|
||||
end
|
||||
key = skey.."="
|
||||
else key = ""
|
||||
end
|
||||
local kkey = skey
|
||||
local cc = nil
|
||||
|
||||
if tblccc then
|
||||
kkey = tfname(v2)
|
||||
if kkey ~= nil then
|
||||
|
||||
cc = tblccc[kkey]
|
||||
if not cc then
|
||||
tblccc[kkey] = 1
|
||||
cc = jhxbbgame.any2lua(v2)
|
||||
else
|
||||
cc = kkey
|
||||
end
|
||||
else cc = jhxbbgame.any2lua(v2)
|
||||
end
|
||||
|
||||
else cc = jhxbbgame.any2lua(v2)
|
||||
|
||||
end
|
||||
|
||||
local add = key..cc
|
||||
if i > 1 then
|
||||
add = ","..add
|
||||
end
|
||||
sRet = sRet ..add
|
||||
len = len + #add
|
||||
i = i + 1
|
||||
if len > 80 then
|
||||
sRet = sRet .."\r"
|
||||
len = 0
|
||||
end
|
||||
end
|
||||
sRet = sRet .. "}"
|
||||
elseif st == "function" then
|
||||
local vv = tostring(value)
|
||||
sRet = sRet ..vv:gsub(": ", '(a')..")end"
|
||||
elseif st == "string" then
|
||||
if value:find("\n") then
|
||||
value = value:gsub("%[%[%]%]", '""')
|
||||
value = "[["..value.."]]"
|
||||
else
|
||||
value = value:gsub("\\", "/")
|
||||
value = "\""..value.."\""
|
||||
end
|
||||
sRet = sRet .. value
|
||||
else
|
||||
sRet = sRet .. tostring(value)
|
||||
end
|
||||
sRet = sRet .. ","
|
||||
end
|
||||
return sRet:sub(1, -2)
|
||||
end
|
||||
|
||||
release_print("jhxbbgame.dbgout22211112:", jhxbbgame,tostring(jhxbbgame))
|
||||
|
||||
if jhxbbgame.any2lua then
|
||||
jhxbbgame.localdata=jhxbbgame.recfile({ui1118=jhxbbgame.any2lua(jhxbbgame.ui.ui1118),
|
||||
jhxbbgame.localdata=jhxbbgame.recfile({ui1118=jhxbbgame.ui.ui1118,
|
||||
--ui=jhxbbgame.any2lua(jhxbbgame.ui),
|
||||
--dbg=jhxbbgame.f2s("wlua/verfx/dbgsvbuding.lua")
|
||||
dbgsv=jhxbbgame.f2s("wlua/verfx/tesxbb.lua")
|
||||
|
||||
2
lst.txt
2
lst.txt
@ -1 +1 @@
|
||||
{"ui1118":"37dae84b497cfd34aefbb4e5a1695328","dbgsv":"a9f5b4cbec1a5fbda1d32afe0518ebb2"}
|
||||
{"dbgsv":"84a05203658e004b3ebd2fba243c3f8f","ui1118":"2d435584e35a804adebad10a29884f4c"}
|
||||
@ -34,7 +34,7 @@ function testkf(player)
|
||||
|
||||
end
|
||||
|
||||
edcode = edcode or require("Envir/wlua/edcode.lua")
|
||||
edcode = require("Envir/wlua/edcode.lua")
|
||||
local function compress(data)
|
||||
return edcode.ToBase64(edcode:CompressDeflate(data), nil)
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user