diff --git a/CMakeLists.txt b/CMakeLists.txt index 6da08134..77ed236c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,8 +116,8 @@ endif() ExternalProject_Add(loot-condition-interpreter PREFIX "external" - URL "https://github.com/loot/loot-condition-interpreter/archive/2.4.0.tar.gz" - URL_HASH "SHA256=7c1d42636d8b10ae2b4dc3fced4a0b25112caf5e489a8f8ef0c915b9dd1189e1" + URL "https://github.com/loot/loot-condition-interpreter/archive/3.0.0.tar.gz" + URL_HASH "SHA256=6492c19848f01f297537da6a561e8d0c0a79e7c15e3ddf958910dec7cdfe0abf" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --target ${RUST_TARGET} && diff --git a/docs/metadata/conditions.rst b/docs/metadata/conditions.rst index 4dc978f7..aa10809b 100644 --- a/docs/metadata/conditions.rst +++ b/docs/metadata/conditions.rst @@ -21,11 +21,11 @@ Types .. describe:: filesystem_path - A double-quoted filesystem path, or ``"LOOT"``, which resolves to `LOOT.exe` in the current working directory. Bear in mind that `LOOT.exe` may not be present if the condition is being evaluated by an application other than LOOT. + A double-quoted filesystem path. .. describe:: file_path - A double-quoted file path, or ``"LOOT"``, which resolves to `LOOT.exe` in the current working directory. Bear in mind that `LOOT.exe` may not be present if the condition is being evaluated by an application other than LOOT. + A double-quoted file path. .. describe:: regular_expression diff --git a/docs/metadata/file_structure.rst b/docs/metadata/file_structure.rst index db9d9e2a..d0225137 100644 --- a/docs/metadata/file_structure.rst +++ b/docs/metadata/file_structure.rst @@ -45,7 +45,6 @@ Example - &thanksForUsing type: say content: 'Thanks for using LOOT!' - condition: 'file("LOOT")' bash_tags: - 'C.Climate' diff --git a/src/api/metadata/condition_evaluator.cpp b/src/api/metadata/condition_evaluator.cpp index 6feeb360..e8b25499 100644 --- a/src/api/metadata/condition_evaluator.cpp +++ b/src/api/metadata/condition_evaluator.cpp @@ -87,15 +87,9 @@ ConditionEvaluator::ConditionEvaluator(const GameType gameType, lci_state_destroy)) { lci_state* state = nullptr; - // This probably isn't correct for API users other than LOOT. - // But that probably doesn't matter, as the only things conditional - // on LOOT's version are LOOT-specific messages. - const auto lootPath = std::filesystem::absolute("LOOT.exe"); - int result = lci_state_create(&state, mapGameType(gameType), - dataPath.u8string().c_str(), - lootPath.u8string().c_str()); + dataPath.u8string().c_str()); HandleError("create state object for condition evaluation", result); lciState_ = std::unique_ptr(