From 9c5b613ed3fb5002db039ec1a9b0067311e20ce1 Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Mon, 14 Feb 2011 19:14:06 +0000 Subject: * Small enhancements to tutorial text, including telling players to sell their old weapon first at the armoury --- src/cgame/cg_draw.c | 6 +++--- src/cgame/cg_tutorial.c | 36 +++++++++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 12 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index d4d7d55a..da92e8ab 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -716,17 +716,17 @@ static void CG_DrawUsableBuildable( rectDef_t *rect, qhandle_t shader, vec4_t co ( !BG_Weapon( cg.snap->ps.weapon )->usesEnergy || BG_Weapon( cg.snap->ps.weapon )->infiniteAmmo ) ) { - cg.nearUsableBuildable = qfalse; + cg.nearUsableBuildable = BA_NONE; return; } trap_R_SetColor( color ); CG_DrawPic( rect->x, rect->y, rect->w, rect->h, shader ); trap_R_SetColor( NULL ); - cg.nearUsableBuildable = qtrue; + cg.nearUsableBuildable = es->modelindex; } else - cg.nearUsableBuildable = qfalse; + cg.nearUsableBuildable = BA_NONE; } diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 21db7774..8c3da0ca 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -204,13 +204,13 @@ static void CG_AlienBuilderText( char *text, playerState_t *ps ) if( es->eFlags & EF_B_MARKED ) { Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to unmark this structure\n", + va( "Press %s to unmark this structure for replacement\n", CG_KeyNameForCommand( "deconstruct" ) ) ); } else { Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to mark this structure\n", + va( "Press %s to mark this structure for replacement\n", CG_KeyNameForCommand( "deconstruct" ) ) ); } } @@ -436,7 +436,7 @@ static void CG_HumanText( char *text, playerState_t *ps ) case WP_MASS_DRIVER: case WP_LUCIFER_CANNON: Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Find a Reactor or Repeater and press %s for more ammo\n", + va( "Find an Armoury, Reactor, or Repeater and press %s for more ammo\n", CG_KeyNameForCommand( "buy ammo" ) ) ); break; @@ -527,19 +527,37 @@ static void CG_HumanText( char *text, playerState_t *ps ) if( ps->stats[ STAT_STAMINA ] <= STAMINA_BLACKOUT_LEVEL ) { Q_strcat( text, MAX_TUTORIAL_TEXT, - "You are blacking out. Stop sprinting to recover stamina.\n" ); + "You are blacking out. Stop sprinting to recover stamina\n" ); } else if( ps->stats[ STAT_STAMINA ] <= STAMINA_SLOW_LEVEL ) { Q_strcat( text, MAX_TUTORIAL_TEXT, - "Your stamina is low. Stop sprinting to recover.\n" ); + "Your stamina is low. Stop sprinting to recover\n" ); } - if( cg.nearUsableBuildable ) + switch( cg.nearUsableBuildable ) { - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to use this structure\n", - CG_KeyNameForCommand( "+button7" ) ) ); + case BA_H_ARMOURY: + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s to buy equipment upgrades at the %s. Sell your old weapon first!\n", + CG_KeyNameForCommand( "+button7" ), + BG_Buildable( cg.nearUsableBuildable )->humanName ) ); + break; + case BA_H_REPEATER: + case BA_H_REACTOR: + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s to refill your energy weapon's ammo at the %s\n", + CG_KeyNameForCommand( "+button7" ), + BG_Buildable( cg.nearUsableBuildable )->humanName ) ); + break; + case BA_NONE: + break; + default: + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s to use the %s\n", + CG_KeyNameForCommand( "+button7" ), + BG_Buildable( cg.nearUsableBuildable )->humanName ) ); + break; } Q_strcat( text, MAX_TUTORIAL_TEXT, -- cgit