mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
- merge duplicate motd printing code, and make it more flexible while I'm at it
- the "motd" infokey is now appended to the motd if it exists (including a seperator) - added a "disable stuffcmd" item to TODO
This commit is contained in:
parent
7498c71ee5
commit
3afaf1f98e
4 changed files with 47 additions and 6 deletions
1
TODO
1
TODO
|
@ -13,3 +13,4 @@ X move from *preqcc to cpp
|
||||||
o add more variety to tinkering
|
o add more variety to tinkering
|
||||||
o add a way to edit the respawn ammo entities
|
o add a way to edit the respawn ammo entities
|
||||||
o add localinfo string for bottom half of the MOTD
|
o add localinfo string for bottom half of the MOTD
|
||||||
|
o add a define to disable abusive admin commands (eg stuffcmd)
|
||||||
|
|
3
menu.qc
3
menu.qc
|
@ -37,6 +37,7 @@ void() lvl2_sentry_stand;
|
||||||
void() lvl3_sentry_stand;
|
void() lvl3_sentry_stand;
|
||||||
float (float tno) TeamFortress_TeamGetNoPlayers;
|
float (float tno) TeamFortress_TeamGetNoPlayers;
|
||||||
float(float myteam) HasFlag;
|
float(float myteam) HasFlag;
|
||||||
|
void() PrintMOTD;
|
||||||
|
|
||||||
/* WK void(float menu_no) DisplayMenu; */
|
/* WK void(float menu_no) DisplayMenu; */
|
||||||
// Assorted menus
|
// Assorted menus
|
||||||
|
@ -786,7 +787,7 @@ void(float inp) Menu_Input =
|
||||||
|
|
||||||
void() Menu_Intro =
|
void() Menu_Intro =
|
||||||
{
|
{
|
||||||
CenterPrint2(self, MSG_INTRO, MSG_INTRO2);
|
PrintMOTD ();
|
||||||
};
|
};
|
||||||
|
|
||||||
void() Menu_ClassHelp =
|
void() Menu_ClassHelp =
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// This file contains defines for some of the messages
|
// This file contains defines for some of the messages
|
||||||
#define MSG_INTRO "\nWelcome to ÐÒÏÚÁà CustomÔÆ\na Quake ÔÆ MOD by ShakaUVM\nwww®telefragged®com¯shaka\n\n<>žžžžžžžžžžžžžžžžžžžžžžžžžžŸ\n\n"
|
#define MSG_INTRO1 "Welcome to ÐÒÏÚÁÃ CustomÔÆ\na Quake ÔÆ MOD by ShakaUVM\nwww®telefragged®com¯shaka"
|
||||||
#define MSG_INTRO2 "Based on the aussie ver by SB-1\nModified version by Clan Prozac\n\n<>žžžžžžžžžžžžžžžžžžžžžžžžžžŸ\n\nGet any files needed at:\n\nhttp:¯¯quake®prozac®net¯"
|
#define MSG_INTRO2 "Based on the aussie ver by SB-1\nModified version by Clan Prozac"
|
||||||
|
//#define MSG_INTRO3 "Get any files needed at:\n\nhttp:\^/\^/quake\^.prozac\^.net\^/"
|
||||||
|
#define MSG_INTROBAR "\n\n<>žžžžžžžžžžžžžžžžžžžžžžžžžžŸ\n\n"
|
||||||
//, aka óC”’’’
|
//, aka óC”’’’
|
||||||
//#define MSG_CUTFVERSION "CustomÔÆ version ö3®2®OfN"
|
//#define MSG_CUTFVERSION "CustomÔÆ version ö3®2®OfN"
|
||||||
#define MSG_CUTFVERSION "ÐÒÏÚÁÃ CustomÔÆ ö3®2®OfN4"
|
#define MSG_CUTFVERSION "ÐÒÏÚÁÃ CustomÔÆ ö3®2®OfN4"
|
||||||
|
|
43
tforthlp.qc
43
tforthlp.qc
|
@ -37,9 +37,7 @@ void() TeamFortress_MOTD =
|
||||||
if (self.motd <= MOTD_FINISHED - 2)
|
if (self.motd <= MOTD_FINISHED - 2)
|
||||||
{
|
{
|
||||||
if (self.show_hostile < time) {
|
if (self.show_hostile < time) {
|
||||||
//local string CP_MOTD;
|
PrintMOTD ();
|
||||||
//CP_MOTD = GetProzacMOTD(self.motd);
|
|
||||||
CenterPrint2(self,MSG_INTRO,MSG_INTRO2);//,CP_MOTD);
|
|
||||||
self.show_hostile = time + MOTD_REFRESHRATE; //was 1 //.5?
|
self.show_hostile = time + MOTD_REFRESHRATE; //was 1 //.5?
|
||||||
}
|
}
|
||||||
self.menu_count = MENU_REFRESH_RATE;
|
self.menu_count = MENU_REFRESH_RATE;
|
||||||
|
@ -117,6 +115,45 @@ void() TeamFortress_MOTD =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef MSG_INTRO1
|
||||||
|
# define MSG_INTRO1 ""
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTRO2
|
||||||
|
# define MSG_INTRO2 ""
|
||||||
|
#endif
|
||||||
|
#ifndef MSG_INTRO3
|
||||||
|
# define MSG_INTRO3 ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void() PrintMOTD =
|
||||||
|
{
|
||||||
|
local string intro = "";
|
||||||
|
local string infostring;
|
||||||
|
|
||||||
|
if (MSG_INTRO1 != "")
|
||||||
|
intro = intro + MSG_INTRO1;
|
||||||
|
if (MSG_INTRO2 != "") {
|
||||||
|
if (intro != "")
|
||||||
|
intro = intro + MSG_INTROBAR;
|
||||||
|
intro = intro + MSG_INTRO2;
|
||||||
|
}
|
||||||
|
if (MSG_INTRO3 != "") {
|
||||||
|
if (intro != "")
|
||||||
|
intro = intro + MSG_INTROBAR;
|
||||||
|
intro = intro + MSG_INTRO3;
|
||||||
|
}
|
||||||
|
infostring = infokey (world, "motd");
|
||||||
|
if (infostring != "") {
|
||||||
|
if (intro != "")
|
||||||
|
intro = intro + MSG_INTROBAR;
|
||||||
|
intro = intro + infostring;
|
||||||
|
}
|
||||||
|
|
||||||
|
intro = "\n\n" + intro; // prepend a newline, to make it center better :/
|
||||||
|
|
||||||
|
CenterPrint(self, intro);
|
||||||
|
};
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Help displayed when someone types the alias "maphelp"
|
// Help displayed when someone types the alias "maphelp"
|
||||||
void() TeamFortress_HelpMap =
|
void() TeamFortress_HelpMap =
|
||||||
|
|
Loading…
Reference in a new issue