<commit_before>Test = {}


function Test:Init(kernel, self, arg) 
	io.write("Hello Lua Init!\n");
end	

function Test:AfterInit(kernel, self, arg)
	io.write("Hello Lua AfterInit!\n");
	
	local nMaxhp = QueryPropertyInt(kernel, self, "MAXHP");
	io.write("Hello Lua MAXHP:" ..nMaxhp .. "\n");
	
	--property callback
	AddPropertyCallBack(kernel, self, "MAXHP", "Test", "MaxPropertyCallBack");
	SetPropertyInt(kernel, self, "MAXHP", 400);	
	
	nMaxhp = QueryPropertyInt(kernel, self, "MAXHP");
	io.write("Hello Lua QueryPropertyInt MAXHP:" ..nMaxhp .. "\n");
	
	--record callback
	AddRecordCallBack(kernel, self, "TaskList","Test", "TaskListCallBack");	
	
	local varTask =  NFCVarList();
	varTask:AddString("Task_From_Lua");
	varTask:AddInt(1);
	
	AddRow(kernel, self, "TaskList", varTask);
	SetRecordInt(kernel, self, "TaskList", 0, 1, 3);
	
	--event callback
	AddEventCallBack(kernel, self, 1, "Test", "EventCallBack");
	
	local obj = NFCVarList();
	obj:AddInt(21);
	obj:AddFloat(22.5);
	obj:AddString("str23");	

	local n64Var = NFINT64();
	n64Var:SetIdent(241);
	n64Var:SetnSerial(242);
	
	obj:AddObject(n64Var);
	<commit_msg>Modify lua interface<commit_after>Test = {}


function Test:Init(kernel, self, arg) 
	io.write("Hello Lua Init!\n");
end	

function Test:AfterInit(kernel, self, arg)
	io.write("Hello Lua AfterInit!\n");
	
	local nMaxhp = GetPropertyInt(kernel, self, "MAXHP");
	io.write("Hello Lua MAXHP:" ..nMaxhp .. "\n");
	
	--property callback
	AddPropertyCallBack(kernel, self, "MAXHP", "Test", "MaxPropertyCallBack");
	SetPropertyInt(kernel, self, "MAXHP", 400);	
	
	nMaxhp = GetPropertyInt(kernel, self, "MAXHP");
	io.write("Hello Lua GetPropertyInt MAXHP:" ..nMaxhp .. "\n");
	
	--record callback
	AddRecordCallBack(kernel, self, "TaskList","Test", "TaskListCallBack");	
	
	local varTask =  NFCVarList();
	varTask:AddString("Task_From_Lua");
	varTask:AddInt(1);
	
	AddRow(kernel, self, "TaskList", varTask);
	SetRecordInt(kernel, self, "TaskList", 0, 1, 3);
	
	--event callback
	AddEventCallBack(kernel, self, 1, "Test", "EventCallBack");
	
	local obj = NFCVarList();
	obj:AddInt(21);
	obj:AddFloat(22.5);
	obj:AddString("str23");	

	local n64Var = NFINT64();
	n64Var:SetIdent(241);
	n64Var:SetnSerial(242);
	
	obj:AddObject(n64Var);
	
{'fraction_non_alphanumeric': 0.17236783651710352, 'fraction_numerical': 0.027543314082629944, 'mean_word_length': 5.415954415954416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3424605', 'n_tokens_mistral': 907, 'n_tokens_neox': 820, 'n_words': 176}