1 // ==========================
2 // Balance Config Generator
3 // ==========================
5 void Dump_Weapon_Settings(void)
8 for(i = WEP_FIRST; i <= WEP_LAST; ++i)
10 WEP_CONFIG_WRITE(sprintf("// {{{ #%d: %s\n", i, W_Name(i)))
11 WEP_ACTION(i, WR_CONFIG);
12 WEP_CONFIG_WRITE("// }}}\n")
16 #define WEP_BAL_WRITE(a) { \
18 if(alsoprint) { print(a); } }
19 #define WEP_BAL_WRITE_ENTITY(description) { \
22 "seta notification_%s \"%d\" \"%s\"\n", \
23 e.nent_name, e.nent_default, description \
25 WEP_BAL_WRITE(notif_msg) }
26 #define WEP_BAL_WRITE_HARDCODED(cvar,default,description) { \
29 "seta notification_%s \"%s\" \"%s\"\n", \
30 cvar, default, description \
32 WEP_BAL_WRITE(notif_msg) }
38 NOTIF_WRITE(sprintf("\n// MSG_ANNCE notifications (count = %d):\n", NOTIF_ANNCE_COUNT));
39 for(i = 1; i <= NOTIF_ANNCE_COUNT; ++i)
41 e = Get_Notif_Ent(MSG_ANNCE, i);
42 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
45 "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
49 NOTIF_WRITE(sprintf("\n// MSG_INFO notifications (count = %d):\n", NOTIF_INFO_COUNT));
50 for(i = 1; i <= NOTIF_INFO_COUNT; ++i)
52 e = Get_Notif_Ent(MSG_INFO, i);
53 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
56 "Notification control cvar: 0 = off, 1 = print to console, "
57 "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
61 NOTIF_WRITE(sprintf("\n// MSG_CENTER notifications (count = %d):\n", NOTIF_CENTER_COUNT));
62 for(i = 1; i <= NOTIF_CENTER_COUNT; ++i)
64 e = Get_Notif_Ent(MSG_CENTER, i);
65 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
68 "Notification control cvar: 0 = off, 1 = centerprint"
72 NOTIF_WRITE(sprintf("\n// MSG_MULTI notifications (count = %d):\n", NOTIF_MULTI_COUNT));
73 for(i = 1; i <= NOTIF_MULTI_COUNT; ++i)
75 e = Get_Notif_Ent(MSG_MULTI, i);
76 if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
79 "Notification control cvar: 0 = off, 1 = trigger subcalls"
83 // edit these to match whichever cvars are used for specific notification options
84 NOTIF_WRITE("\n// HARD CODED notification variables:\n");
86 NOTIF_WRITE_HARDCODED(
87 "allow_chatboxprint", "1",
88 "Allow notifications to be printed to chat box by setting notification cvar to 2 "
89 "(You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
94 "\n// Notification counts (total = %d): ",
95 "MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d\n"
110 #undef NOTIF_WRITE_HARDCODED
111 #undef NOTIF_WRITE_ENTITY