1 #ifndef CORE_MAPS_TOWN_HPP
2 #define CORE_MAPS_TOWN_HPP
4 #include <BLIB/Serialization.hpp>
39 struct SerializableObject<
core::map::Town> :
public SerializableObjectBase {
44 SerializableField<1, Town, std::string>
name;
45 SerializableField<2, Town, std::string>
playlist;
46 SerializableField<3, Town, Weather::Type>
weather;
47 SerializableField<4, Town, std::uint16_t>
pcSpawn;
49 SerializableField<6, Town, sf::Vector2i>
mapPos;
52 : SerializableObjectBase(
"Town")
53 , name(
"name", *this, &
Town::name, SerializableFieldBase::Required{})
54 , playlist(
"playlist", *this, &
Town::playlist, SerializableFieldBase::Required{})
55 , weather(
"weather", *this, &
Town::weather, SerializableFieldBase::Required{})
56 , pcSpawn(
"pcSpawn", *this, &
Town::pcSpawn, SerializableFieldBase::Required{})
57 , description(
"desc", *this, &
Town::description, SerializableFieldBase::Optional{})
58 , mapPos(
"mapPos", *this, &
Town::mapPos, SerializableFieldBase::Optional{}) {
59 description.setDefault(
"DESCRIPTION NOT SET");
60 mapPos.setDefault({-100, -100});
Core classes and functionality for both the editor and game.
Represents a town, route, or region within a map. Maps may have many towns. Individual tiles are asso...
SerializableField< 4, Town, std::uint16_t > pcSpawn
SerializableField< 2, Town, std::string > playlist
SerializableField< 6, Town, sf::Vector2i > mapPos
SerializableField< 1, Town, std::string > name
SerializableField< 5, Town, std::string > description
SerializableField< 3, Town, Weather::Type > weather
Parent weather system for maps. Manages active weather.
Template struct to generate OwnedPeoplemon for random encounters.