|
Xonotic
|
Header file that describes the random items mutator. More...
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | EV_RandomItems_GetRandomItemClassName(i, o) |
| Called when random item classname is requested. More... | |
Enumerations | |
| enum | { RANDOM_ITEM_TYPE_HEALTH = BIT(0), RANDOM_ITEM_TYPE_ARMOR = BIT(1), RANDOM_ITEM_TYPE_RESOURCE = BIT(2), RANDOM_ITEM_TYPE_WEAPON = BIT(3), RANDOM_ITEM_TYPE_POWERUP = BIT(4), RANDOM_ITEM_TYPE_ALL = BITS(5) } |
Functions | |
| MUTATOR_HOOKABLE (RandomItems_GetRandomItemClassName, EV_RandomItems_GetRandomItemClassName) | |
| string | RandomItems_GetRandomItemClassName (string prefix) |
| Returns a random classname of the item. More... | |
| string | RandomItems_GetRandomVanillaItemClassName (string prefix, int types) |
| Returns a random classname of the vanilla item. More... | |
| REGISTER_MUTATOR (random_items,(autocvar_g_random_items||autocvar_g_random_loot)) | |
Variables | |
| bool | autocvar_g_random_items |
| Whether to enable random items. More... | |
| bool | autocvar_g_random_loot |
| Whether to enable random loot. More... | |
Header file that describes the random items mutator.
Definition in file sv_random_items.qh.
| #define EV_RandomItems_GetRandomItemClassName | ( | i, | |
| o | |||
| ) |
Called when random item classname is requested.
Definition at line 37 of file sv_random_items.qh.
| anonymous enum |
| Enumerator | |
|---|---|
| RANDOM_ITEM_TYPE_HEALTH | |
| RANDOM_ITEM_TYPE_ARMOR | |
| RANDOM_ITEM_TYPE_RESOURCE | |
| RANDOM_ITEM_TYPE_WEAPON | |
| RANDOM_ITEM_TYPE_POWERUP | |
| RANDOM_ITEM_TYPE_ALL | |
Definition at line 11 of file sv_random_items.qh.
| MUTATOR_HOOKABLE | ( | RandomItems_GetRandomItemClassName | , |
| EV_RandomItems_GetRandomItemClassName | |||
| ) |
Returns a random classname of the item.
| [in] | prefix | Prefix of the cvars that hold probabilities. |
Definition at line 54 of file sv_random_items.qc.
References M_ARGV, MUTATOR_CALLHOOK, RANDOM_ITEM_TYPE_ALL, RandomItems_GetRandomItemClassName(), and RandomItems_GetRandomVanillaItemClassName().
Referenced by RandomItems_GetRandomItemClassName(), RandomItems_ReplaceMapItem(), and RandomItems_SpawnLootItem().
Here is the call graph for this function:
Here is the caller graph for this function:Returns a random classname of the vanilla item.
| [in] | prefix | Prefix of the cvars that hold probabilities. |
| [in] | types | Bitmask of the types. See RANDOM_ITEM_TYPE constants. |
Definition at line 64 of file sv_random_items.qc.
References cvar(), CVAR_TYPEFLAG_EXISTS, FOREACH, LOG_WARNF, RANDOM_ITEM_TYPE_ARMOR, RANDOM_ITEM_TYPE_HEALTH, RANDOM_ITEM_TYPE_POWERUP, RANDOM_ITEM_TYPE_RESOURCE, RANDOM_ITEM_TYPE_WEAPON, RandomItems_GetRandomItemClassNameWithProperty(), RandomSelection_AddFloat, RandomSelection_AddString, RandomSelection_chosen_float, RandomSelection_chosen_string, RandomSelection_Init(), and WEP_FLAG_MUTATORBLOCKED.
Referenced by RandomItems_GetRandomItemClassName().
Here is the call graph for this function:
Here is the caller graph for this function:| REGISTER_MUTATOR | ( | random_items | , |
| (autocvar_g_random_items||autocvar_g_random_loot) | |||
| ) |
| bool autocvar_g_random_items |
Whether to enable random items.
Definition at line 8 of file sv_random_items.qh.
Referenced by MUTATOR_HOOKFUNCTION().
| bool autocvar_g_random_loot |
Whether to enable random loot.
Definition at line 9 of file sv_random_items.qh.
Referenced by MUTATOR_HOOKFUNCTION().