Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 92aea20cd6
commit 97a8c5d60b
466 changed files with 55224 additions and 35596 deletions

View File

@ -1,10 +1,10 @@
#include "fiber_pool.hpp"
#include "script.hpp"
#include "views/view.hpp"
#include "services/creator_storage/creator_storage_service.hpp"
#include "services/api/api_service.hpp"
#include "util/scripts.hpp"
#include "services/creator_storage/creator_storage_service.hpp"
#include "thread_pool.hpp"
#include "util/scripts.hpp"
#include "views/view.hpp"
static bool cached_creator_files = false;
static std::vector<std::string> creator_files;
@ -16,7 +16,7 @@ namespace big
static std::string selected_creator_file = "";
if (!cached_creator_files)
{
creator_files = creator_storage_service::list_files();
creator_files = creator_storage_service::list_files();
cached_creator_files = true;
}
@ -40,15 +40,13 @@ namespace big
if (!selected_creator_file.empty())
{
components::button("CREATOR_SAVE_TO_FILE"_T, []
{
components::button("CREATOR_SAVE_TO_FILE"_T, [] {
creator_storage_service::save_file(selected_creator_file);
});
ImGui::SameLine();
components::button("CREATOR_LOAD_FROM_FILE"_T, []
{
components::button("CREATOR_LOAD_FROM_FILE"_T, [] {
creator_storage_service::load_file(selected_creator_file);
});
}
@ -56,21 +54,16 @@ namespace big
static char job_file_name_input[50]{};
ImGui::PushItemWidth(250);
components::input_text_with_hint(
"CREATOR_JOB_FILENAME"_T,
"CREATOR_JOB_FILENAME_HINT"_T,
job_file_name_input, IM_ARRAYSIZE(job_file_name_input));
components::input_text_with_hint("CREATOR_JOB_FILENAME"_T, "CREATOR_JOB_FILENAME_HINT"_T, job_file_name_input, IM_ARRAYSIZE(job_file_name_input));
components::button("CREATOR_JOB_CREATE_FILE"_T, []
{
components::button("CREATOR_JOB_CREATE_FILE"_T, [] {
cached_creator_files = false;
creator_storage_service::create_file(std::string(job_file_name_input) + ".json");
});
ImGui::SameLine();
components::button("REFRESH"_T, []
{
components::button("REFRESH"_T, [] {
cached_creator_files = false;
});
@ -79,10 +72,8 @@ namespace big
static char job_link[69]{};
components::input_text("CREATOR_JOB_LINK"_T, job_link, sizeof(job_link));
components::button("CREATOR_JOB_IMPORT"_T, []
{
g_thread_pool->push([]
{
components::button("CREATOR_JOB_IMPORT"_T, [] {
g_thread_pool->push([] {
std::string content_id = job_link;
nlohmann::json job_details;
if (content_id.starts_with("https://"))
@ -100,14 +91,19 @@ namespace big
if (g_api_service->download_job_metadata(content_id, f1 < 0 ? 0 : f1, f0 < 0 ? 0 : f0, NETWORK::UGC_GET_CONTENT_LANGUAGE(0)))
{
cached_creator_files = false;
g_notification_service->push("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(), "CREATOR_JOB_IMPORT_SUCCESS"_T.data());
g_notification_service->push("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(),
"CREATOR_JOB_IMPORT_SUCCESS"_T.data());
}
else {
g_notification_service->push_error("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(), "CREATOR_JOB_FAILED_METADATA_FETCH"_T.data());
else
{
g_notification_service->push_error("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(),
"CREATOR_JOB_FAILED_METADATA_FETCH"_T.data());
}
}
else {
g_notification_service->push_error("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(), "CREATOR_JOB_UGC_QUERY_FAILED"_T.data());
else
{
g_notification_service->push_error("CREATOR_JOB_IMPORT_NOTIFICATION"_T.data(),
"CREATOR_JOB_UGC_QUERY_FAILED"_T.data());
}
});
});
@ -117,10 +113,21 @@ namespace big
components::sub_title("CREATOR_LAUNCH"_T);
ImGui::BeginGroup();
components::button("RACE"_T, [] { scripts::start_creator_script(RAGE_JOAAT("fm_race_creator")); }); ImGui::SameLine();
components::button("CAPTURE"_T, [] { scripts::start_creator_script(RAGE_JOAAT("fm_capture_creator")); }); ImGui::SameLine();
components::button("DEATHMATCH"_T, [] { scripts::start_creator_script(RAGE_JOAAT("fm_deathmatch_creator")); }); ImGui::SameLine();
components::button("LTS"_T, [] { scripts::start_creator_script(RAGE_JOAAT("fm_lts_creator")); });
components::button("RACE"_T, [] {
scripts::start_creator_script(RAGE_JOAAT("fm_race_creator"));
});
ImGui::SameLine();
components::button("CAPTURE"_T, [] {
scripts::start_creator_script(RAGE_JOAAT("fm_capture_creator"));
});
ImGui::SameLine();
components::button("DEATHMATCH"_T, [] {
scripts::start_creator_script(RAGE_JOAAT("fm_deathmatch_creator"));
});
ImGui::SameLine();
components::button("LTS"_T, [] {
scripts::start_creator_script(RAGE_JOAAT("fm_lts_creator"));
});
ImGui::EndGroup();
components::sub_title("CREATOR_OPTIONS"_T);