Use lua for special level files
Game is playable, and should compile on linux and Windows. Assumes you have a lua 5.3 library available. Removes level compiler and associated files. Replaces special level des-files with lua scripts. Exposes some NetHack internals to lua: - des-table with commands to create special levels - nh-table with NetHack core commands - nhc-table with some constants - u-table with some player-specific data (u-struct) - selection userdata Adds some rudimentary tests. Adds new extended command #wizloadlua to run a specific script, and #wizloaddes to run a specific level-creation script. nhlib.lua is loaded for every lua script. Download and untar lua: mkdir lib cd lib curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf lua-5.3.5.tar.gz Then make nethack normally.
This commit is contained in:
@@ -617,7 +617,8 @@ const struct instance_globals g_init = {
|
||||
NULL, /* lev_message */
|
||||
NULL, /* lregions */
|
||||
0, /* num_lregions */
|
||||
UNDEFINED_VALUES, /* SplLev_Map */
|
||||
UNDEFINED_VALUES, /* SpLev_Map */
|
||||
NULL, /* coder */
|
||||
UNDEFINED_VALUE, /* xstart */
|
||||
UNDEFINED_VALUE, /* ystart */
|
||||
UNDEFINED_VALUE, /* xsize */
|
||||
@@ -629,7 +630,6 @@ const struct instance_globals g_init = {
|
||||
{ UNDEFINED_PTR }, /* container_obj */
|
||||
0, /* container_idx */
|
||||
NULL, /* invent_carrying_monster */
|
||||
{ AM_CHAOTIC, AM_NEUTRAL, AM_LAWFUL }, /* ralign */
|
||||
|
||||
/* spells.c */
|
||||
0, /* spl_sortmode */
|
||||
|
||||
Reference in New Issue
Block a user