S_music name variable access

Quick edit to give lua scripts the ability to access internal name of
the tunes added
This commit is contained in:
yellowtd 2014-08-08 22:05:44 -04:00
parent 1a52d54c31
commit 9e1a09114e
2 changed files with 7 additions and 1 deletions

View file

@ -945,6 +945,9 @@ static int musicinfo_get(lua_State *L)
switch (field)
{
case musicinfor_name:
lua_pushstring(L, music->name);
return 1;
case musicinfor_dummyval:
lua_pushinteger(L, music->dummyval);
return 1;
@ -969,6 +972,9 @@ static int musicinfo_set(lua_State *L)
switch (field)
{
case musicinfow_name:
music->name = luaL_checkstring(L, 1);
break;
case musicinfow_dummyval:
music->dummyval = luaL_checkinteger(L, 1);
break;

View file

@ -119,7 +119,7 @@ extern musicinfo_t S_music[];
// Identifiers for all music in game.
//
#define NUMMUSFREESLOTS 800
#define NUMMUSFREESLOTS 256
// Music list (don't edit this comment!)
typedef enum