mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 17:21:22 +00:00
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:
parent
de573814c4
commit
123c65cb28
2 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue