From e039a8bcecde03cc803fa86b3bea4d4d75bfda41 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 23 Feb 2012 03:14:11 +1000 Subject: Fake some more functions in the test harness. --- LuaSL/src/LuaSL_test.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'LuaSL') diff --git a/LuaSL/src/LuaSL_test.c b/LuaSL/src/LuaSL_test.c index 9053878..c8512b3 100644 --- a/LuaSL/src/LuaSL_test.c +++ b/LuaSL/src/LuaSL_test.c @@ -124,7 +124,7 @@ static Eina_Bool _add(void *data, int type __UNUSED__, Ecore_Con_Event_Server_Ad snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR); eina_file_dir_list(buf, EINA_TRUE, dirList_compile, game); // Wait awhile, then quit all scripts we started, for testing. - ecore_timer_add(3.5, _quit_timer_cb, game); + ecore_timer_add(4.0, _quit_timer_cb, game); return ECORE_CALLBACK_RENEW; } @@ -227,12 +227,24 @@ static Eina_Bool _data(void *data, int type __UNUSED__, Ecore_Con_Event_Server_D { if (0 == strcmp(command, "llGetKey()")) // Send back a random UUID for testing. sendForth(game, SID, "\"%08lx-%04lx-%04lx-%04lx-%012lx\"", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); + else if (0 == strcmp(command, "llGetOwner()")) // Send back a random UUID for testing. + sendForth(game, SID, "\"%08lx-%04lx-%04lx-%04lx-%012lx\"", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); else if (0 == strcmp(command, "llGetPos()")) // Send back a fixed position for testing. sendForth(game, SID, "{x=128.0, y=128.0, z=128.0}"); else if (0 == strcmp(command, "llGetRot()")) // Send back a fixed rotation for testing. sendForth(game, SID, "{x=0.0, y=0.0, z=0.0, s=1.0}"); else if (0 == strcmp(command, "llGetObjectDesc()")) // Send back a blank description for testing. sendForth(game, SID, "\"\""); + else if (0 == strncmp(command, "llGetAlpha(", 11)) // Send back a fixed alpha for testing. + sendForth(game, SID, "1.0"); + else if (0 == strcmp(command, "llGetInventoryNumber(7)")) // Send back a fixed value for testing. + sendForth(game, SID, "3"); + else if (0 == strcmp(command, "llGetInventoryName(7, 2)")) // Send back a fixed value for testing. + sendForth(game, SID, "\".readme\""); + else if (0 == strcmp(command, "llGetInventoryName(7, 1)")) // Send back a fixed value for testing. + sendForth(game, SID, "\".POSITIONS\""); + else if (0 == strcmp(command, "llGetInventoryName(7, 0)")) // Send back a fixed value for testing. + sendForth(game, SID, "\".MENUITEMS\""); else PI("Script %s sent command %s", SID, command); } -- cgit v1.1