debug options (#1002)

This commit is contained in:
Aure7138 2023-02-20 06:04:13 +08:00 committed by GitHub
parent df33a922b6
commit 5c8e7e8a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 9 deletions

View File

@ -78,6 +78,8 @@ namespace big
bool filter_player = true;
std::int8_t player_id = -1;
bool block_all = false; //should not save
NLOHMANN_DEFINE_TYPE_INTRUSIVE(script_event, logs, filter_player, player_id)
} script_event{};

View File

@ -408,6 +408,9 @@ namespace big
<< "\tArgs: " << script_args;
}
if (g.debug.logs.script_event.block_all)
return true;
return false;
}
}

View File

@ -42,25 +42,31 @@ namespace big
STATS::STAT_SET_BOOL(RAGE_JOAAT("mpply_was_i_bad_sport"), FALSE, TRUE);
});
if (components::button("Load MP Map"))
DLC::ON_ENTER_MP();
components::button("Load MP Map", [] { DLC::ON_ENTER_MP(); });
ImGui::SameLine();
if (components::button("Load SP Map"))
components::button("Load SP Map", [] { DLC::ON_ENTER_SP(); });
DLC::ON_ENTER_SP();
components::button("Skip Cutscene", [] { CUTSCENE::STOP_CUTSCENE_IMMEDIATELY(); });
if (components::button("Skip Cutscene"))
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
if (components::button("Refresh Interior"))
components::button("Refresh Interior", []\
{
Interior interior = INTERIOR::GET_INTERIOR_AT_COORDS(self::pos.x, self::pos.y, self::pos.z);
INTERIOR::REFRESH_INTERIOR(interior);
}
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("You Will Have To Refresh Again When Exiting Interior.\n SPAMMING WILL CRASH GAME");
components::button("Network Shutdown And Launch Single Player Game", []\
{
NETWORK::SHUTDOWN_AND_LAUNCH_SINGLE_PLAYER_GAME();
});
components::button("Network Shutdown And Load Most Recent Save", []\
{
NETWORK::SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE();
});
components::command_button<"fastquit">();
if (ImGui::TreeNode("Addresses"))

View File

@ -32,6 +32,8 @@ namespace big
ImGui::EndListBox();
}
ImGui::Checkbox("Block All", &g.debug.logs.script_event.block_all);
ImGui::TreePop();
}