| 873 | } |
| 874 | |
| 875 | bool patch_engine::read_patch_node(patch_info& info, YAML::Node node, const YAML::Node& root, std::string_view path, std::stringstream* log_messages) |
| 876 | { |
| 877 | if (!node) |
| 878 | { |
| 879 | append_log_message(log_messages, fmt::format("Skipping invalid patch node %s. (key: %s, location: %s)", info.description, info.hash, get_yaml_node_location(node)), &patch_log.error); |
| 880 | return false; |
| 881 | } |
| 882 | |
| 883 | if (const auto yml_type = node.Type(); yml_type != YAML::NodeType::Sequence) |
| 884 | { |
| 885 | append_log_message(log_messages, fmt::format("Skipping patch node %s: expected Sequence, found %s (key: %s, location: %s)", info.description, yml_type, info.hash, get_yaml_node_location(node)), &patch_log.error); |
| 886 | return false; |
| 887 | } |
| 888 | |
| 889 | bool is_valid = true; |
| 890 | |
| 891 | for (auto patch : node) |
| 892 | { |
| 893 | if (!add_patch_data(patch, info, 0, root, path, log_messages)) |
| 894 | { |
| 895 | is_valid = false; |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | return is_valid; |
| 900 | } |
| 901 | |
| 902 | void patch_engine::append_global_patches() |
| 903 | { |
nothing calls this directly
no test coverage detected