Porytiles
Loading...
Searching...
No Matches
porytiles::TilesetCreator Class Reference

Domain service for creating new tilesets from scratch. More...

#include <tileset_creator.hpp>

Public Member Functions

 TilesetCreator (gsl::not_null< const DomainConfig * > config, gsl::not_null< const BehaviorMapProvider * > behavior_map)
 Constructs a TilesetCreator with the given dependencies.
 
ChainableResult< std::unique_ptr< PorytilesTilesetComponent > > create_sample_primary_porytiles_component (const std::string &tileset_name) const
 Creates a new basic primary PorytilesTilesetComponent with some default assets.
 
ChainableResult< std::unique_ptr< PorytilesTilesetComponent > > create_sample_secondary_porytiles_component (const std::string &tileset_name) const
 Creates a new basic secondary PorytilesTilesetComponent with some default assets.
 

Detailed Description

Domain service for creating new tilesets from scratch.

This service creates sample PorytilesTilesetComponents with some very basic layer art and animations. The resulting components are ready to be compiled by TilesetCompiler to produce minimal valid Porymap assets. Unlike import workflows that read existing assets, this creates a tileset from nothing.

This is a concrete class (not a virtual interface) since all creation logic uses pure domain objects without any I/O dependencies.

Definition at line 26 of file tileset_creator.hpp.

Constructor & Destructor Documentation

◆ TilesetCreator()

porytiles::TilesetCreator::TilesetCreator ( gsl::not_null< const DomainConfig * >  config,
gsl::not_null< const BehaviorMapProvider * >  behavior_map 
)
inline

Constructs a TilesetCreator with the given dependencies.

Parameters
configDomain configuration for tileset creation parameters
behavior_mapThe behavior map provider for resolving behavior names to values

Definition at line 34 of file tileset_creator.hpp.

Member Function Documentation

◆ create_sample_primary_porytiles_component()

ChainableResult< std::unique_ptr< PorytilesTilesetComponent > > porytiles::TilesetCreator::create_sample_primary_porytiles_component ( const std::string &  tileset_name) const

Creates a new basic primary PorytilesTilesetComponent with some default assets.

Parameters
tileset_nameThe name of the tileset being created (for error messages)
Returns
A new PorytilesTilesetComponent ready for compilation

Definition at line 2911 of file tileset_creator.cpp.

◆ create_sample_secondary_porytiles_component()

ChainableResult< std::unique_ptr< PorytilesTilesetComponent > > porytiles::TilesetCreator::create_sample_secondary_porytiles_component ( const std::string &  tileset_name) const

Creates a new basic secondary PorytilesTilesetComponent with some default assets.

Parameters
tileset_nameThe name of the tileset being created (for error messages)
Returns
A new PorytilesTilesetComponent ready for compilation

Definition at line 2973 of file tileset_creator.cpp.


The documentation for this class was generated from the following files: