by Roody_Yogurt » Sun Sep 02, 2012 8:36 pm
If you notice, EndGame has this line:
Code: Select all
Message(&EndGame, 1,end_type)
"end_type" is the endflag value you used to call EndGame (example: endflag = 3)
Because of this, you can replace the EndGame message with something like this:
Code: Select all
replace NewMessages(r, num, a, b)
{
select r
case &EndGame
{
select num
case 1
{
print "\nThe game has ended. Do you want to (R)ESTART,
R(E)STORE a saved game, ";
#ifclear NO_UNDO
if not UNDO_OFF ! if not otherwise overridden
print "(U)NDO your last turn, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT? ";
}
case 2
{
print "Enter (R)ESTART, R(E)STORE, ";
#ifclear NO_UNDO
if not UNDO_OFF
print "(U)NDO, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT: ";
}
}
case else : return false
return true ! this line is only reached if we replaced something
}
where the applicable text only prints when it's the right endflag.
If you notice, EndGame has this line:
[code]Message(&EndGame, 1,end_type)[/code]
"end_type" is the endflag value you used to call EndGame (example: endflag = 3)
Because of this, you can replace the EndGame message with something like this:
[code]replace NewMessages(r, num, a, b)
{
select r
case &EndGame
{
select num
case 1
{
print "\nThe game has ended. Do you want to (R)ESTART,
R(E)STORE a saved game, ";
#ifclear NO_UNDO
if not UNDO_OFF ! if not otherwise overridden
print "(U)NDO your last turn, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT? ";
}
case 2
{
print "Enter (R)ESTART, R(E)STORE, ";
#ifclear NO_UNDO
if not UNDO_OFF
print "(U)NDO, ";
#endif
if a = 3 ! ( a = end_flag)
print "(A)musing notes, ";
print "or (Q)UIT: ";
}
}
case else : return false
return true ! this line is only reached if we replaced something
}
[/code]
where the applicable text only prints when it's the right endflag.