]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications.qh
More work on entity notifications
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications.qh
index b00407eda28beee6eb6641e253eb7ed416619ed3..a67f9af151535479f5be8d6cfc5b1aaa2a5dfbf9 100644 (file)
 
 // field identifiers for Get_Field_Value()
 #define F_NAME 1
-#define F_STRNUM 2
-#define F_FLNUM 3
+#define F_INFNAME 2
+#define F_CENNAME 3
+#define F_INFVAL 4
+#define F_CENVAL 5
+#define F_STRNUM 6
+#define F_FLNUM 7
 
 // ping of bots defined for extra frag message notification information
 #define BOT_PING -1
@@ -86,8 +90,12 @@ string got_commandkey;
 #define WEAPON_NAME f1 // weaponorder[f1].netname
 #endif
 
-#define ADD_AUTOCVAR(name) var float autocvar_notification_##name = TRUE;
-#define CHECK_AUTOCVAR(name) if(autocvar_notification_##name)
+#define NOTIF_SWITCH_LIST(net_type,net_name,returnv) \
+       switch(net_name) \
+       { \
+               ##net_type##_NOTIFICATIONS \
+               default: { backtrace(strcat("^1NOTIFICATION HAD NO MATCH: ^7net_type = ", VAR_TO_TEXT(net_type), ", net_name = ", ftos(net_name), ".\n")); returnv; } \
+       }
 
 string Get_Field_Value(float field, float net_type, float net_name); // get the actual name of a notification and return it as a string
 void Local_Notification(float net_type, float net_name, ...count);
@@ -116,16 +124,7 @@ void Read_Notification(float is_new);
 #define NOTIF_ANY 5
 #define NOTIF_ANY_EXCEPT 6
 
-.float nent_broadcast;
-.entity nent_client;
-.float nent_net_type;
-.float nent_net_name;
-.float nent_stringcount;
-.float nent_floatcount; 
-.string nent_strings[4];
-.float nent_floats[4];
-
-#define IFSTR(num) ((num <= (stringcount-1)) ? ...(num, string) : NO_STR_ARG)
+#define IFSTR(num) ((num < stringcount) ? ...(num, string) : NO_STR_ARG)
 #define IFFL(num) ((((stringcount-1) + num) < count) ? ...(((stringcount-1) + num), float) : NO_FL_ARG)
 
 void Send_Notification(float broadcast, entity client, float net_type, float net_name, ...count);
@@ -177,8 +176,8 @@ void Dump_Notifications(float fh, float alsoprint);
  users to create unique color profiles for their HUD, giving more customization
  options to HUD designers and end users who want such a feature.
 
- Check out the function calls for string CCR(...) and
- string TCR(...) to better understand how these codes work.
+ Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
+ string TCR(...) to better understand how these code replacements work.
 
  Guidlines for notification declaration (please try and follow these):
   Specific rules:
@@ -214,7 +213,7 @@ void Dump_Notifications(float fh, float alsoprint);
                MSG_INFO_NOTIF(prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
        #endif
 #define MSG_INFO_NOTIFICATIONS \
-       MSG_INFO_NOTIF(INFO_EMPTY,                                                      0, 0, NO_STR_ARG, XPD("", ""),                                          "",                                             "empty", "") \
+       /*MSG_INFO_NOTIF(INFO_EMPTY,                                            0, 0, NO_STR_ARG, XPD("", ""),                                          "",                                             "", "")*/ \
        MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DROPPED_, 2,         0, 0, NO_STR_ARG, XPD("", ""),                                          "",                                             _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself\n"), "") \
        MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DAMAGED_, 2,         0, 0, NO_STR_ARG, XPD("", ""),                                          "",                                             _("^BGThe ^TC^TT^BG flag was destroyed and returned to base\n"), "") \
        MULTITEAM_INFO(INFO_CTF_FLAGRETURN_SPEEDRUN_, 2,        0, 1, f1/100, XPD("", ""),                                                      "",                                             _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself\n"), "") \
@@ -273,6 +272,21 @@ void Dump_Notifications(float fh, float alsoprint);
        MSG_INFO_NOTIF(INFO_DEATH_MURDER_TOUCHEXPLODE,          2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 died in an accident with ^BG%s^K1%s\n"), "") \
        MSG_INFO_NOTIF(INFO_DEATH_MURDER_CHEAT,                         2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was unfairly eliminated by ^BG%s^K1%s\n"), "") \
        MSG_INFO_NOTIF(INFO_DEATH_MURDER_FIRE,                          2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was burnt up into a crisp by ^BG%s^K1%s\n"), _("^F1%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s\n")) \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_CRUSH,                      2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was crushed by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_SPID_MINIGUN,       2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 got shredded by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_SPID_ROCKET,        2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was blasted to bits by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_SPID_DEATH,         2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 got caught in the blast when ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_WAKI_GUN,           2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was bolted down by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_WAKI_ROCKET,        2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 couldn't find shelter from ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_WAKI_DEATH,         2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 got caught in the blast when ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_RAPT_CANNON,        2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 couldn't resist ^BG%s^K1 purple blobs%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_RAPT_BOMB,          2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was cluster bombed by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_RAPT_FRAGMENT,      2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 was cluster bombed by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_RAPT_DEATH,         2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 got caught in the blast when ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_BUMB_GUN,           2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 foobar by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_BUMB_RAY,           2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 foobar by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_BUMB_RAY_HEAL,      2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 foobar by ^BG%s^K1%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_DEATH_MURDER_VH_BUMB_DEATH,         2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),                      "notify_death",                 _("^BG%s^K1 foobar by ^BG%s^K1%s\n"), "") \
        MULTITEAM_INFO(INFO_FREEZETAG_ROUND_WIN_, 4,            0, 0, NO_STR_ARG, XPD("", ""),                                          "",                                             _("^TC^TT^BG team wins the round, all other teams were frozen\n"), "") \
        MSG_INFO_NOTIF(INFO_FREEZETAG_REVIVE,                           2, 0, XPD(s1, s2), XPD("", ""),                                         "",                                             _("^BG%s^K3 was revived by ^BG%s\n"), "") \
        MSG_INFO_NOTIF(INFO_FREEZETAG_FREEZE,                           2, 0, XPD(s1, s2), XPD("", ""),                                         "",                                             _("^BG%s^K1 was frozen by ^BG%s\n"), "") \
@@ -309,7 +323,7 @@ void Dump_Notifications(float fh, float alsoprint);
        MSG_INFO_NOTIF(INFO_VERSION_BETA,                                       2, 0, XPD(s1, s2), XPD("", ""),                                         "",                                             _("\{1}^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s\n"), "") \
        MSG_INFO_NOTIF(INFO_VERSION_OLD,                                        2, 0, XPD(s1, s2), XPD("", ""),                                         "",                                             _("\{1}^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s\n"), "") \
        MSG_INFO_NOTIF(INFO_VERSION_OUTDATED,                           2, 0, XPD(s1, s2), XPD("", ""),                                         "",                                             _("\{1}^F4NOTE: ^F1Xonotic %s^BG is out, and you still have ^F2Xonotic %s^BG - get the update from ^F3http://www.xonotic.org/^BG!\n"), "") \
-       MSG_INFO_NOTIF(INFO_WATERMARK,                                          1, 0, s1, XPD("", ""),                                                          "",                                             _("^F4SVQC Build information: ^BG%s\n"), "") \
+       MSG_INFO_NOTIF(INFO_WATERMARK,                                          1, 0, s1, XPD("", ""),                                                          "",                                             _("^F3SVQC Build information: ^F4%s\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_THINKING_WITH_PORTALS,                       1, 1, XPD(s1, SPREE_LOST), XPD(s1, ""),         "notify_selfkill", _("^BG%s^K1 is now thinking with portals%s\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_SUICIDE,                             1, 1, XPD(s1, SPREE_LOST), XPD(s1, ""),         "weaponcrylink", _("^BG%s^K1 felt the strong pull of their Crylink%s\n"), "") \
        MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_MURDER,                                      2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1),      "weaponcrylink", _("^BG%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s\n"), "") \
@@ -370,7 +384,7 @@ void Dump_Notifications(float fh, float alsoprint);
                MSG_CENTER_NOTIF(prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
        #endif
 #define MSG_CENTER_NOTIFICATIONS \
-       MSG_CENTER_NOTIF(CENTER_EMPTY,                                                  0, 0, NO_STR_ARG,                               NO_CPID,                                XPD(0, 0), "null", "") \
+       /*MSG_CENTER_NOTIF(CENTER_EMPTY,                                                0, 0, NO_STR_ARG,                               NO_CPID,                                XPD(0, 0), "null", "")*/ \
        MSG_CENTER_NOTIF(CENTER_ASSAULT_ATTACKING,                              0, 0, NO_STR_ARG,                               CPID_ASSAULT_ROLE,              XPD(0, 0), _("^BGYou are attacking!"), "") \
        MSG_CENTER_NOTIF(CENTER_ASSAULT_DEFENDING,                              0, 0, NO_STR_ARG,                               CPID_ASSAULT_ROLE,              XPD(0, 0), _("^BGYou are defending!"), "") \
        MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_SHIELDED,             0, 0, NO_STR_ARG,                               CPID_CTF_CAPSHIELD,             XPD(0, 0), _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
@@ -451,7 +465,7 @@ void Dump_Notifications(float fh, float alsoprint);
        MSG_CENTER_NOTIF(CENTER_WEAPON_MARBLES_LOST,                    1, 1, XPD(s1, WEAPON_NAME),             NO_CPID,                                XPD(0, 0), _("^K1You lost your marbles against ^BG%s^K1 using the ^BG%s!"), "")
 
 #define MSG_WEAPON_NOTIFICATIONS \
-       MSG_WEAPON_NOTIF(WEAPON_EMPTY,                                                  NO_MSG,                                                                         NO_MSG) \
+       /*MSG_WEAPON_NOTIF(WEAPON_EMPTY,                                                NO_MSG,                                                                         NO_MSG)*/ \
        MSG_WEAPON_NOTIF(WEAPON_THINKING_WITH_PORTALS,                  INFO_WEAPON_THINKING_WITH_PORTALS,                      CENTER_DEATH_SELF_GENERIC) \
        MSG_WEAPON_NOTIF(WEAPON_CRYLINK_SUICIDE,                                INFO_WEAPON_CRYLINK_SUICIDE,                            CENTER_DEATH_SELF_GENERIC) \
        MSG_WEAPON_NOTIF(WEAPON_CRYLINK_MURDER,                                 INFO_WEAPON_CRYLINK_MURDER,                             NO_MSG) \
@@ -503,7 +517,7 @@ void Dump_Notifications(float fh, float alsoprint);
        MSG_WEAPON_NOTIF(WEAPON_UZI_MURDER_SPRAY,                               INFO_WEAPON_UZI_MURDER_SPRAY,                           NO_MSG) 
 
 #define MSG_DEATH_NOTIFICATIONS \
-       MSG_DEATH_NOTIF(DEATH_EMPTY,                                            NO_MSG,                                                                 NO_MSG) \
+       /*MSG_DEATH_NOTIF(DEATH_EMPTY,                                          NO_MSG,                                                                 NO_MSG)*/ \
        MSG_DEATH_NOTIF(DEATH_SELF_CUSTOM,                                      INFO_DEATH_SELF_GENERIC,                                CENTER_DEATH_SELF_CUSTOM) \
        MSG_DEATH_NOTIF(DEATH_SELF_GENERIC,                                     INFO_DEATH_SELF_GENERIC,                                CENTER_DEATH_SELF_GENERIC) \
        MSG_DEATH_NOTIF(DEATH_SELF_VOID,                                        INFO_DEATH_SELF_VOID,                                   CENTER_DEATH_SELF_VOID) \
@@ -547,6 +561,21 @@ void Dump_Notifications(float fh, float alsoprint);
        MSG_DEATH_NOTIF(DEATH_MURDER_TOUCHEXPLODE,                      INFO_DEATH_MURDER_TOUCHEXPLODE,                 NO_MSG) \
        MSG_DEATH_NOTIF(DEATH_MURDER_CHEAT,                                     INFO_DEATH_MURDER_CHEAT,                                NO_MSG) \
        MSG_DEATH_NOTIF(DEATH_MURDER_FIRE,                                      INFO_DEATH_MURDER_FIRE,                                 NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_CRUSH,                          INFO_DEATH_MURDER_VH_CRUSH,                             NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_SPID_MINIGUN,           INFO_DEATH_MURDER_VH_SPID_MINIGUN,              NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_SPID_ROCKET,            INFO_DEATH_MURDER_VH_SPID_ROCKET,               NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_SPID_DEATH,                     INFO_DEATH_MURDER_VH_SPID_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_WAKI_GUN,                       INFO_DEATH_MURDER_VH_WAKI_GUN,                  NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_WAKI_ROCKET,            INFO_DEATH_MURDER_VH_WAKI_ROCKET,               NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_WAKI_DEATH,                     INFO_DEATH_MURDER_VH_WAKI_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_RAPT_CANNON,            INFO_DEATH_MURDER_VH_RAPT_CANNON,               NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_RAPT_BOMB,                      INFO_DEATH_MURDER_VH_RAPT_BOMB,                 NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_RAPT_FRAGMENT,          INFO_DEATH_MURDER_VH_RAPT_FRAGMENT,             NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_RAPT_DEATH,                     INFO_DEATH_MURDER_VH_RAPT_DEATH,                NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_BUMB_GUN,                       INFO_DEATH_MURDER_VH_BUMB_GUN,                  NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_BUMB_RAY,                       INFO_DEATH_MURDER_VH_BUMB_RAY,                  NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_BUMB_RAY_HEAL,          INFO_DEATH_MURDER_VH_BUMB_RAY_HEAL,             NO_MSG) \
+       MSG_DEATH_NOTIF(DEATH_MURDER_VH_BUMB_DEATH,                     INFO_DEATH_MURDER_VH_BUMB_DEATH,                NO_MSG) \
        MSG_DEATH_NOTIF(DEATH_MURDER_FRAG,                                                      NO_MSG,                                                 CENTER_DEATH_MURDER_FRAG) \
        MSG_DEATH_NOTIF(DEATH_MURDER_FRAGGED,                                           NO_MSG,                                                 CENTER_DEATH_MURDER_FRAGGED) \
        MSG_DEATH_NOTIF(DEATH_MURDER_TYPEFRAG,                                          NO_MSG,                                                 CENTER_DEATH_MURDER_TYPEFRAG) \
@@ -571,44 +600,92 @@ void Dump_Notifications(float fh, float alsoprint);
 //  Initialization/Create Declarations
 // ====================================
 
+#ifndef MENUQC // Menu doesn't need init
+
 #define NOTIF_FIRST 1
 #define NOTIF_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
 
-#define CHECK_NOTIFICATION_1(net_type,net_name,check_newline,normal,gentle) \
-       if((normal == "") || ((normal == "") && (gentle == ""))) { print(strcat("^1EMPTY NOTIFICATION: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); } \
-       #if check_newline \
-               else \
-               { \
-                       if not(substring(normal, (strlen(normal) - 1), 1) == "\n") { print(strcat("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ", NORMAL string.\n")); } \
-                       if(gentle != "") { if not(substring(gentle, (strlen(gentle) - 1), 1) == "\n") { print(strcat("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ", GENTLE string.\n")); } } \
-               } \
-       #endif
+#define ADD_AUTOCVAR(name) var float autocvar_notification_##name = TRUE;
+#define CHECK_AUTOCVAR(name) if(autocvar_notification_##name)
 
-#define CHECK_NOTIFICATION_2(net_type,net_name,infoname,centername) if not(#infoname || #centername) { print(strcat("^1NOTIFICATION WITH NO SUBCALLS: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); }
-       
 float NOTIF_INFO_COUNT;
 float NOTIF_CENTER_COUNT;
 float NOTIF_WEAPON_COUNT;
 float NOTIF_DEATH_COUNT;
 float NOTIF_CPID_COUNT;
 
+entity msg_info_notifs[NOTIF_MAX];
+entity msg_center_notifs[NOTIF_MAX];
+entity msg_weapon_notifs[NOTIF_MAX];
+entity msg_death_notifs[NOTIF_MAX];
+
+.float nent_broadcast;
+.entity nent_client;
+.float nent_net_type;
+.float nent_net_name;
+.string nent_strings[4];
+.float nent_floats[4];
+
+.string nent_name;
+.float nent_infoname;
+.float nent_centername;
+.float nent_stringcount;
+.float nent_floatcount; 
+.string nent_args;
+.string nent_hudargs;
+.string nent_icon;
+.float nent_cpid;
+.string nent_durcnt;
+.string nent_normal;
+.string nent_gentle;
+
+//     notif.nent_args = strzone(args); \
+//     notif.nent_hudargs = strzone(hudargs); \
+// if(durcnt != "") { notif.nent_durcnt = durcnt; } \
+
+#define CREATE_NOTIF_ENTITY(type,name,infoname,centername,strnum,flnum,args,hudargs,icon,cpid,durcnt,normal,gentle,check_newline,subcalls) \
+       entity notif = spawn(); \
+       msg_##type##_notifs[name - 1] = notif; \
+       notif.classname = "msg_##type##_notification"; \
+       notif.nent_name = strzone(#name); \
+       #if subcalls \
+               #if (infoname == NO_MSG) && (centername == NO_MSG) \
+                       print(sprintf("^1NOTIFICATION WITH NO SUBCALLS: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); \
+               #else \
+                       if(infoname) { notif.nent_infoname = infoname; } \
+                       if(centername) { notif.nent_centername = centername; } \
+               #endif \
+       #else \
+               notif.nent_stringcount = strnum; \
+               notif.nent_floatcount = flnum; \
+               if(icon != "") { notif.nent_icon = strzone(icon); } \
+               if(normal != "") { notif.nent_normal = strzone(normal); } \
+               else { print(sprintf("^1EMPTY NOTIFICATION: ^7net_type = MSG_%s, net_name = %s.\n", strtoupper(#type), #name)); } \
+               if(gentle != "") { notif.nent_gentle = strzone(gentle); } \
+               #if check_newline \
+                       if(normal != "") { if not(substring(normal, (strlen(normal) - 1), 1) == "\n") { print(sprintf("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = MSG_%s, net_name = %s, NORMAL string.\n", strtoupper(#type), #name)); } } \
+                       if(gentle != "") { if not(substring(gentle, (strlen(gentle) - 1), 1) == "\n") { print(sprintf("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = MSG_%s, net_name = %s, GENTLE string.\n", strtoupper(#type), #name)); } } \
+               #else \
+                       if(cpid != NO_MSG) { notif.nent_cpid = cpid; } \
+               #endif \
+       #endif
+
+
 #define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \
-       #ifndef MENUQC \
-               ADD_AUTOCVAR(name) \
-       #endif \
+       ADD_AUTOCVAR(name) \
        float name; \
        void RegisterNotification_##name() \
        { \
                SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
                CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_INFO_COUNT, "notifications") \
-               CHECK_NOTIFICATION_1("MSG_INFO", name, TRUE, normal, gentle) \
+               CREATE_NOTIF_ENTITY(info, name, NO_MSG, NO_MSG, \
+                       strnum, flnum, args, hudargs, icon, NO_MSG, NO_MSG, \
+                       normal, gentle, 1, 0) \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
 #define MSG_CENTER_NOTIF(name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
-       #ifndef MENUQC \
-               ADD_AUTOCVAR(name) \
-       #endif \
+       ADD_AUTOCVAR(name) \
        float name; \
        float cpid; \
        void RegisterNotification_##name() \
@@ -616,33 +693,35 @@ float NOTIF_CPID_COUNT;
                SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
                SET_FIELD_COUNT(cpid, NOTIF_FIRST, NOTIF_CPID_COUNT) \
                CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_CENTER_COUNT, "notifications") \
-               CHECK_NOTIFICATION_1("MSG_CENTER", name, FALSE, normal, gentle) \
+               CREATE_NOTIF_ENTITY(center, name, NO_MSG, NO_MSG, \
+                       strnum, flnum, args, "", "", cpid, durcnt, \
+                       normal, gentle, 0, 0) \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
 #define MSG_WEAPON_NOTIF(name,infoname,centername) \
-       #ifndef MENUQC \
-               ADD_AUTOCVAR(name) \
-       #endif \
+       ADD_AUTOCVAR(name) \
        float name; \
        void RegisterNotification_##name() \
        { \
                SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_WEAPON_COUNT) \
                CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_WEAPON_COUNT, "notifications") \
-               CHECK_NOTIFICATION_2("MSG_WEAPON", name, infoname, centername) \
+               CREATE_NOTIF_ENTITY(weapon, name, infoname, centername, \
+                       NO_MSG, NO_MSG, "", "", "", NO_MSG, NO_MSG, \
+                       "", "", 0, 1) \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
 #define MSG_DEATH_NOTIF(name,infoname,centername) \
-       #ifndef MENUQC \
-               ADD_AUTOCVAR(name) \
-       #endif \
+       ADD_AUTOCVAR(name) \
        float name; \
        void RegisterNotification_##name() \
        { \
                SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_DEATH_COUNT) \
                CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_DEATH_COUNT, "notifications") \
-               CHECK_NOTIFICATION_2("MSG_DEATH", name, infoname, centername) \
+               CREATE_NOTIF_ENTITY(death, name, infoname, centername, \
+                       NO_MSG, NO_MSG, "", "", "", NO_MSG, NO_MSG, \
+                       "", "", 0, 1) \
        } \
        ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
@@ -655,3 +734,7 @@ MSG_DEATH_NOTIFICATIONS
 #undef MSG_CENTER_NOTIF
 #undef MSG_WEAPON_NOTIF
 #undef MSG_DEATH_NOTIF
+
+#undef ADD_AUTOCVAR
+
+#endif // ifndef MENUQC