Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
添加一处翻译
Browse files Browse the repository at this point in the history
upgrade_disallow.cpp修改编码格式为UTF-8
读取翻译文件更改为tf_schinese.txt
  • Loading branch information
TYHH10 authored and TYHH10 committed Jul 10, 2024
1 parent ecafeac commit 157abcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/mod/item/item_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void GenerateItemNames() {
kvin->UsesEscapeSequences(true);

CUtlBuffer file( 0, 0, CUtlBuffer::TEXT_BUFFER );
filesystem->ReadFile("resource/tf_english.txt", "GAME", file);
filesystem->ReadFile("resource/tf_schinese.txt", "GAME", file);

char buf[4000000];
_V_UCS2ToUTF8( (const ucs2*) (file.String() + 2), buf, 4000000 );
Expand Down Expand Up @@ -161,7 +161,7 @@ void GenerateItemNames() {
char path_sm[PLATFORM_MAX_PATH];
g_pSM->BuildPath(Path_SM,path_sm,sizeof(path_sm),"data/sig_item_data3.dat");
CUtlBuffer fileout( 0, 0, 0 );
fileout.PutInt64(filesystem->GetFileTime("resource/tf_english.txt", "GAME"));
fileout.PutInt64(filesystem->GetFileTime("resource/tf_schinese.txt", "GAME"));

fileout.PutInt(g_Itemnames.size());
fileout.PutInt(g_AttribnamesShort.size());
Expand Down Expand Up @@ -192,7 +192,7 @@ void LoadItemNames() {
char path_sm[PLATFORM_MAX_PATH];
g_pSM->BuildPath(Path_SM,path_sm,sizeof(path_sm),"data/sig_item_data3.dat");

long time = filesystem->GetFileTime("resource/tf_english.txt", "GAME");
long time = filesystem->GetFileTime("resource/tf_schinese.txt", "GAME");
CUtlBuffer file( 0, 0, 0 );

if (filesystem->ReadFile(path_sm, "GAME", file)) {
Expand Down
8 changes: 4 additions & 4 deletions src/mod/mvm/upgrade_disallow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ namespace Mod::MvM::Upgrade_Disallow
const char *upgradename = upgrade->GetUpgradeAttributeName(upgradeslot);

if (!cvar_explode_on_ignite.GetBool() && strcmp(upgradename,"explode_on_ignite") == 0){
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "该任务禁用了油桶爆炸升级");
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "该任务禁用了油桶爆炸升级");
return;
}
else if (!cvar_medigun_shield.GetBool() && strcmp(upgradename,"generate rage on heal") == 0){
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "该任务禁用了能量护盾升级");
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "该任务禁用了能量护盾升级");
return;
}
else if (!cvar_burn_time.GetBool() && strcmp(upgradename,"weapon burn time increased") == 0){
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "后续燃烧时长升级有BUG,请换一个升级");
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "后续燃烧时长升级有BUG,请换一个升级");
return;
}
else if (strcmp(upgradename,"engy sentry fire rate increased") == 0 &&
Expand All @@ -71,7 +71,7 @@ namespace Mod::MvM::Upgrade_Disallow

DevMsg("upgrade %f\n",upgrade);
if (upgrade >= 0.79f && upgrade <= 0.81f) {
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "步哨射速升级的第3点有BUG,请换一个升级");
gamehelpers->TextMsg(ENTINDEX(player), TEXTMSG_DEST_CENTER, "步哨射速升级的第3点有BUG,请换一个升级");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mod/pop/popmgr_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6214,7 +6214,7 @@ namespace Mod::Pop::PopMgr_Extensions
SpewOutputFunc(LocalSpewOutputFunc);

if (parse_warning) {
PrintToChatAll("\x07""ffb2b2""It is possible that a parsing error had occured. Check console for details\n");
PrintToChatAll("\x07""ffb2b2"">任务似乎出错了.检查控制台以获取更多信息.\n");
}

pop_parse_successful = ret;
Expand Down

0 comments on commit 157abcd

Please sign in to comment.