#pragma once

#include "lua.h"

/* Check if a flag exists on the variable stack. */
int var_checkflag(char* str);
void var_cleanup(void);

/* Load the libraries for a lua state. */
int misn_loadLibs(lua_State* L);
int misn_loadCondLibs(lua_State* L); /* Safe read only stuff. */

/* Individual library stuff. */
int lua_loadMisn(lua_State* L);
int lua_loadVar(lua_State* L, int readonly);
int lua_loadPlayer(lua_State* L, int readonly);
int lua_loadHook(lua_State* L);
int lua_loadPilot(lua_State* L);

