This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/services/gta_data/weapon_file.hpp

30 lines
683 B
C++
Raw Normal View History

#pragma once
#include "weapon_item.hpp"
#include "weapon_component.hpp"
namespace big
{
class weapon_file
{
public:
struct version_info
{
std::string m_game_build;
std::string m_online_version;
std::uint32_t m_file_version;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(version_info, m_game_build, m_online_version, m_file_version)
} version_info{};
std::map<std::string, weapon_item> weapon_map;
std::map<std::string, weapon_component> weapon_components;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapon_file, version_info, weapon_map, weapon_components)
bool up_to_date(std::uint32_t file_version) const
{
return file_version == version_info.m_file_version;
}
};
}