mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
* Strip the word "function" from INLEVEL error messages, since they're now shared between access and function cases.
* Move it into lua_script.h, so it's available to everything that needs it.
This commit is contained in:
parent
69e573517f
commit
7bff305672
7 changed files with 4 additions and 17 deletions
|
@ -33,8 +33,6 @@
|
|||
|
||||
#define NOHUD if (hud_running)\
|
||||
return luaL_error(L, "HUD rendering code should not call this function!");
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
boolean luaL_checkboolean(lua_State *L, int narg) {
|
||||
luaL_checktype(L, narg, LUA_TBOOLEAN);
|
||||
|
|
|
@ -28,9 +28,6 @@ return luaL_error(L, "HUD rendering code should not call this function!");
|
|||
// for functions not allowed in hooks or coroutines (supercedes above)
|
||||
#define NOHOOK if (!lua_lumploading)\
|
||||
return luaL_error(L, "This function cannot be called from within a hook or coroutine!");
|
||||
// for functions only allowed within a level
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
static const char *cvname = NULL;
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
#include "fastcmp.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
enum sector_e {
|
||||
sector_valid = 0,
|
||||
sector_floorheight,
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#include "lua_libs.h"
|
||||
#include "lua_hud.h" // hud_running errors
|
||||
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
static const char *const array_opt[] ={"iterate",NULL};
|
||||
|
||||
enum mobj_e {
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#include "lua_libs.h"
|
||||
#include "lua_hud.h" // hud_running errors
|
||||
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
static int lib_iteratePlayers(lua_State *L)
|
||||
{
|
||||
INT32 i = -1;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "m_fixed.h"
|
||||
#include "doomtype.h"
|
||||
#include "d_player.h"
|
||||
#include "g_state.h"
|
||||
|
||||
#include "blua/lua.h"
|
||||
#include "blua/lualib.h"
|
||||
|
@ -97,4 +98,7 @@ void COM_Lua_f(void);
|
|||
// uncomment if you want seg_t/node_t in Lua
|
||||
// #define HAVE_LUA_SEGS
|
||||
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This can only be used in a level!");
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#include "lua_script.h"
|
||||
#include "lua_libs.h"
|
||||
|
||||
#define INLEVEL if (gamestate != GS_LEVEL && !titlemapinaction)\
|
||||
return luaL_error(L, "This function can only be used in a level!");
|
||||
|
||||
#define META_ITERATIONSTATE "iteration state"
|
||||
|
||||
/*static const char *const iter_opt[] = {
|
||||
|
|
Loading…
Reference in a new issue