Porytiles
Loading...
Searching...
No Matches
encounter_type_map_provider.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string>
5
7
8namespace porytiles {
9
20 public:
21 virtual ~EncounterTypeMapProvider() = default;
22
33 [[nodiscard]] virtual ChainableResult<std::uint8_t> lookup(const std::string &encounter_name) const = 0;
34
45 [[nodiscard]] virtual ChainableResult<std::string> lookup(std::uint8_t encounter_value) const = 0;
46};
47
48} // namespace porytiles
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Abstract interface for providing two-way metatile encounter type mappings.
virtual ChainableResult< std::uint8_t > lookup(const std::string &encounter_name) const =0
Looks up the numeric value for an encounter type constant name.
virtual ~EncounterTypeMapProvider()=default
virtual ChainableResult< std::string > lookup(std::uint8_t encounter_value) const =0
Looks up the encounter type constant name for a numeric value.