blob: 91fc88a673ebdfce3f24036b5726641f4229f9ce (
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
30
31
32
33
34
35
|
#pragma once
#include "openvic-simulation/modifier/Modifier.hpp"
namespace OpenVic {
struct Crime final : TriggeredModifier {
friend struct CrimeManager;
private:
const bool PROPERTY_CUSTOM_PREFIX(default_active, is);
Crime(
std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon, ConditionScript&& new_trigger,
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, IconModifier::icon_t icon, ConditionScript&& trigger,
bool default_active
);
bool load_crime_modifiers(ModifierManager const& modifier_manager, ast::NodeCPtr root);
bool parse_scripts(DefinitionManager const& definition_manager);
};
}
|