mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
16
luban_examples/Projects/Python_json/gen.bat
Normal file
16
luban_examples/Projects/Python_json/gen.bat
Normal file
@@ -0,0 +1,16 @@
|
||||
set WORKSPACE=..\..
|
||||
|
||||
set LUBAN_DLL=%WORKSPACE%\Tools\Luban\Luban.dll
|
||||
set CONF_ROOT=%WORKSPACE%\DataTables
|
||||
|
||||
dotnet %LUBAN_DLL% ^
|
||||
-t all ^
|
||||
-c python-json ^
|
||||
-d json ^
|
||||
--conf %CONF_ROOT%\luban.conf ^
|
||||
-x outputCodeDir=gen ^
|
||||
-x outputDataDir=..\GenerateDatas\json ^
|
||||
-x pathValidator.rootDir=%WORKSPACE%\Projects\Csharp_Unity_bin ^
|
||||
-x l10n.textProviderFile=*@%WORKSPACE%\DataTables\Datas\l10n\texts.json
|
||||
|
||||
pause
|
2200
luban_examples/Projects/Python_json/gen/schema.py
Normal file
2200
luban_examples/Projects/Python_json/gen/schema.py
Normal file
File diff suppressed because it is too large
Load Diff
16
luban_examples/Projects/Python_json/main.py
Normal file
16
luban_examples/Projects/Python_json/main.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.abspath('gen'))
|
||||
|
||||
import schema
|
||||
|
||||
def loader(f):
|
||||
return json.load(open('../GenerateDatas/json/' + f + ".json", 'r', encoding="utf-8"))
|
||||
|
||||
tables = schema.cfg_Tables(loader)
|
||||
|
||||
print(tables)
|
||||
|
||||
r = tables.TbFullTypes.getDataList()[0].__dict__
|
||||
print(r)
|
Reference in New Issue
Block a user