- localized some user-facing texts that were still string literals.
This commit is contained in:
parent
e07d413095
commit
cda248df66
7 changed files with 95 additions and 67 deletions
|
|
@ -64,7 +64,7 @@ void cht_DoMDK(player_t *player, const char *mod)
|
|||
{
|
||||
if (player->mo == NULL)
|
||||
{
|
||||
Printf("What do you want to kill outside of a game?\n");
|
||||
Printf("%s\n", GStrings("TXT_WHAT_KILL"));
|
||||
}
|
||||
else if (!deathmatch)
|
||||
{
|
||||
|
|
@ -94,7 +94,6 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
AActor *item;
|
||||
FString smsg;
|
||||
const char *msg = "";
|
||||
char msgbuild[32];
|
||||
int i;
|
||||
|
||||
// No cheating when not having a pawn attached.
|
||||
|
|
@ -204,25 +203,25 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
case CHT_NOTARGET:
|
||||
player->cheats ^= CF_NOTARGET;
|
||||
if (player->cheats & CF_NOTARGET)
|
||||
msg = "notarget ON";
|
||||
msg = GStrings("TXT_NOTARGET_ON");
|
||||
else
|
||||
msg = "notarget OFF";
|
||||
msg = GStrings("TXT_NOTARGET_OFF");
|
||||
break;
|
||||
|
||||
case CHT_ANUBIS:
|
||||
player->cheats ^= CF_FRIGHTENING;
|
||||
if (player->cheats & CF_FRIGHTENING)
|
||||
msg = "\"Quake with fear!\"";
|
||||
msg = GStrings("TXT_ANUBIS_ON");
|
||||
else
|
||||
msg = "No more ogre armor";
|
||||
msg = GStrings("TXT_ANUBIS_OFF");
|
||||
break;
|
||||
|
||||
case CHT_CHASECAM:
|
||||
player->cheats ^= CF_CHASECAM;
|
||||
if (player->cheats & CF_CHASECAM)
|
||||
msg = "chasecam ON";
|
||||
msg = GStrings("TXT_CHASECAM_ON");
|
||||
else
|
||||
msg = "chasecam OFF";
|
||||
msg = GStrings("TXT_CHASECAM_OFF");
|
||||
R_ResetViewInterpolation ();
|
||||
break;
|
||||
|
||||
|
|
@ -326,10 +325,18 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
int killcount = primaryLevel->Massacre (cheat == CHT_MASSACRE2);
|
||||
// killough 3/22/98: make more intelligent about plural
|
||||
// Ty 03/27/98 - string(s) *not* externalized
|
||||
mysnprintf (msgbuild, countof(msgbuild), "%d %s%s Killed", killcount,
|
||||
cheat==CHT_MASSACRE2 ? "Baddie" : "Monster", killcount==1 ? "" : "s");
|
||||
msg = msgbuild;
|
||||
if (killcount == 1)
|
||||
{
|
||||
msg = GStrings(cheat == CHT_MASSACRE? "TXT_MONSTER_KILLED" : "TXT_BADDIE_KILLED");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Note: Do not use the language string directly as a format template!
|
||||
smsg = GStrings(cheat == CHT_MASSACRE? "TXT_MONSTERS_KILLED" : "TXT_BADDIES_KILLED");
|
||||
FStringf countstr("%d", killcount);
|
||||
smsg.Substitute("%d", countstr);
|
||||
msg = smsg.GetChars();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -352,64 +359,64 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
if (player->mo->IsKindOf("PlayerChunk"))
|
||||
{
|
||||
Printf("Unable to resurrect. Player is no longer connected to its body.\n");
|
||||
Printf("%s\n", GStrings("TXT_NO_RESURRECT"));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->Resurrect();
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEA:
|
||||
cht_Give (player, "ArtiInvulnerability");
|
||||
msg = "Valador's Ring of Invunerability";
|
||||
msg = GStrings("TAG_ARTIINVULNERABILITY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEB:
|
||||
cht_Give (player, "ArtiInvisibility");
|
||||
msg = "Shadowsphere";
|
||||
msg = GStrings("TAG_ARTIINVISIBILITY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEC:
|
||||
cht_Give (player, "ArtiHealth");
|
||||
msg = "Quartz Flask";
|
||||
msg = GStrings("TAG_ARTIHEALTH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIED:
|
||||
cht_Give (player, "ArtiSuperHealth");
|
||||
msg = "Mystic Urn";
|
||||
msg = GStrings("TAG_ARTISUPERHEALTH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEE:
|
||||
cht_Give (player, "ArtiTomeOfPower");
|
||||
msg = "Tyketto's Tome of Power";
|
||||
msg = GStrings("TAG_ARTITOMEOFPOWER");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEF:
|
||||
cht_Give (player, "ArtiTorch");
|
||||
msg = "Torch";
|
||||
msg = GStrings("TAG_ARTITORCH");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEG:
|
||||
cht_Give (player, "ArtiTimeBomb");
|
||||
msg = "Delmintalintar's Time Bomb of the Ancients";
|
||||
msg = GStrings("TAG_ARTIFIREBOMB");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEH:
|
||||
cht_Give (player, "ArtiEgg");
|
||||
msg = "Torpol's Morph Ovum";
|
||||
msg = GStrings("TAG_ARTIEGG");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEI:
|
||||
cht_Give (player, "ArtiFly");
|
||||
msg = "Inhilicon's Wings of Wrath";
|
||||
msg = GStrings("TAG_ARTIFLY");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEJ:
|
||||
cht_Give (player, "ArtiTeleport");
|
||||
msg = "Darchala's Chaos Device";
|
||||
msg = GStrings("TAG_ARTITELEPORT");
|
||||
break;
|
||||
|
||||
case CHT_GIMMIEZ:
|
||||
|
|
@ -417,7 +424,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
cht_Give (player, "artifacts");
|
||||
}
|
||||
msg = "All artifacts!";
|
||||
msg = GStrings("TAG_ALL_ARTIFACTS");
|
||||
break;
|
||||
|
||||
case CHT_TAKEWEAPS:
|
||||
|
|
@ -444,9 +451,10 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_MDK:
|
||||
if (player->mo == NULL)
|
||||
if (player->mo == nullptr)
|
||||
{
|
||||
Printf ("What do you want to kill outside of a game?\n");
|
||||
Printf ("%s\n", GStrings("TXT_WHAT_KILL"));
|
||||
return;
|
||||
}
|
||||
else if (!deathmatch)
|
||||
{
|
||||
|
|
@ -512,7 +520,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
|
||||
case CHT_CLEARFROZENPROPS:
|
||||
player->cheats &= ~(CF_FROZEN|CF_TOTALLYFROZEN);
|
||||
msg = "Frozen player properties turned off";
|
||||
msg = GStrings("TXT_NOT_FROZEN");
|
||||
break;
|
||||
|
||||
case CHT_FREEZE:
|
||||
|
|
@ -528,13 +536,17 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!*msg) // [SO] Don't print blank lines!
|
||||
if (!msg || !*msg) // [SO] Don't print blank lines!
|
||||
return;
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
Printf ("%s\n", msg);
|
||||
else if (cheat != CHT_CHASECAM)
|
||||
Printf ("%s cheats: %s\n", player->userinfo.GetName(), msg);
|
||||
{
|
||||
FString message = GStrings("TXT_X_CHEATS");
|
||||
message.Substitute("%s", player->userinfo.GetName());
|
||||
Printf("%s: %s\n", message.GetChars(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
FString cht_Morph(player_t *player, PClassActor *morphclass, bool quickundo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue