|
Xonotic
|
#include <common/command/_mod.qh>#include <common/constants.qh>#include <common/teams.qh>#include <common/util.qh>#include <common/sounds/sound.qh>#include <common/weapons/all.qh>#include "all.inc"
Include dependency graph for all.qh:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | ACVNN(name) autocvar_notification_##name |
| #define | APP_NUM(num, prefix) ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL) |
| #define | APP_TEAM_NUM(num, prefix) ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK))) |
| #define | BOLD_OPERATOR "^BOLD" |
| #define | DEFAULT_FILENAME "notifications_dump.cfg" |
| #define | EIGHT_VARS_TO_VARARGS_VARLIST |
| #define | KILL_SPREE_LIST |
| #define | MSG_ANNCE_NOTIF(name, defaultvalue, sound, channel, volume, position) |
| #define | MSG_ANNCE_NOTIF_(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position) |
| #define | MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position) MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, defaultvalue, sound, channel, volume, position) |
| #define | MSG_CENTER_NOTIF(name, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle) |
| #define | MSG_CENTER_NOTIF_(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle) |
| #define | MSG_CENTER_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle) MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle) |
| #define | MSG_CHOICE_NOTIF(name, defaultvalue, challow, chtype, optiona, optionb) |
| #define | MSG_CHOICE_NOTIF_(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb) |
| #define | MSG_CHOICE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, challow, chtype, optiona, optionb) MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, defaultvalue, challow, chtype, optiona, optionb) |
| #define | MSG_INFO_NOTIF(name, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle) |
| #define | MSG_INFO_NOTIF_(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle) |
| #define | MSG_INFO_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle) MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle) |
| #define | MSG_MULTI_NOTIF(name, defaultvalue, anncename, infoname, centername) |
| #define | MULTIICON_INFO(name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) MULTIICON_INFO_(INFO_##name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) |
| #define | MULTIICON_INFO_(name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) |
| #define | NOTIF_ADD_AUTOCVAR(name, defaultvalue) float autocvar_notification_##name = defaultvalue; |
| #define | NOTIF_ARGUMENT_LIST |
| #define | NOTIF_HIT_MAX(count, funcname) |
| #define | NOTIF_HIT_UNKNOWN(token, funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; } |
| #define | SPREE_ITEM(counta, countb, center, normal, gentle) case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); } |
Typedefs | |
| using | Notification = entity |
| always last More... | |
Functions | |
| string | BUFF_NAME (int i) |
| void | Create_Notification_Entity (entity notif, float var_default, float var_cvar, MSG typeId, string namestring, int teamnum) |
| void | Create_Notification_Entity_Annce (entity notif, float var_cvar, string namestring, float channel, string snd, float vol, float position) |
| void | Create_Notification_Entity_Choice (entity notif, float var_cvar, string namestring, float challow_def, float challow_var, MSG chtype, Notification optiona, Notification optionb) |
| void | Create_Notification_Entity_InfoCenter (entity notif, float var_cvar, string namestring, int strnum, int flnum, string args, string hudargs, string icon, CPID cpid, string durcnt, string normal, string gentle) |
| void | Create_Notification_Entity_Multi (entity notif, float var_cvar, string namestring, Notification anncename, Notification infoname, Notification centername) |
| void | Destroy_All_Notifications () |
| void | Dump_Notifications (int fh, bool alsoprint) |
| used to output notifications.cfg file More... | |
| GENERIC_COMMAND (dumpnotifs, "Dump all notifications into " DEFAULT_FILENAME, false) | |
| string | Get_Notif_CvarName (Notification notif) |
| Notification | Get_Notif_Ent (MSG net_type, int net_name) |
| string | Get_Notif_TypeName (MSG net_type) |
| main types/groups of notifications More... | |
| void | Local_Notification (MSG net_type, Notification net_name,...count) |
| void | Local_Notification_WOVA (MSG net_type, Notification net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4) |
glue for networking, forwards to Local_Notification More... | |
| string | notif_arg_item_wepammo (float f1, float f2) |
| string | notif_arg_spree_inf (float type, string input, string player, float spree) |
| REGISTRY_BEGIN (Notifications) | |
| REGISTRY_END (Notifications) | |
| REGISTRY_SORT (Notifications) | |
| STATIC_INIT (Notifications) | |
| STATIC_INIT_LATE (Notif_Choices) | |
| #define APP_NUM | ( | num, | |
| prefix | |||
| ) | ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL) |
Definition at line 86 of file all.qh.
Referenced by ctf_CheckFlagReturn(), ctf_Handle_Capture(), ctf_Handle_Drop(), ctf_Handle_Pickup(), ctf_Handle_Retrieve(), and MUTATOR_HOOKFUNCTION().
| #define APP_TEAM_NUM | ( | num, | |
| prefix | |||
| ) | ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK))) |
Definition at line 85 of file all.qh.
Referenced by CA_CheckWinner(), ClientKill_TeamChange(), ctf_CaptureRecord(), ctf_Handle_Pickup(), ctf_Handle_Return(), Domination_CheckWinner(), freezetag_CheckWinner(), Invasion_CheckWinner(), kh_Key_Collect(), kh_Key_DropAll(), kh_Key_DropOne(), kh_Key_Spawn(), kh_Key_Think(), kh_LoserTeam(), kh_WinnerTeam(), nexball_setstatus(), Obituary(), ons_ControlPoint_Icon_BuildThink(), ons_ControlPoint_Icon_Damage(), ons_GeneratorDamage(), ons_GeneratorThink(), Onslaught_CheckWinner(), ResetBall(), and SetPlayerTeam().
| #define BOLD_OPERATOR "^BOLD" |
Definition at line 12 of file all.qh.
Referenced by centerprint_Add().
| #define DEFAULT_FILENAME "notifications_dump.cfg" |
Definition at line 164 of file all.qh.
Referenced by GENERIC_COMMAND().
| #define EIGHT_VARS_TO_VARARGS_VARLIST |
Definition at line 88 of file all.qh.
Referenced by Local_Notification_WOVA().
| #define KILL_SPREE_LIST |
Definition at line 454 of file all.qh.
Referenced by notif_arg_spree_inf(), and Obituary().
| #define MSG_ANNCE_NOTIF_ | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| sound, | |||
| channel, | |||
| volume, | |||
| position | |||
| ) |
| #define MSG_CENTER_NOTIF | ( | name, | |
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| cpid, | |||
| durcnt, | |||
| normal, | |||
| gentle | |||
| ) |
| #define MSG_CENTER_NOTIF_ | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| cpid, | |||
| durcnt, | |||
| normal, | |||
| gentle | |||
| ) |
| #define MSG_CENTER_NOTIF_TEAM | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| cpid, | |||
| durcnt, | |||
| normal, | |||
| gentle | |||
| ) | MSG_CENTER_NOTIF_(teamnum, CENTER_##name, CENTER_##cvarname, defaultvalue, strnum, flnum, args, cpid, durcnt, normal, gentle) |
| #define MSG_CHOICE_NOTIF | ( | name, | |
| defaultvalue, | |||
| challow, | |||
| chtype, | |||
| optiona, | |||
| optionb | |||
| ) |
| #define MSG_CHOICE_NOTIF_ | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| challow, | |||
| chtype, | |||
| optiona, | |||
| optionb | |||
| ) |
| #define MSG_CHOICE_NOTIF_TEAM | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| challow, | |||
| chtype, | |||
| optiona, | |||
| optionb | |||
| ) | MSG_CHOICE_NOTIF_(teamnum, CHOICE_##name, CHOICE_##cvarname, defaultvalue, challow, chtype, optiona, optionb) |
| #define MSG_INFO_NOTIF | ( | name, | |
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| hudargs, | |||
| icon, | |||
| normal, | |||
| gentle | |||
| ) |
| #define MSG_INFO_NOTIF_ | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| hudargs, | |||
| icon, | |||
| normal, | |||
| gentle | |||
| ) |
| #define MSG_INFO_NOTIF_TEAM | ( | teamnum, | |
| name, | |||
| cvarname, | |||
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| hudargs, | |||
| icon, | |||
| normal, | |||
| gentle | |||
| ) | MSG_INFO_NOTIF_(teamnum, INFO_##name, INFO_##cvarname, defaultvalue, strnum, flnum, args, hudargs, icon, normal, gentle) |
| #define MSG_MULTI_NOTIF | ( | name, | |
| defaultvalue, | |||
| anncename, | |||
| infoname, | |||
| centername | |||
| ) |
| #define MULTIICON_INFO | ( | name, | |
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| hudargs, | |||
| iconargs, | |||
| icon, | |||
| normal, | |||
| gentle | |||
| ) | MULTIICON_INFO_(INFO_##name, defaultvalue, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) |
| #define MULTIICON_INFO_ | ( | name, | |
| defaultvalue, | |||
| strnum, | |||
| flnum, | |||
| args, | |||
| hudargs, | |||
| iconargs, | |||
| icon, | |||
| normal, | |||
| gentle | |||
| ) |
| #define NOTIF_ARGUMENT_LIST |
Definition at line 403 of file all.qh.
Referenced by Local_Notification_sprintf(), and Process_Notif_Args().
| #define NOTIF_HIT_MAX | ( | count, | |
| funcname | |||
| ) |
| #define NOTIF_HIT_UNKNOWN | ( | token, | |
| funcname | |||
| ) | { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; } |
Definition at line 452 of file all.qh.
Referenced by Local_Notification_sprintf().
| #define SPREE_ITEM | ( | counta, | |
| countb, | |||
| center, | |||
| normal, | |||
| gentle | |||
| ) | case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); } |
| using Notification = entity |
Definition at line 3 of file buffs.qc.
References Buff::m_color, Buff::m_name, REGISTRY_GET, REPLICATE(), rgb_to_hexcolor(), and strcat().
Here is the call graph for this function:| void Create_Notification_Entity | ( | entity | notif, |
| float | var_default, | ||
| float | var_cvar, | ||
| MSG | typeId, | ||
| string | namestring, | ||
| int | teamnum | ||
| ) |
Definition at line 396 of file all.qc.
References LOG_INFOF, notif_error, notif_global_error, and strzone().
Here is the call graph for this function:| void Create_Notification_Entity_Annce | ( | entity | notif, |
| float | var_cvar, | ||
| string | namestring, | ||
| float | channel, | ||
| string | snd, | ||
| float | vol, | ||
| float | position | ||
| ) |
Definition at line 446 of file all.qc.
References AnnouncerFilename, Get_Notif_TypeName(), LOG_INFOF, notif_error, precache_sound(), and strzone().
Here is the call graph for this function:| void Create_Notification_Entity_Choice | ( | entity | notif, |
| float | var_cvar, | ||
| string | namestring, | ||
| float | challow_def, | ||
| float | challow_var, | ||
| MSG | chtype, | ||
| Notification | optiona, | ||
| Notification | optionb | ||
| ) |
Definition at line 702 of file all.qc.
References entity(), FOREACH, Get_Notif_TypeName(), LOG_INFOF, max(), notif_error, and NUM_TEAM_1.
Here is the call graph for this function:| void Create_Notification_Entity_InfoCenter | ( | entity | notif, |
| float | var_cvar, | ||
| string | namestring, | ||
| int | strnum, | ||
| int | flnum, | ||
| string | args, | ||
| string | hudargs, | ||
| string | icon, | ||
| CPID | cpid, | ||
| string | durcnt, | ||
| string | normal, | ||
| string | gentle | ||
| ) |
Definition at line 492 of file all.qc.
References CPID_Null, Get_Notif_TypeName(), LOG_INFOF, LOG_WARNF, notif_error, Process_Notif_Args(), server_is_dedicated, SET_NOTIF_STRING, and strzone().
Here is the call graph for this function:| void Create_Notification_Entity_Multi | ( | entity | notif, |
| float | var_cvar, | ||
| string | namestring, | ||
| Notification | anncename, | ||
| Notification | infoname, | ||
| Notification | centername | ||
| ) |
Definition at line 651 of file all.qc.
References Get_Notif_TypeName(), LOG_INFOF, max(), and notif_error.
Here is the call graph for this function:| void Destroy_All_Notifications | ( | ) |
Definition at line 159 of file all.qc.
References centerprint_KillAll(), CPID_Null, Destroy_Notification_Entity(), FOREACH, and NULL.
Referenced by GenericCommand_restartnotifs().
Here is the call graph for this function:
Here is the caller graph for this function:used to output notifications.cfg file
Definition at line 781 of file all.qc.
References FOREACH, NOTIF_WRITE, NOTIF_WRITE_HARDCODED, and NUM_TEAM_1.
Referenced by GENERIC_COMMAND().
Here is the caller graph for this function:| GENERIC_COMMAND | ( | dumpnotifs | , |
| "Dump all notifications into " | DEFAULT_FILENAME, | ||
| false | |||
| ) |
Definition at line 166 of file all.qh.
References argv(), CASE, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, count, DEFAULT_FILENAME, Dump_Notifications(), entity(), ENUMCLASS, ENUMCLASS_END, f1, f2, fclose(), FILE_WRITE, fopen(), IL_NEW, Local_Notification(), Local_Notification_WOVA(), LOG_HELP, LOG_HELPF, LOG_INFO, LOG_INFOF, LOG_TRACE, LOG_WARNF, s1, s2, and STATIC_INIT().
Here is the call graph for this function:| string Get_Notif_CvarName | ( | Notification | notif | ) |
Definition at line 727 of file all.qh.
References Static_Team_ColorName(), strlen(), and substring().
Referenced by Local_Notification().
Here is the call graph for this function:
Here is the caller graph for this function:| Notification Get_Notif_Ent | ( | MSG | net_type, |
| int | net_name | ||
| ) |
Definition at line 734 of file all.qh.
References Get_Notif_TypeName(), LOG_WARNF, NULL, and REGISTRY_GET.
Referenced by Local_Notification_WOVA().
Here is the call graph for this function:
Here is the caller graph for this function:| string Get_Notif_TypeName | ( | MSG | net_type | ) |
main types/groups of notifications
"Global" AND "personal" announcer messages "Global" information messages "Personal" centerprint messages Subcall MSG_INFO and/or MSG_CENTER notifications Choose which subcall wrapper to activate Kill centerprint message
Definition at line 30 of file all.qh.
References CASE, ENUMCLASS, ENUMCLASS_END, LOG_WARNF, and ORDINAL.
Referenced by Create_Notification_Entity_Annce(), Create_Notification_Entity_Choice(), Create_Notification_Entity_InfoCenter(), Create_Notification_Entity_Multi(), Get_Notif_Ent(), Local_Notification(), and Local_Notification_WOVA().
Here is the caller graph for this function:| void Local_Notification | ( | MSG | net_type, |
| Notification | net_name, | ||
| count | |||
| ) |
Definition at line 1185 of file all.qc.
References backtrace, count, cvar(), entity(), float(), Get_Notif_CvarName(), Get_Notif_TypeName(), Local_Notification_sprintf(), Local_Notification_WOVA(), LOG_WARNF, MakeConsoleSafe(), print(), strzone(), substring(), and warmup_stage.
Referenced by Announcer_Countdown(), Announcer_Gamestart(), GENERIC_COMMAND(), Local_Notification_WOVA(), and NET_HANDLE().
Here is the call graph for this function:
Here is the caller graph for this function:| void Local_Notification_WOVA | ( | MSG | net_type, |
| Notification | net_name, | ||
| float | stringcount, | ||
| float | floatcount, | ||
| string | s1, | ||
| string | s2, | ||
| string | s3, | ||
| string | s4, | ||
| float | f1, | ||
| float | f2, | ||
| float | f3, | ||
| float | f4 | ||
| ) |
glue for networking, forwards to Local_Notification
Definition at line 1368 of file all.qc.
References backtrace, centerprint_Kill(), centerprint_KillAll(), count, CPID_Null, EIGHT_VARS_TO_VARARGS_VARLIST, entity(), ENUMCAST, float(), FOREACH_CLIENT, Get_Notif_Ent(), Get_Notif_TypeName(), IL_EACH, IL_PUSH(), IS_REAL_CLIENT, Local_Notification(), Local_Notification_WOVA(), LOG_WARN, LOG_WARNF, make_pure, MakeConsoleSafe(), nent_client, nent_floatcount, nent_floats, nent_net_name, nent_net_type, nent_stringcount, nent_strings, NET_HANDLE, new_pure, ORDINAL, owner, ReadString, REGISTER_NET_LINKED, server_is_dedicated, setthink, strfree, strzone(), time, WriteByte(), WriteLong(), WriteShort(), and WriteString().
Referenced by GENERIC_COMMAND(), Local_Notification(), and Local_Notification_WOVA().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 633 of file all.qh.
References Weapon::ammo_type, and REGISTRY_GET.
Definition at line 536 of file all.qh.
References autocvar_notification_show_sprees_info, autocvar_notification_show_sprees_info_newline, autocvar_notification_show_sprees_info_specialonly, KILL_SPREE_LIST, and substring().
Here is the call graph for this function:| REGISTRY_BEGIN | ( | Notifications | ) |
| REGISTRY_END | ( | Notifications | ) |
Definition at line 860 of file all.qh.
References autocvar_notification_errors_are_fatal, FOREACH, LOG_FATAL, LOG_SEVERE, notif_global_error, and NUM_TEAM_1.
| REGISTRY_SORT | ( | Notifications | ) |
| STATIC_INIT | ( | Notifications | ) |
| STATIC_INIT_LATE | ( | Notif_Choices | ) |
Definition at line 720 of file all.qh.
References LOG_FATALF.
Referenced by GENERIC_COMMAND().
Here is the caller graph for this function:| string arg_slot[NOTIF_MAX_ARGS] |
Definition at line 389 of file all.qh.
Referenced by Local_Notification_sprintf().
| float autocvar_notification_allow_chatboxprint = 0 |
Definition at line 324 of file all.qh.
Referenced by Process_Notif_Line().
Definition at line 310 of file all.qh.
Referenced by REGISTRY_END().
| float autocvar_notification_show_sprees_info = 3 |
Definition at line 307 of file all.qh.
Referenced by notif_arg_spree_inf().
Definition at line 308 of file all.qh.
Referenced by notif_arg_spree_inf().
Definition at line 309 of file all.qh.
Referenced by notif_arg_spree_inf().
| int msg_choice_choices[NOTIF_CHOICE_MAX] |
| entity nent_client |
Definition at line 694 of file all.qh.
Referenced by Local_Notification_WOVA().
| int nent_floatcount |
Definition at line 662 of file all.qh.
Referenced by Local_Notification_WOVA().
| float nent_floats[4] |
Definition at line 698 of file all.qh.
Referenced by Local_Notification_WOVA().
| float nent_net_name |
Definition at line 696 of file all.qh.
Referenced by Local_Notification_WOVA().
| MSG nent_net_type |
Definition at line 695 of file all.qh.
Referenced by Local_Notification_WOVA().
| int nent_stringcount |
Definition at line 661 of file all.qh.
Referenced by Local_Notification_WOVA().
| string nent_strings[4] |
Definition at line 697 of file all.qh.
Referenced by Local_Notification_WOVA().
| bool notif_error |
Definition at line 717 of file all.qh.
Referenced by Create_Notification_Entity(), Create_Notification_Entity_Annce(), Create_Notification_Entity_Choice(), Create_Notification_Entity_InfoCenter(), Create_Notification_Entity_Multi(), Process_Notif_Args(), and Process_Notif_Line().
| bool notif_global_error |
Definition at line 718 of file all.qh.
Referenced by Create_Notification_Entity(), REGISTRY_BEGIN(), and REGISTRY_END().
| const float NOTIF_MAX_ARGS = 7 |
Definition at line 385 of file all.qh.
Referenced by Local_Notification_sprintf(), and Process_Notif_Args().
| const float NOTIF_MAX_DURCNT = 2 |
Definition at line 387 of file all.qh.
Referenced by Local_Notification_sprintf(), and Process_Notif_Args().
| const float NOTIF_MAX_HUDARGS = 2 |
Definition at line 386 of file all.qh.
Referenced by Local_Notification_sprintf(), and Process_Notif_Args().