mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Alleviate the script warning nagging
This commit is contained in:
parent
437622b751
commit
09d0394aba
4 changed files with 4 additions and 3 deletions
|
@ -81,7 +81,7 @@ override_field_mutable = {
|
|||
}
|
||||
|
||||
override_field_invisible = {
|
||||
"Mod": [ "files" ],
|
||||
"Mod": [ "files", "showedScriptWarning" ],
|
||||
"MarioState": [ "visibleToEnemies" ],
|
||||
"NetworkPlayer": [ "gag", "moderator"],
|
||||
"GraphNode": [ "_guard1", "_guard2" ],
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define LOG_LUA(...) { if (!gSmLuaSuppressErrors) { printf("[LUA] "), printf(__VA_ARGS__), printf("\n"), smlua_mod_error(), snprintf(gDjuiConsoleTmpBuffer, CONSOLE_MAX_TMP_BUFFER, __VA_ARGS__), sys_swap_backslashes(gDjuiConsoleTmpBuffer), djui_console_message_create(gDjuiConsoleTmpBuffer, CONSOLE_MESSAGE_ERROR); } }
|
||||
#define LOG_LUA_LINE(...) { if (!gSmLuaSuppressErrors) { printf("[LUA] "), printf(__VA_ARGS__), printf("\n"), smlua_mod_error(); snprintf(gDjuiConsoleTmpBuffer, CONSOLE_MAX_TMP_BUFFER, __VA_ARGS__), sys_swap_backslashes(gDjuiConsoleTmpBuffer), djui_console_message_create(gDjuiConsoleTmpBuffer, CONSOLE_MESSAGE_ERROR), smlua_logline(); } }
|
||||
#define LOG_LUA_LINE_WARNING(...) { smlua_mod_warning(); snprintf(gDjuiConsoleTmpBuffer, CONSOLE_MAX_TMP_BUFFER, __VA_ARGS__), sys_swap_backslashes(gDjuiConsoleTmpBuffer), djui_console_message_create(gDjuiConsoleTmpBuffer, CONSOLE_MESSAGE_WARNING); }
|
||||
#define LOG_LUA_LINE_WARNING(...) { if (!gLuaActiveMod->showedScriptWarning) { gLuaActiveMod->showedScriptWarning = true; smlua_mod_warning(); snprintf(gDjuiConsoleTmpBuffer, CONSOLE_MAX_TMP_BUFFER, __VA_ARGS__), sys_swap_backslashes(gDjuiConsoleTmpBuffer), djui_console_message_create(gDjuiConsoleTmpBuffer, CONSOLE_MESSAGE_WARNING); } }
|
||||
|
||||
#ifdef DEVELOPMENT
|
||||
#define LUA_STACK_CHECK_BEGIN() int __LUA_STACK_TOP = lua_gettop(gLuaState)
|
||||
|
|
|
@ -36,6 +36,7 @@ struct Mod {
|
|||
bool renderBehindHud;
|
||||
bool pausable;
|
||||
bool ignoreScriptWarnings;
|
||||
bool showedScriptWarning;
|
||||
size_t size;
|
||||
u8 customBehaviorIndex;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ extern "C" {
|
|||
|
||||
#define C_FIELD extern "C"
|
||||
|
||||
void strdelete(char* string, const char* substr) {
|
||||
static void strdelete(char* string, const char* substr) {
|
||||
// i is used to loop through the string
|
||||
u16 i = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue