changed the way callbacks work internally
This commit is contained in:
		| @@ -48,8 +48,8 @@ function lualogic_removegate(%gate) | ||||
| 	if(%gate.logicIsRemoved == false) | ||||
| 	{ | ||||
| 		%db = %gate.getDataBlock(); | ||||
| 		if(isFunction(%db.getName(), "Logic_onRemove")) | ||||
| 			%db.Logic_onRemove(%gate); | ||||
| 		//if(isFunction(%db.getName(), "Logic_onRemove")) | ||||
| 		//	%db.Logic_onRemove(%gate); | ||||
|  | ||||
| 		lualogic_send("RG;" @ %gate); | ||||
| 		%gate.logicIsRemoved = true; | ||||
| @@ -67,7 +67,7 @@ function lualogic_sendall() | ||||
| 		{ | ||||
| 			%brick = %group.getObject(%a); | ||||
| 			%data = %brick.getDataBlock(); | ||||
| 			if(%data.isLogic && %brick.isPlanted()) | ||||
| 			if(%data.isLogic && %brick.isPlanted() && !%brick.logicIsRemoved) | ||||
| 			{ | ||||
| 				if(%data.isLogicWire) | ||||
| 					lualogic_addwire(%brick); | ||||
| @@ -149,12 +149,12 @@ package LuaLogic_Bricks | ||||
| 	{ | ||||
| 		if(%this.isLogic) | ||||
| 		{ | ||||
| 			%brick.Logic_HandleRemove(); | ||||
| 			 | ||||
| 			if(%this.isLogicWire) | ||||
| 				lualogic_removewire(%brick); | ||||
| 			else if(%this.isLogicGate) | ||||
| 				lualogic_removegate(%brick); | ||||
| 			 | ||||
| 			%brick.Logic_HandleRemove(); | ||||
| 		} | ||||
| 		 | ||||
| 		parent::onDeath(%this, %brick); | ||||
| @@ -164,12 +164,12 @@ package LuaLogic_Bricks | ||||
| 	{ | ||||
| 		if(%this.isLogic && %brick.logicIsAdded) | ||||
| 		{ | ||||
| 			%brick.Logic_HandleRemove(); | ||||
| 			 | ||||
| 			if(%this.isLogicWire) | ||||
| 				lualogic_removewire(%brick); | ||||
| 			else if(%this.isLogicGate) | ||||
| 				lualogic_removegate(%brick); | ||||
| 			 | ||||
| 			%brick.Logic_HandleRemove(); | ||||
| 		} | ||||
| 		 | ||||
| 		parent::onRemove(%this, %brick); | ||||
|   | ||||
| @@ -96,8 +96,8 @@ function lualogic_send(%data) | ||||
| { | ||||
| 	if(isObject(LuaLogicTCP) && LuaLogicTCP.isConnected) | ||||
| 	{ | ||||
| 		while(strpos(%data, ";;") != -1) | ||||
| 			%data = strReplace(%data, ";;", "; ;"); | ||||
| 		//while(strpos(%data, ";;") != -1) | ||||
| 		//	%data = strReplace(%data, ";;", "; ;"); | ||||
| 		 | ||||
| 		if(strlen(LuaLogicTCP.data) + strlen(%data) >= 1024) | ||||
| 			LuaLogicTCP.sendData(); | ||||
| @@ -123,6 +123,10 @@ function lualogic_sendoptions() | ||||
| 	lualogic_send("OPT;FX_TIME;"		@ $Pref::Server::LuaLogic::OPT_FX_TIME); | ||||
| } | ||||
|  | ||||
| function lualogic_savedata(){ | ||||
| 	lualogic_send("SAVE"); | ||||
| } | ||||
|  | ||||
| function lualogic_sendinput(%gate, %argc, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15) | ||||
| { | ||||
| 	%args = %arg0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Redo
					Redo