seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-// MSG_CENTER notifications (count = 239):
+// MSG_CENTER notifications (count = 240):
seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_OBJ_DESTROYED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_CAMPAIGN_MESSAGE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CAMPCHECK "1" "0 = off, 1 = centerprint"
seta notification_CENTER_COINTOSS "1" "0 = off, 1 = centerprint"
seta notification_CENTER_COUNTDOWN_BEGIN "1" "0 = off, 1 = centerprint"
seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
-// Notification counts (total = 846): MSG_ANNCE = 89, MSG_INFO = 334, MSG_CENTER = 239, MSG_MULTI = 156, MSG_CHOICE = 28
+// Notification counts (total = 847): MSG_ANNCE = 89, MSG_INFO = 334, MSG_CENTER = 240, MSG_MULTI = 156, MSG_CHOICE = 28
MSG_CENTER_NOTIF(INSTAGIB_FINDAMMO_FIRST, N_ENABLE, 0, 0, "", CPID_INSTAGIB_FINDAMMO, "1 10", _("^BGGet some ammo or you'll be dead in ^F4^COUNT^BG!"), _("^BGGet some ammo! ^F4^COUNT^BG left!"))
MSG_CENTER_NOTIF(INSTAGIB_LIVES_REMAINING, N_ENABLE, 0, 1, "f1", CPID_Null, "0 0", _("^F2Extra lives remaining: ^K1%s"), "")
+ MSG_CENTER_NOTIF(CAMPAIGN_MESSAGE, N_ENABLE, 1, 1, "f1 s1 join_key", CPID_CAMPAIGN_MESSAGE, "-1 0", strcat(_("Level %s: "), "^BG%s\n^3\n", _("^BGPress ^F2%s^BG to enter the game")), "")
MSG_CENTER_NOTIF(MOTD, N_ENABLE, 1, 0, "s1 join_key", CPID_MOTD, "-1 0", strcat("^BG%s\n^3\n", _("^BGPress ^F2%s^BG to enter the game")), "")
MSG_CENTER_NOTIF(NIX_COUNTDOWN, N_ENABLE, 0, 2, "item_wepname", CPID_NIX, "1 f2", _("^F2^COUNT^BG until weapon change...\nNext weapon: ^F1%s"), "")
CASE(CPID, MISSING_TEAMS)
CASE(CPID, MISSING_PLAYERS)
CASE(CPID, INSTAGIB_FINDAMMO)
+ CASE(CPID, CAMPAIGN_MESSAGE)
CASE(CPID, MOTD)
CASE(CPID, NIX)
CASE(CPID, ONSLAUGHT)
s = campaign_shortdesc[i]; // fteqcc sucks
else
s = "???";
- s = draw_TextShortenToWidth(sprintf(_("Level %d: %s"), i+1, s), me.columnNameSize, 0, me.realFontSize);
+ // NOTE the following string is equal to the one used in the campaign level notification
+ // (CAMPAIGN_MESSAGE) to avoid adding another duplicate string to translate
+ s = draw_TextShortenToWidth(strcat(sprintf(_("Level %s: "), itos(i+1)), s), me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, theColor, theAlpha, 0);
if(i <= me.campaignIndex)
return 0;
}
+int Campaign_GetLevelNum()
+{
+ return campaign_level + 1;
+}
+
+string Campaign_GetMessage()
+{
+ return strcat(campaign_shortdesc[0], "\n^3\n", campaign_longdesc[0]);
+}
+
void CampaignPreInit()
{
float baseskill;
- string title;
campaign_level = autocvar__campaign_index;
campaign_name = strzone(autocvar__campaign_name);
campaign_index_var = strzone(strcat("g_campaign", campaign_name, "_index"));
if(Campaign_Invalid())
return;
-
- title = campaign_shortdesc[0];
- title = strzone(strcat("Level ", ftos(campaign_level + 1), ": ", title));
- campaign_message = strzone(strcat(title, "\n^3\n", campaign_longdesc[0]));
- strunzone(title);
}
void CampaignPostInit()
CampaignSetup(campaign_won);
CampaignFile_Unload();
- strunzone(campaign_message);
strunzone(campaign_index_var);
strunzone(campaign_name);
campaign_name = "";
// this must be included BEFORE campaign_common.h to make this a memory saving
#define CAMPAIGN_MAX_ENTRIES 2
-string campaign_message;
+int Campaign_GetLevelNum();
+string Campaign_GetMessage();
void CampaignPreInit();
void CampaignPostInit();
if (autocvar_g_campaign) {
if ((IS_PLAYER(this) && PHYS_INPUT_BUTTON_INFO(this)) || (!IS_PLAYER(this))) {
CS(this).motd_actived_time = time;
- Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MOTD, campaign_message);
+ Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_CAMPAIGN_MESSAGE, Campaign_GetMessage(), Campaign_GetLevelNum());
}
} else {
if (PHYS_INPUT_BUTTON_INFO(this)) {
CS(this).motd_actived_time = time;
else if ((time - CS(this).motd_actived_time > 2) && IS_PLAYER(this)) { // hide it some seconds after BUTTON_INFO has been released
CS(this).motd_actived_time = 0;
- Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_MOTD);
+ Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_CAMPAIGN_MESSAGE);
}
} else {
if (PHYS_INPUT_BUTTON_INFO(this))
{
// instantly hide MOTD
CS(this).motd_actived_time = 0;
- Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_MOTD);
+ if (autocvar_g_campaign)
+ Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_CAMPAIGN_MESSAGE);
+ else
+ Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_MOTD);
}
else if (IS_PLAYER(this) || IS_SPEC(this))
{