23 if (!metadata_provider_->
exists(tileset_name)) {
32 imported_porymap_component,
35 "Import job failed for '{}'.",
37 auto blank_porytiles_component = std::make_unique<PorytilesTilesetComponent>();
38 auto tileset = std::make_unique<Tileset>(
39 tileset_name, std::move(blank_porytiles_component), std::move(imported_porymap_component));
46 "Decompile job failed for '{}'.",
59 auto import_override = std::make_unique<OverrideConfigProvider>(
63 domain_config_->
add_provider(std::move(import_override));
67 compiler_->
compile(*decompiled_tileset,
false),
69 "Internal locked recompile failed for '{}'.",
74 tileset_repo_->
save(*compiled_tileset),
76 "Tileset save job failed for '{}'.",
89 "Failed to persist Porytiles-managed state for '{}'.",
93 if (!compiled_tileset->porytiles_component().anims().empty()) {
98 "Failed to wire animation code for '{}'.",
106 "Failed to remove wired animation code for '{}'.",
#define PT_TRY_ASSIGN_CHAIN_ERR(var, expr, return_type,...)
Unwraps a ChainableResult, chaining a new error message on failure.
#define PT_TRY_CALL_CHAIN_ERR(expr, return_type,...)
Unwraps a void ChainableResult, chaining a new error message on failure.
A result type that maintains a chainable sequence of errors for debugging and error reporting.
virtual void add_provider(std::unique_ptr< ConfigProvider > provider)=0
Prepends a ConfigProvider to the provider chain at highest priority.
ChainableResult< void > import(const std::string &tileset_name) const
virtual ChainableResult< void > wire_anim_code(const std::string &tileset_name, bool is_secondary) const =0
Wires animation code for a tileset that already has its manifest persisted.
virtual ChainableResult< void > persist_managed_existing(const std::string &tileset_name) const =0
Persists managed state for an existing tileset.
virtual bool is_porytiles_managed(const std::string &tileset_name) const =0
Checks whether a tileset is managed by Porytiles.
virtual ChainableResult< void > remove_wired_anim_code(const std::string &tileset_name, bool is_secondary) const =0
Removes wired animation code for a tileset from the project.
ChainableResult< std::unique_ptr< Tileset > > decompile(const Tileset &tileset) const
virtual ChainableResult< std::unique_ptr< PorymapTilesetComponent > > import_porymap_component_from_vanilla(const std::string &tileset_name) const =0
Imports vanilla Porymap assets for the given tileset into a PorymapTilesetComponent.
static const Style bold
Bold text formatting.
ChainableResult< std::unique_ptr< Tileset > > compile(const Tileset &tileset, bool is_secondary=false, const Tileset *paired_primary=nullptr) const
Compiles the given Tileset, producing a new Tileset with compiled Porymap assets.
ChainableResult< void > save(const Tileset &tileset) const
Persists a given Tileset and caches new artifact checksums.
@ locked
Artifacts cannot be edited; must use existing from base tileset.
@ tileset
Configuration scoped to a specific tileset.