1 #ifndef __MAP_MONITOR_H
2 #define __MAP_MONITOR_H
7 #include "../../include/nlohmann/json.hpp"
8 #include "../../include/types.h"
9 #include "actions/action.h"
11 #include "map_log_factory.h"
12 #include "map_transitions.h"
16 std::recursive_mutex m;
20 MapMonitor(MapId map_id,
const std::string& map_name,
bool is_safe,
21 const nlohmann::json& map_description,
22 const nlohmann::json& map_mobs,
23 const nlohmann::json& map_transitions);
28 const std::string& get_name();
31 nlohmann::json add_player(nlohmann::json player_info);
33 nlohmann::json rm_player(EntityId entity_id);
37 bool entity_exists(EntityId entity_id);
39 std::queue<map_change_t> get_transitions();
42 void update(uint64_t delta_t);
45 void push_action(EntityId entity_id,
Action* action);
47 std::vector<map_log_t> get_update_logs();
49 nlohmann::json get_update_data(
bool update_entities);
51 nlohmann::json get_map_data();
54 #endif // MAP_MONITOR_H