Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Flag - SkipIndexJSON || --web-skipindexjson #3308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/async_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void FileRequestAsync::Start() {
if (it != file_mapping.end()) {
request_path += it->second;
} else {
if (file_mapping.empty()) {
if (file_mapping.empty() || Player::game_config.patch_web_skip_index_json.Get()) {
// index.json not fetched yet, fallthrough and fetch
request_path += path;
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/game_config_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ void Game_ConfigGame::LoadFromArgs(CmdlineParser& cp) {
patch_key_patch.Set(true);
} else if (v == "rpg2k3-cmds" || v == "rpg2k3-commands") {
patch_rpg2k3_commands.Set(true);
} else if (v == "web-skipindexjson") {
patch_web_skip_index_json.Set(true);
}
}
patch_override = true;
Expand Down
2 changes: 2 additions & 0 deletions src/game_config_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ struct Game_ConfigGame {
ConfigParam<int> patch_anti_lag_switch{ "Anti-Lag Switch", "Disable event page refreshes when switch is set", "Patch", "AntiLagSwitch", 0 };
ConfigParam<int> patch_direct_menu{ "Direct Menu", " Allows direct access to subscreens of the default menu", "Patch", "DirectMenu", 0 };

BoolConfigParam patch_web_skip_index_json{ "Skip Index.JSON's Check (WEB PLAYER ONLY)", "Skip the validation from index.json when load images (Web Build)", "Patch", "SkipIndexJSON", false };

// Command line only
BoolConfigParam patch_support{ "Support patches", "When OFF all patch support is disabled", "", "", true };

Expand Down
2 changes: 2 additions & 0 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5095,6 +5095,8 @@ bool Game_Interpreter::CommandEasyRpgSetInterpreterFlag(lcf::rpg::EventCommand c
Player::game_config.patch_rpg2k3_commands.Set(flag_value);
if (flag_name == "rpg2k-battle")
lcf::Data::system.easyrpg_use_rpg2k_battle_system = flag_value;
if (flag_name == "web-skipindexjson")
Player::game_config.patch_web_skip_index_json.Set(flag_value);

return true;
}
Expand Down
Loading