2020-03-22 00:45:04 +01:00
|
|
|
#pragma once
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
#include "SqBase.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2019-06-02 11:44:37 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the slot associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD uint32_t GetWeaponSlot(uint32_t id);
|
2019-06-02 11:44:37 +02:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the name associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD const SQChar * GetWeaponName(uint32_t id);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2018-04-13 19:31:18 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Modify the name associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
void SetWeaponName(uint32_t id, StackStrF & name);
|
2018-04-13 19:31:18 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the total number of identifiers in the pool of custom weapon names.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD uint32_t GetCustomWeaponNamePoolSize();
|
2018-04-13 19:31:18 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Clear all identifiersand associated names from the pool of custom weapon names.
|
|
|
|
*/
|
|
|
|
void ClearCustomWeaponNamePool();
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert a weapon name to a weapon identifier.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t GetWeaponID(StackStrF & name);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the specified weapon identifier is valid.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
bool IsWeaponValid(int32_t id);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert the given weapon identifier to it's associated model identifier.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD int32_t WeaponToModel(int32_t id);
|
2015-09-30 02:56:11 +02:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the given weapon identifier cannot be used by another player to inflict damage.
|
|
|
|
*/
|
2021-01-30 07:51:39 +01:00
|
|
|
SQMOD_NODISCARD bool IsWeaponNatural(int32_t id);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
} // Namespace:: SqMod
|