2 /// \brief Header file that describes the functions related to game items.
3 /// \copyright GNU GPLv2 or any later version.
7 /// \brief Initializes the item according to classname.
8 /// \param[in,out] item Item to initialize.
9 /// \param[in] class_name Class name to use.
10 /// \return No return.
11 void Item_Initialize(entity item, string class_name);
13 /// \brief Creates a loot item.
14 /// \param[in] class_name Class name of the item.
15 /// \param[in] position Position of the item.
16 /// \param[in] velocity of the item.
17 /// \param[in] time_to_live Amount of time after which the item will disappear.
18 /// \return Item on success, NULL otherwise.
19 entity Item_CreateLoot(string class_name, vector position, vector vel,
22 /// \brief Initializes the loot item.
23 /// \param[in] class_name Class name of the item.
24 /// \param[in] position Position of the item.
25 /// \param[in] velocity of the item.
26 /// \param[in] time_to_live Amount of time after which the item will disappear.
27 /// \return True on success, false otherwise.
28 /// \nore This function is useful if you want to set some item properties before
30 bool Item_InitializeLoot(entity item, string class_name, vector position,
31 vector vel, float time_to_live);
33 /// \brief Returns whether the item is loot.
34 /// \param[in] item Item to check.
35 /// \return True if the item is loot, false otherwise.
36 bool Item_IsLoot(entity item);
38 /// \brief Sets the item loot status.
39 /// \param[in,out] item Item to adjust.
40 /// \param[in] loot Whether item is loot.
41 /// \return No return.
42 void Item_SetLoot(entity item, bool loot);