4 /// \brief Header file that describes the random items mutator.
6 /// \copyright GNU GPLv2 or any later version.
8 bool autocvar_g_random_items; ///< Whether to enable random items.
12 RANDOM_ITEM_TYPE_HEALTH = BIT(0),
13 RANDOM_ITEM_TYPE_ARMOR = BIT(1),
14 RANDOM_ITEM_TYPE_RESOURCE = BIT(2),
15 RANDOM_ITEM_TYPE_WEAPON = BIT(3),
16 RANDOM_ITEM_TYPE_POWERUP = BIT(4),
17 RANDOM_ITEM_TYPE_ALL = BITS(5)
20 /// \brief Returns a random classname of the item.
21 /// \param[in] prefix Prefix of the cvars that hold probabilities.
22 /// \return Random classname of the item.
23 /// \note This function will automatically detect gamemode and use cvars from
25 string RandomItems_GetRandomItemClassName(string prefix);
27 /// \brief Returns a random classname of the vanilla item.
28 /// \param[in] prefix Prefix of the cvars that hold probabilities.
29 /// \param[in] types Bitmask of the types. See RANDOM_ITEM_TYPE constants.
30 /// \return Random classname of the vanilla item.
31 /// \note This includes mutator items that don't change gameplay a lot such as
32 /// jetpack and new toys.
33 string RandomItems_GetRandomVanillaItemClassName(string prefix, int types);
35 /// \brief Returns a random classname of the instagib item.
36 /// \param[in] prefix Prefix of the cvars that hold probabilities.
37 /// \return Random classname of the instagib item.
38 string RandomItems_GetRandomInstagibItemClassName(string prefix);
40 /// \brief Returns a random classname of the overkill item.
41 /// \param[in] prefix Prefix of the cvars that hold probabilities.
42 /// \return Random classname of the overkill item.
43 string RandomItems_GetRandomOverkillItemClassName(string prefix);