aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/linit.c
blob: c1f90dfab7156ce1e120d95b79e356395a8c113b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $
** Initialization of libraries for lua.c
** See Copyright Notice in lua.h
*/


#define linit_c
#define LUA_LIB

#include "lua.h"

#include "lualib.h"
#include "lauxlib.h"


static const luaL_Reg lualibs[] = {
  {"", luaopen_base},
  {LUA_LOADLIBNAME, luaopen_package},
  {LUA_TABLIBNAME, luaopen_table},
  {LUA_IOLIBNAME, luaopen_io},
  {LUA_OSLIBNAME, luaopen_os},
  {LUA_STRLIBNAME, luaopen_string},
  {LUA_MATHLIBNAME, luaopen_math},
  {LUA_DBLIBNAME, luaopen_debug},
  {NULL, NULL}
};


LUALIB_API void luaL_openlibs (lua_State *L) {
  const luaL_Reg *lib = lualibs;
  for (; lib->func; lib++) {
    lua_pushcfunction(L, lib->func);
    lua_pushstring(L, lib->name);
    lua_call(L, 1, 0);
  }
}

"shapeless", output = 'advtrains:dtrack_vst1 2', recipe = { "advtrains:dtrack_placer", "advtrains:dtrack_placer", "default:gravel", }, }) minetest.register_craft({ type = "shapeless", output = 'advtrains:dtrack_vst2 2', recipe = { "advtrains:dtrack_placer", "advtrains:dtrack_placer", "default:gravel", "default:gravel", }, }) minetest.register_craft({ output = 'advtrains:dtrack_bumper 2', recipe = { {'default:wood', 'dye:red'}, {'default:steel_ingot', 'default:steel_ingot'}, {'advtrains:dtrack_placer', 'advtrains:dtrack_placer'}, }, }) --signals minetest.register_craft({ output = 'advtrains:retrosignal_off 2', recipe = { {'dye:red', 'default:steel_ingot', 'default:steel_ingot'}, {'', '', 'default:steel_ingot'}, {'', '', 'default:steel_ingot'}, }, }) minetest.register_craft({ output = 'advtrains:signal_off 2', recipe = { {'', 'dye:red', 'default:steel_ingot'}, {'', 'dye:dark_green', 'default:steel_ingot'}, {'', '', 'default:steel_ingot'}, }, }) --trackworker minetest.register_craft({ output = 'advtrains:trackworker', recipe = { {'default:diamond'}, {'screwdriver:screwdriver'}, {'default:steel_ingot'}, }, }) --wagons minetest.register_craft({ output = 'advtrains:newlocomotive', recipe = { {'default:steelblock', 'default:steelblock', 'default:steelblock'}, {'default:steelblock', 'dye:black', 'default:steelblock'}, {'default:steelblock', 'default:steelblock', 'default:steelblock'}, }, }) minetest.register_craft({ output = 'advtrains:wagon_default', recipe = { {'default:steelblock', 'default:steelblock', 'default:steelblock'}, {'default:steelblock', 'dye:dark_green', 'default:steelblock'}, {'default:steelblock', 'default:steelblock', 'default:steelblock'}, }, }) minetest.register_craft({ output = 'advtrains:subway_wagon', recipe = { {'default:steelblock', 'default:steelblock', 'default:steelblock'}, {'default:steelblock', 'dye:yellow', 'default:steelblock'}, {'default:steelblock', 'default:steelblock', 'default:steelblock'}, }, }) --misc_nodes --crafts for platforms see misc_nodes.lua