forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ammo_effect.h
70 lines (55 loc) · 1.64 KB
/
ammo_effect.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#ifndef CATA_SRC_AMMO_EFFECT_H
#define CATA_SRC_AMMO_EFFECT_H
#include <cstddef>
#include <string>
#include <vector>
#include "explosion.h"
#include "field_type.h"
#include "string_id.h"
#include "type_id.h"
class JsonObject;
struct ammo_effect {
public:
void load( const JsonObject &jo, const std::string &src );
void finalize();
void check() const;
public:
field_type_id aoe_field_type = fd_null;
/** used during JSON loading only */
std::string aoe_field_type_name = "fd_null";
int aoe_intensity_min = 0;
int aoe_intensity_max = 0;
int aoe_radius = 1;
int aoe_radius_z = 0;
int aoe_chance = 100;
int aoe_size = 0;
explosion_data aoe_explosion_data;
bool aoe_check_passable = false;
bool aoe_check_sees = false;
int aoe_check_sees_radius = 0;
bool do_flashbang = false;
bool do_emp_blast = false;
field_type_id trail_field_type = fd_null;
/** used during JSON loading only */
std::string trail_field_type_name = "fd_null";
int trail_intensity_min = 0;
int trail_intensity_max = 0;
int trail_chance = 100;
public:
// Used by generic_factory
string_id<ammo_effect> id;
bool was_loaded = false;
public:
static size_t count();
};
namespace ammo_effects
{
void load( const JsonObject &jo, const std::string &src );
void finalize_all();
void check_consistency();
void reset();
const std::vector<ammo_effect> &get_all();
} // namespace ammo_effects
extern ammo_effect_id AE_NULL;
#endif // CATA_SRC_AMMO_EFFECT_H