Lua hooks needed!
#11
I prepared those constants (so that they're together logically), but haven't implemented the two hooks yet. I'm not good enough with Lua interfacing for those two, so I'm guessing it's up to FakeTruth to provide them.

I don't know how to pass the needed values. For BlockToDrops, The C++ code passes, among others, a pointer to an array of drops, into which the drops are added; I have no idea how to simulate that in Lua. For ChunkGenerating, the whole chunk data needs to be passed back and forth reasonably fast. That's 64K blocks, 64K metas, heightmap, biome map, entities and tile entities.

I thought I did the OnCrafting constant, too, but I guess I didn't Smile That one in C++ uses an array of items in the crafting grid, the grid dimensions, the output item and a parameter to say that the ingredients for one result are to be removed from the grid. (cCraftingRecipes::Offer() vs cCraftingRecipes::Craft() ). Again, no idea on how to interface to that in Lua.
Reply
Thanks given by:


Messages In This Thread
Lua hooks needed! - by Taugeshtu - 06-05-2012, 11:34 PM
RE: Lua hooks needed! - by xoft - 06-06-2012, 12:00 AM
RE: Lua hooks needed! - by xoft - 06-06-2012, 01:24 AM
RE: Lua hooks needed! - by Taugeshtu - 06-06-2012, 01:29 AM
RE: Lua hooks needed! - by xoft - 06-06-2012, 01:38 AM
RE: Lua hooks needed! - by Taugeshtu - 06-06-2012, 01:51 AM
RE: Lua hooks needed! - by xoft - 06-06-2012, 02:13 AM
RE: Lua hooks needed! - by Taugeshtu - 06-06-2012, 02:19 AM
RE: Lua hooks needed! - by FakeTruth - 06-06-2012, 03:17 AM
RE: Lua hooks needed! - by Taugeshtu - 06-08-2012, 04:27 AM
RE: Lua hooks needed! - by xoft - 06-08-2012, 04:35 AM
RE: Lua hooks needed! - by Taugeshtu - 06-08-2012, 05:04 AM
RE: Lua hooks needed! - by xoft - 06-08-2012, 06:39 AM
RE: Lua hooks needed! - by Taugeshtu - 06-08-2012, 07:14 AM
RE: Lua hooks needed! - by xoft - 06-13-2012, 07:40 AM
RE: Lua hooks needed! - by Taugeshtu - 06-14-2012, 05:48 AM
RE: Lua hooks needed! - by FakeTruth - 06-14-2012, 07:03 AM
RE: Lua hooks needed! - by xoft - 06-14-2012, 06:18 AM
RE: Lua hooks needed! - by Taugeshtu - 06-14-2012, 06:22 AM
RE: Lua hooks needed! - by xoft - 06-14-2012, 06:29 AM
RE: Lua hooks needed! - by Taugeshtu - 06-14-2012, 08:54 AM
RE: Lua hooks needed! - by FakeTruth - 06-14-2012, 09:48 AM
RE: Lua hooks needed! - by xoft - 06-14-2012, 03:44 PM
RE: Lua hooks needed! - by Taugeshtu - 06-14-2012, 08:44 PM
RE: Lua hooks needed! - by xoft - 06-15-2012, 12:05 AM
RE: Lua hooks needed! - by FakeTruth - 06-15-2012, 01:11 AM
RE: Lua hooks needed! - by Taugeshtu - 06-15-2012, 01:58 AM
RE: Lua hooks needed! - by xoft - 06-15-2012, 03:06 AM
RE: Lua hooks needed! - by Taugeshtu - 06-15-2012, 03:13 AM
RE: Lua hooks needed! - by xoft - 06-15-2012, 03:31 AM
RE: Lua hooks needed! - by Taugeshtu - 09-02-2012, 03:34 AM
RE: Lua hooks needed! - by xoft - 09-02-2012, 07:20 AM
RE: Lua hooks needed! - by FakeTruth - 09-02-2012, 08:47 AM
RE: Lua hooks needed! - by xoft - 01-06-2013, 05:29 AM
RE: Lua hooks needed! - by bearbin - 01-06-2013, 06:00 AM
RE: Lua hooks needed! - by xoft - 01-06-2013, 06:34 AM
RE: Lua hooks needed! - by xoft - 01-06-2013, 07:34 AM
RE: Lua hooks needed! - by bearbin - 01-06-2013, 09:15 PM
RE: Lua hooks needed! - by xoft - 01-07-2013, 05:49 AM
RE: Lua hooks needed! - by NiLSPACE - 01-06-2013, 11:13 PM
RE: Lua hooks needed! - by FakeTruth - 01-07-2013, 01:51 AM
RE: Lua hooks needed! - by Luksor - 01-07-2013, 02:22 AM
RE: Lua hooks needed! - by xoft - 01-07-2013, 05:53 AM
RE: Lua hooks needed! - by NiLSPACE - 01-07-2013, 02:18 AM
RE: Lua hooks needed! - by bearbin - 01-07-2013, 05:53 AM
RE: Lua hooks needed! - by bearbin - 01-07-2013, 06:30 AM
RE: Lua hooks needed! - by Taugeshtu - 01-07-2013, 07:51 AM
RE: Lua hooks needed! - by NiLSPACE - 01-07-2013, 11:49 PM
RE: Lua hooks needed! - by bearbin - 01-08-2013, 04:25 AM
RE: Lua hooks needed! - by xoft - 01-08-2013, 03:03 PM
RE: Lua hooks needed! - by bearbin - 01-08-2013, 05:36 PM
RE: Lua hooks needed! - by Luksor - 01-10-2013, 01:58 AM
RE: Lua hooks needed! - by bearbin - 01-10-2013, 03:08 AM
RE: Lua hooks needed! - by NiLSPACE - 01-10-2013, 03:16 AM
RE: Lua hooks needed! - by bearbin - 01-10-2013, 03:27 AM
RE: Lua hooks needed! - by xoft - 01-10-2013, 08:18 PM
RE: Lua hooks needed! - by Luksor - 01-11-2013, 06:10 AM
RE: Lua hooks needed! - by xoft - 01-11-2013, 07:21 PM
RE: Lua hooks needed! - by bearbin - 01-12-2013, 02:38 AM
RE: Lua hooks needed! - by xoft - 01-12-2013, 02:58 PM
RE: Lua hooks needed! - by xoft - 01-13-2013, 09:13 PM
RE: Lua hooks needed! - by bearbin - 01-14-2013, 05:37 AM
RE: Lua hooks needed! - by xoft - 01-14-2013, 06:10 PM
RE: Lua hooks needed! - by bearbin - 01-14-2013, 11:42 PM
RE: Lua hooks needed! - by Taugeshtu - 01-19-2013, 02:51 AM
RE: Lua hooks needed! - by bearbin - 01-19-2013, 02:52 AM
RE: Lua hooks needed! - by xoft - 01-19-2013, 04:19 AM
RE: Lua hooks needed! - by xoft - 01-20-2013, 07:32 PM
RE: Lua hooks needed! - by NiLSPACE - 01-20-2013, 08:24 PM
RE: Lua hooks needed! - by bearbin - 01-21-2013, 01:40 AM
RE: Lua hooks needed! - by xoft - 01-21-2013, 06:43 PM
RE: Lua hooks needed! - by FakeTruth - 01-21-2013, 11:23 PM
RE: Lua hooks needed! - by xoft - 01-22-2013, 05:13 PM
RE: Lua hooks needed! - by FakeTruth - 01-23-2013, 02:13 AM
RE: Lua hooks needed! - by xoft - 02-01-2013, 07:45 PM
RE: Lua hooks needed! - by Taugeshtu - 02-01-2013, 07:58 PM
RE: Lua hooks needed! - by xoft - 02-01-2013, 09:08 PM
RE: Lua hooks needed! - by xoft - 02-06-2013, 05:57 AM
RE: Lua hooks needed! - by xoft - 02-12-2013, 05:51 PM
RE: Lua hooks needed! - by bearbin - 02-13-2013, 02:23 AM
RE: Lua hooks needed! - by NiLSPACE - 02-13-2013, 06:40 AM
RE: Lua hooks needed! - by xoft - 02-13-2013, 07:00 AM
RE: Lua hooks needed! - by NiLSPACE - 02-13-2013, 07:21 AM
RE: Lua hooks needed! - by xoft - 02-14-2013, 05:26 AM
RE: Lua hooks needed! - by NiLSPACE - 02-14-2013, 05:36 AM
RE: Lua hooks needed! - by xoft - 02-14-2013, 05:57 AM
RE: Lua hooks needed! - by NiLSPACE - 02-14-2013, 06:01 AM
RE: Lua hooks needed! - by xoft - 02-14-2013, 06:09 AM
RE: Lua hooks needed! - by xoft - 02-15-2013, 06:57 AM
RE: Lua hooks needed! - by NiLSPACE - 02-15-2013, 07:04 AM
RE: Lua hooks needed! - by xoft - 02-15-2013, 07:33 AM
RE: Lua hooks needed! - by Taugeshtu - 02-15-2013, 06:53 PM
RE: Lua hooks needed! - by xoft - 02-15-2013, 07:46 PM
RE: Lua hooks needed! - by NiLSPACE - 02-17-2013, 08:49 PM
RE: Lua hooks needed! - by FakeTruth - 02-17-2013, 10:23 PM
RE: Lua hooks needed! - by NiLSPACE - 02-18-2013, 03:37 AM
RE: Lua hooks needed! - by FakeTruth - 02-18-2013, 06:41 AM
RE: Lua hooks needed! - by NiLSPACE - 02-18-2013, 06:51 AM
RE: Lua hooks needed! - by FakeTruth - 02-18-2013, 07:05 AM
RE: Lua hooks needed! - by NiLSPACE - 02-18-2013, 07:10 AM
RE: Lua hooks needed! - by xoft - 02-18-2013, 08:17 AM
RE: Lua hooks needed! - by NiLSPACE - 02-20-2013, 03:09 AM
RE: Lua hooks needed! - by NiLSPACE - 02-20-2013, 05:07 AM
RE: Lua hooks needed! - by xoft - 02-20-2013, 06:06 AM
RE: Lua hooks needed! - by NiLSPACE - 02-20-2013, 06:25 AM
RE: Lua hooks needed! - by xoft - 02-20-2013, 04:27 PM
RE: Lua hooks needed! - by NiLSPACE - 02-20-2013, 07:57 PM
RE: Lua hooks needed! - by xoft - 02-20-2013, 10:49 PM
RE: Lua hooks needed! - by NiLSPACE - 02-20-2013, 11:07 PM
RE: Lua hooks needed! - by FakeTruth - 02-21-2013, 05:20 AM
RE: Lua hooks needed! - by NiLSPACE - 02-21-2013, 05:23 AM
RE: Lua hooks needed! - by xoft - 02-21-2013, 11:51 PM
RE: Lua hooks needed! - by NiLSPACE - 02-22-2013, 12:04 AM
RE: Lua hooks needed! - by xoft - 02-22-2013, 12:20 AM
RE: Lua hooks needed! - by NiLSPACE - 03-20-2013, 04:51 AM
RE: Lua hooks needed! - by xoft - 03-20-2013, 05:56 AM
RE: Lua hooks needed! - by NiLSPACE - 03-20-2013, 06:23 AM
RE: Lua hooks needed! - by xoft - 03-20-2013, 06:25 AM
RE: Lua hooks needed! - by NiLSPACE - 04-07-2013, 09:37 PM
RE: Lua hooks needed! - by xoft - 04-08-2013, 05:32 PM
RE: Lua hooks needed! - by NiLSPACE - 04-08-2013, 11:29 PM
RE: Lua hooks needed! - by xoft - 04-09-2013, 01:09 AM
RE: Lua hooks needed! - by NiLSPACE - 05-25-2013, 04:40 AM
RE: Lua hooks needed! - by xoft - 05-25-2013, 05:54 AM
RE: Lua hooks needed! - by NiLSPACE - 05-25-2013, 06:44 AM
RE: Lua hooks needed! - by NiLSPACE - 07-04-2013, 09:59 PM
RE: Lua hooks needed! - by xoft - 07-05-2013, 12:49 AM



Users browsing this thread: 35 Guest(s)