aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Crime.hpp
blob: 26f52ab2eeb39f4ef38e4f69720a00af608f3074 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include "openvic-simulation/misc/Modifier.hpp"

namespace OpenVic {
   struct Crime final : TriggeredModifier {
      friend struct CrimeManager;

   private:
      const bool PROPERTY(default_active);

      Crime(std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon, bool new_default_active);

   public:
      Crime(Crime&&) = default;
   };

   struct CrimeManager {
   private:
      IdentifierRegistry<Crime> IDENTIFIER_REGISTRY(crime_modifier);

   public:
      bool add_crime_modifier(
         std::string_view identifier, ModifierValue&& values, Modifier::icon_t icon, bool default_active
      );

      bool load_crime_modifiers(ModifierManager const& modifier_manager, ast::NodeCPtr root);
   };
}