feat(lua): added weapon and vehicle cache bindings (#2477)

* Replaced bad example in entities documentation.
* Updated Lua documentation for vehicles/weapons to allow for auto generation.
* Added Vector3 support to the Lua globals/locals class.
* Fixed a bug with get_float in globals/locals returning an int instead of a float.
* Fixed globals get_uint/set_uint using signed types for the return/parameter.
* Added unsigned int helpers to the locals Lua class.
This commit is contained in:
gir489
2023-12-05 03:58:35 -05:00
committed by GitHub
parent cf02476c58
commit d2a7ff8ba4
13 changed files with 700 additions and 17 deletions

View File

@ -73,7 +73,7 @@ namespace big
const ped_item& gta_data_service::ped_by_hash(uint32_t hash)
{
for (const auto& [name, ped] : m_peds)
if (rage::joaat(name) == hash)
if (ped.m_hash == hash)
return ped;
return gta_data_service::empty_ped;
}
@ -81,7 +81,7 @@ namespace big
const vehicle_item& gta_data_service::vehicle_by_hash(uint32_t hash)
{
for (const auto& [name, veh] : m_vehicles)
if (rage::joaat(name) == hash)
if (veh.m_hash == hash)
return veh;
return gta_data_service::empty_vehicle;
}
@ -89,7 +89,7 @@ namespace big
const weapon_item& gta_data_service::weapon_by_hash(uint32_t hash)
{
for (const auto& [name, weapon] : m_weapons_cache.weapon_map)
if (rage::joaat(name) == hash)
if (weapon.m_hash == hash)
return weapon;
return gta_data_service::empty_weapon;
}