1 // ==========================
2 // Balance Config Generator
3 // ==========================
5 void Dump_Weapon_Settings(float fh, float alsoprint)
8 for(i = WEP_FIRST; i <= WEP_LAST; ++i)
10 WEP_ACTION(i, WR_CONFIG)
14 #define WEP_BAL_WRITE(a) { \
16 if(alsoprint) { print(a); } }
17 #define WEP_BAL_WRITE_ENTITY(description) { \
20 "seta notification_%s \"%d\" \"%s\"\n", \
21 e.nent_name, e.nent_default, description \
23 WEP_BAL_WRITE(notif_msg) }
24 #define WEP_BAL_WRITE_HARDCODED(cvar,default,description) { \
27 "seta notification_%s \"%s\" \"%s\"\n", \
28 cvar, default, description \
30 WEP_BAL_WRITE(notif_msg) }
36 NOTIF_WRITE(sprintf("\n// MSG_ANNCE notifications (count = %d):\n", NOTIF_ANNCE_COUNT));
37 for(i = 1; i <= NOTIF_ANNCE_COUNT; ++i)
39 e = Get_Notif_Ent(MSG_ANNCE, i);
40 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
43 "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
47 NOTIF_WRITE(sprintf("\n// MSG_INFO notifications (count = %d):\n", NOTIF_INFO_COUNT));
48 for(i = 1; i <= NOTIF_INFO_COUNT; ++i)
50 e = Get_Notif_Ent(MSG_INFO, i);
51 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
54 "Notification control cvar: 0 = off, 1 = print to console, "
55 "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
59 NOTIF_WRITE(sprintf("\n// MSG_CENTER notifications (count = %d):\n", NOTIF_CENTER_COUNT));
60 for(i = 1; i <= NOTIF_CENTER_COUNT; ++i)
62 e = Get_Notif_Ent(MSG_CENTER, i);
63 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
66 "Notification control cvar: 0 = off, 1 = centerprint"
70 NOTIF_WRITE(sprintf("\n// MSG_MULTI notifications (count = %d):\n", NOTIF_MULTI_COUNT));
71 for(i = 1; i <= NOTIF_MULTI_COUNT; ++i)
73 e = Get_Notif_Ent(MSG_MULTI, i);
74 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
77 "Notification control cvar: 0 = off, 1 = trigger subcalls"
81 // edit these to match whichever cvars are used for specific notification options
82 NOTIF_WRITE("\n// HARD CODED notification variables:\n");
84 NOTIF_WRITE_HARDCODED(
85 "allow_chatboxprint", "1",
86 "Allow notifications to be printed to chat box by setting notification cvar to 2 "
87 "(You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
92 "\n// Notification counts (total = %d): ",
93 "MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d\n"
108 #undef NOTIF_WRITE_HARDCODED
109 #undef NOTIF_WRITE_ENTITY