9#include "yaml-cpp/yaml.h"
24 gsl::not_null<const TextFormatter *> format,
26 const std::filesystem::path &project_root)
27 : format_{format}, diagnostics_{diagnostics}, project_root_{project_root}
33 : owned_format_{std::make_unique<
PlainTextFormatter>()}, format_{owned_format_.get()}, diagnostics_{diagnostics},
34 project_root_{project_root}
41 return "YamlFileProvider";
46 return preload_and_validate_yaml_files(format_, diagnostics_, project_root_, type, scope);
51 auto paths_result = get_config_path_chain(project_root_, type, scope);
52 if (!paths_result.has_value()) {
56 return search_config_files<std::size_t>(
59 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
60 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_tiles_in_primary"]; },
62 "fieldmap.num_tiles_in_primary",
63 "fieldmap.num_tiles_in_primary");
68 auto paths_result = get_config_path_chain(project_root_, type, scope);
69 if (!paths_result.has_value()) {
73 return search_config_files<std::size_t>(
76 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
77 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_tiles_total"]; },
79 "fieldmap.num_tiles_total",
80 "fieldmap.num_tiles_total");
85 auto paths_result = get_config_path_chain(project_root_, type, scope);
86 if (!paths_result.has_value()) {
90 return search_config_files<std::size_t>(
93 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
94 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_metatiles_in_primary"]; },
96 "fieldmap.num_metatiles_in_primary",
97 "fieldmap.num_metatiles_in_primary");
102 auto paths_result = get_config_path_chain(project_root_, type, scope);
103 if (!paths_result.has_value()) {
107 return search_config_files<std::size_t>(
109 paths_result.value(),
110 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
111 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_metatiles_total"]; },
113 "fieldmap.num_metatiles_total",
114 "fieldmap.num_metatiles_total");
119 auto paths_result = get_config_path_chain(project_root_, type, scope);
120 if (!paths_result.has_value()) {
124 return search_config_files<std::size_t>(
126 paths_result.value(),
127 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
128 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_palettes_in_primary"]; },
130 "fieldmap.num_palettes_in_primary",
131 "fieldmap.num_palettes_in_primary");
136 auto paths_result = get_config_path_chain(project_root_, type, scope);
137 if (!paths_result.has_value()) {
141 return search_config_files<std::size_t>(
143 paths_result.value(),
144 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
145 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_palettes_total"]; },
147 "fieldmap.num_palettes_total",
148 "fieldmap.num_palettes_total");
153 auto paths_result = get_config_path_chain(project_root_, type, scope);
154 if (!paths_result.has_value()) {
158 return search_config_files<std::size_t>(
160 paths_result.value(),
161 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
162 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"max_map_data_size"]; },
164 "fieldmap.max_map_data_size",
165 "fieldmap.max_map_data_size");
170 auto paths_result = get_config_path_chain(project_root_, type, scope);
171 if (!paths_result.has_value()) {
175 return search_config_files<std::size_t>(
177 paths_result.value(),
178 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
179 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"num_tiles_per_metatile"]; },
181 "fieldmap.num_tiles_per_metatile",
182 "fieldmap.num_tiles_per_metatile");
187 auto paths_result = get_config_path_chain(project_root_, type, scope);
188 if (!paths_result.has_value()) {
191 return search_config_files<Rgba32>(
193 paths_result.value(),
194 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
195 [](
const YAML::Node &doc) { return doc[
"tileset"][
"extrinsic_transparency"]; },
197 "tileset.extrinsic_transparency",
198 "tileset.extrinsic_transparency");
203 auto paths_result = get_config_path_chain(project_root_, type, scope);
204 if (!paths_result.has_value()) {
207 return search_config_files<bool>(
209 paths_result.value(),
210 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
211 [](
const YAML::Node &doc) { return doc[
"tileset"][
"ignore_triple_layer_content"]; },
213 "tileset.ignore_triple_layer_content",
214 "tileset.ignore_triple_layer_content");
219 auto paths_result = get_config_path_chain(project_root_, type, scope);
220 if (!paths_result.has_value()) {
224 return search_config_files<ArtifactEditMode>(
226 paths_result.value(),
227 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
228 [](
const YAML::Node &doc) { return doc[
"tileset"][
"tiles"][
"edit_mode"]; },
229 parse_artifact_edit_mode,
230 "tileset.tiles.edit_mode",
231 "tileset.tiles.edit_mode");
236 auto paths_result = get_config_path_chain(project_root_, type, scope);
237 if (!paths_result.has_value()) {
241 return search_config_files<ArtifactEditMode>(
243 paths_result.value(),
244 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
245 [](
const YAML::Node &doc) { return doc[
"tileset"][
"palettes"][
"edit_mode"]; },
246 parse_artifact_edit_mode,
247 "tileset.palettes.edit_mode",
248 "tileset.palettes.edit_mode");
253 auto paths_result = get_config_path_chain(project_root_, type, scope);
254 if (!paths_result.has_value()) {
257 return search_config_files<bool>(
259 paths_result.value(),
260 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
261 [](
const YAML::Node &doc) { return doc[
"tileset"][
"palettes"][
"packing"][
"hints_enabled"]; },
263 "tileset.palettes.packing.hints_enabled",
264 "tileset.palettes.packing.hints_enabled");
270 auto paths_result = get_config_path_chain(project_root_, type, scope);
271 if (!paths_result.has_value()) {
275 return search_config_files<std::vector<PaletteHint>>(
277 paths_result.value(),
278 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
279 [](
const YAML::Node &doc) {
return doc[
"tileset"][
"palettes"][
"packing"][
"hints"]; },
281 "tileset.palettes.packing.hints",
282 "tileset.palettes.packing.hints");
287 auto paths_result = get_config_path_chain(project_root_, type, scope);
288 if (!paths_result.has_value()) {
292 return search_config_files<PackingStrategyType>(
294 paths_result.value(),
295 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
296 [](
const YAML::Node &doc) { return doc[
"tileset"][
"palettes"][
"packing"][
"strategy"]; },
297 parse_packing_strategy_type,
298 "tileset.palettes.packing.strategy",
299 "tileset.palettes.packing.strategy");
305 auto paths_result = get_config_path_chain(project_root_, type, scope);
306 if (!paths_result.has_value()) {
310 return search_config_files<PackingStrategyParams>(
312 paths_result.value(),
313 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
314 [](
const YAML::Node &doc) { return doc[
"tileset"][
"palettes"][
"packing"][
"strategy_params"]; },
315 parse_packing_strategy_params,
316 "tileset.palettes.packing.strategy_params",
317 "tileset.palettes.packing.strategy_params");
323 auto paths_result = get_config_path_chain(project_root_, type, scope);
324 if (!paths_result.has_value()) {
328 return search_config_files<TileSharingPacking>(
330 paths_result.value(),
331 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
332 [](
const YAML::Node &doc) { return doc[
"tileset"][
"tiles"][
"sharing"][
"packing"]; },
333 parse_tile_sharing_packing,
334 "tileset.tiles.sharing.packing",
335 "tileset.tiles.sharing.packing");
341 auto paths_result = get_config_path_chain(project_root_, type, scope);
342 if (!paths_result.has_value()) {
346 return search_config_files<TileSharingAlignment>(
348 paths_result.value(),
349 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
350 [](
const YAML::Node &doc) { return doc[
"tileset"][
"tiles"][
"sharing"][
"alignment"]; },
351 parse_tile_sharing_alignment,
352 "tileset.tiles.sharing.alignment",
353 "tileset.tiles.sharing.alignment");
358 auto paths_result = get_config_path_chain(project_root_, type, scope);
359 if (!paths_result.has_value()) {
363 return search_config_files<TilesPaletteMode>(
365 paths_result.value(),
366 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
367 [](
const YAML::Node &doc) { return doc[
"tileset"][
"tiles"][
"palette_mode"]; },
368 parse_tiles_palette_mode,
369 "tileset.tiles.palette_mode",
370 "tileset.tiles.palette_mode");
376 auto paths_result = get_config_path_chain(project_root_, type, scope);
377 if (!paths_result.has_value()) {
381 return search_config_files<AnimPaletteResolutionStrategy>(
383 paths_result.value(),
384 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
385 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"palette_resolution_strategy"]; },
386 parse_anim_palette_resolution_strategy,
387 "tileset.animations.palette_resolution_strategy",
388 "tileset.animations.palette_resolution_strategy");
394 auto paths_result = get_config_path_chain(project_root_, type, scope);
395 if (!paths_result.has_value()) {
399 return search_config_files<AnimKeyFrameResolutionStrategy>(
401 paths_result.value(),
402 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
403 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"key_frame_resolution_strategy"]; },
404 parse_anim_key_frame_resolution_strategy,
405 "tileset.animations.key_frame_resolution_strategy",
406 "tileset.animations.key_frame_resolution_strategy");
413 auto paths_result = get_config_path_chain(project_root_, type, scope);
414 if (!paths_result.has_value()) {
418 return search_config_files<AnimMultiPaletteSubtileResolutionStrategy>(
420 paths_result.value(),
421 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
422 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"multi_palette_subtile_resolution_strategy"]; },
423 parse_anim_multi_palette_subtile_resolution_strategy,
424 "tileset.animations.multi_palette_subtile_resolution_strategy",
425 "tileset.animations.multi_palette_subtile_resolution_strategy");
430 auto paths_result = get_config_path_chain(project_root_, type, scope);
431 if (!paths_result.has_value()) {
435 return search_config_files<FrameLinking>(
437 paths_result.value(),
438 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
439 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"frame_linking"]; },
441 "tileset.animations.frame_linking",
442 "tileset.animations.frame_linking");
447 auto paths_result = get_config_path_chain(project_root_, type, scope);
448 if (!paths_result.has_value()) {
452 return search_config_files<PerAnimOverrides>(
454 paths_result.value(),
455 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
456 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"per_animation_overrides"]; },
457 parse_per_anim_overrides,
458 "tileset.animations.per_animation_overrides",
459 "tileset.animations.per_animation_overrides");
464 auto paths_result = get_config_path_chain(project_root_, type, scope);
465 if (!paths_result.has_value()) {
468 return search_config_files<bool>(
470 paths_result.value(),
471 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
472 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"cross_tileset_linking"]; },
474 "tileset.animations.cross_tileset_linking",
475 "tileset.animations.cross_tileset_linking");
480 auto paths_result = get_config_path_chain(project_root_, type, scope);
481 if (!paths_result.has_value()) {
484 return search_config_files<bool>(
486 paths_result.value(),
487 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
488 [](
const YAML::Node &doc) { return doc[
"verify_checksums"]; },
497 auto paths_result = get_config_path_chain(project_root_, type, scope);
498 if (!paths_result.has_value()) {
502 return search_config_files<PrimaryPairingMode>(
504 paths_result.value(),
505 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
506 [](
const YAML::Node &doc) { return doc[
"tileset"][
"primary_pairing"][
"mode"]; },
507 parse_primary_pairing_mode,
508 "tileset.primary_pairing.mode",
509 "tileset.primary_pairing.mode");
515 auto paths_result = get_config_path_chain(project_root_, type, scope);
516 if (!paths_result.has_value()) {
520 return search_config_files<std::vector<std::string>>(
522 paths_result.value(),
523 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
524 [](
const YAML::Node &doc) {
return doc[
"tileset"][
"primary_pairing"][
"partners"]; },
526 "tileset.primary_pairing.partners",
527 "tileset.primary_pairing.partners");
533 auto paths_result = get_config_path_chain(project_root_, type, scope);
534 if (!paths_result.has_value()) {
538 return search_config_files<std::vector<std::string>>(
540 paths_result.value(),
541 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
542 [](
const YAML::Node &doc) {
return doc[
"diagnostics"][
"warnings"][
"exclude"]; },
544 "diagnostics.warnings.exclude",
545 "diagnostics.warnings.exclude");
551 auto paths_result = get_config_path_chain(project_root_, type, scope);
552 if (!paths_result.has_value()) {
556 return search_config_files<std::vector<std::string>>(
558 paths_result.value(),
559 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
560 [](
const YAML::Node &doc) {
return doc[
"diagnostics"][
"warnings"][
"include"]; },
562 "diagnostics.warnings.include",
563 "diagnostics.warnings.include");
569 auto paths_result = get_config_path_chain(project_root_, type, scope);
570 if (!paths_result.has_value()) {
574 return search_config_files<std::vector<std::string>>(
576 paths_result.value(),
577 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
578 [](
const YAML::Node &doc) {
return doc[
"diagnostics"][
"remarks"][
"exclude"]; },
580 "diagnostics.remarks.exclude",
581 "diagnostics.remarks.exclude");
587 auto paths_result = get_config_path_chain(project_root_, type, scope);
588 if (!paths_result.has_value()) {
592 return search_config_files<std::vector<std::string>>(
594 paths_result.value(),
595 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
596 [](
const YAML::Node &doc) {
return doc[
"diagnostics"][
"remarks"][
"include"]; },
598 "diagnostics.remarks.include",
599 "diagnostics.remarks.include");
605 auto paths_result = get_config_path_chain(project_root_, type, scope);
606 if (!paths_result.has_value()) {
610 return search_config_files<std::string>(
612 paths_result.value(),
613 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
614 [](
const YAML::Node &doc) { return doc[
"tileset"][
"paths"][
"primary"][
"src"]; },
616 "tileset.paths.primary.src",
617 "tileset.paths.primary.src");
623 auto paths_result = get_config_path_chain(project_root_, type, scope);
624 if (!paths_result.has_value()) {
628 return search_config_files<std::string>(
630 paths_result.value(),
631 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
632 [](
const YAML::Node &doc) { return doc[
"tileset"][
"paths"][
"primary"][
"bin"]; },
634 "tileset.paths.primary.bin",
635 "tileset.paths.primary.bin");
641 auto paths_result = get_config_path_chain(project_root_, type, scope);
642 if (!paths_result.has_value()) {
646 return search_config_files<std::string>(
648 paths_result.value(),
649 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
650 [](
const YAML::Node &doc) { return doc[
"tileset"][
"paths"][
"secondary"][
"src"]; },
652 "tileset.paths.secondary.src",
653 "tileset.paths.secondary.src");
659 auto paths_result = get_config_path_chain(project_root_, type, scope);
660 if (!paths_result.has_value()) {
664 return search_config_files<std::string>(
666 paths_result.value(),
667 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
668 [](
const YAML::Node &doc) { return doc[
"tileset"][
"paths"][
"secondary"][
"bin"]; },
670 "tileset.paths.secondary.bin",
671 "tileset.paths.secondary.bin");
677 auto paths_result = get_config_path_chain(project_root_, type, scope);
678 if (!paths_result.has_value()) {
682 return search_config_files<std::optional<std::size_t>>(
684 paths_result.value(),
685 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
686 [](
const YAML::Node &doc) {
return doc[
"fieldmap"][
"metatile_attribute_size"]; },
687 parse_optional_size_t,
688 "fieldmap.metatile_attribute_size",
689 "fieldmap.metatile_attribute_size");
695 auto paths_result = get_config_path_chain(project_root_, type, scope);
696 if (!paths_result.has_value()) {
700 return search_config_files<std::optional<std::size_t>>(
702 paths_result.value(),
703 [
this](
const std::filesystem::path &p) {
return load_yaml_file(p, format_, diagnostics_); },
704 [](
const YAML::Node &doc) {
return doc[
"fieldmap"][
"metatile_attribute_declaration_size"]; },
705 parse_optional_size_t,
706 "fieldmap.metatile_attribute_declaration_size",
707 "fieldmap.metatile_attribute_declaration_size");
713 auto paths_result = get_config_path_chain(project_root_, type, scope);
714 if (!paths_result.has_value()) {
718 return search_config_files<MetatileAttributeFieldDefinitions>(
720 paths_result.value(),
721 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
722 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"metatile_attribute_fields"]; },
723 parse_metatile_attribute_fields,
724 "fieldmap.metatile_attribute_fields",
725 "fieldmap.metatile_attribute_fields");
731 auto paths_result = get_config_path_chain(project_root_, type, scope);
732 if (!paths_result.has_value()) {
736 return search_config_files<MetatileAttributeFieldOverrides>(
738 paths_result.value(),
739 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
740 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"metatile_attribute_field_overrides"]; },
741 parse_metatile_attribute_field_overrides,
742 "fieldmap.metatile_attribute_field_overrides",
743 "fieldmap.metatile_attribute_field_overrides");
748 auto paths_result = get_config_path_chain(project_root_, type, scope);
749 if (!paths_result.has_value()) {
753 return search_config_files<RolePinDefinitions>(
755 paths_result.value(),
756 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
757 [](
const YAML::Node &doc) { return doc[
"fieldmap"][
"role_pins"]; },
759 "fieldmap.role_pins",
760 "fieldmap.role_pins");
766 auto paths_result = get_config_path_chain(project_root_, type, scope);
767 if (!paths_result.has_value()) {
770 return search_config_files<bool>(
772 paths_result.value(),
773 [
this](
const std::filesystem::path &p) { return load_yaml_file(p, format_, diagnostics_); },
774 [](
const YAML::Node &doc) { return doc[
"tileset"][
"animations"][
"wire_anim_code"]; },
776 "tileset.animations.wire_anim_code",
777 "tileset.animations.wire_anim_code");
TextFormatter implementation that strips all styling from text.
Abstract class for structured error reporting and diagnostic output.
LayerValue< TilesPaletteMode > tiles_palette_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > palettes_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_secondary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< Rgba32 > extrinsic_transparency(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< PaletteHint > > palette_hints(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > primary_pairing_partners(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::optional< std::size_t > > metatile_attribute_declaration_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimKeyFrameResolutionStrategy > global_anim_key_frame_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< RolePinDefinitions > role_pins(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > tileset_animations_wire_anim_code(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > max_map_data_size(ConfigScopeType type, const std::string &scope) const override
YamlFileProvider(gsl::not_null< const TextFormatter * > format, const UserDiagnostics *diagnostics, const std::filesystem::path &project_root)
Constructs a YamlFileProvider that searches for configuration across multiple YAML files.
LayerValue< std::string > tileset_paths_primary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > palette_hints_enabled(ConfigScopeType type, const std::string &scope) const override
LayerValue< PerAnimOverrides > per_anim_overrides(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_primary_bin(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::string > tileset_paths_secondary_src(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_remarks_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< PrimaryPairingMode > primary_pairing_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< MetatileAttributeFieldDefinitions > metatile_attribute_fields(ConfigScopeType type, const std::string &scope) const override
LayerValue< ArtifactEditMode > tiles_edit_mode(ConfigScopeType type, const std::string &scope) const override
LayerValue< MetatileAttributeFieldOverrides > metatile_attribute_field_overrides(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > cross_tileset_anim_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > verify_checksums(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyType > packing_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< FrameLinking > global_frame_linking(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_include(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_palettes_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_metatiles_total(ConfigScopeType type, const std::string &scope) const override
LayerValue< bool > ignore_triple_layer_content(ConfigScopeType type, const std::string &scope) const override
bool preload_and_validate(ConfigScopeType type, const std::string &scope) const
Eagerly loads all YAML config files and validates them for unknown keys.
std::string name() const override
Gets the name of this config layer.
LayerValue< TileSharingPacking > tile_sharing_packing(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_palettes_in_primary(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::optional< std::size_t > > metatile_attribute_size(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::size_t > num_tiles_per_metatile(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimMultiPaletteSubtileResolutionStrategy > global_anim_multi_palette_subtile_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< AnimPaletteResolutionStrategy > global_anim_palette_resolution_strategy(ConfigScopeType type, const std::string &scope) const override
LayerValue< std::vector< std::string > > diagnostic_warnings_exclude(ConfigScopeType type, const std::string &scope) const override
LayerValue< PackingStrategyParams > packing_strategy_params(ConfigScopeType type, const std::string &scope) const override
LayerValue< TileSharingAlignment > tile_sharing_alignment(ConfigScopeType type, const std::string &scope) const override
@ invalid
no layout could be determined from what the project declares (fatal at resolution time)
ConfigScopeType
Specifies the scope type for configuration value lookups.
Utility functions for string manipulation and formatting.
A small container that holds an optional-wrapped value, validation state, and metadata about the valu...
static LayerValue invalid(std::string error, std::string source_info)
Creates a LayerValue representing an invalid configuration value.