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
  • Loading branch information
TYHH10 authored and TYHH10 committed Jul 9, 2024
1 parent 1b79067 commit aaf1e32
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions src/mod/attr/custom_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7420,7 +7420,7 @@ namespace Mod::Attr::Custom_Attributes
bool IsCustomViewmodelAllowed(CTFPlayer *player) {
if (players_viewmodel_disallowed[player->entindex()]) {
if (!players_viewmodel_informed_about_disallowed[player->entindex()]) {
PrintToChat("Custom hand models disabled. Type !defaulthands to enable\n", player);
PrintToChat("自定义手部模型已禁用. 输入!defaulthands来启用\n", player);
players_viewmodel_informed_about_disallowed[player->entindex()] = true;
}
return false;
Expand Down Expand Up @@ -8331,7 +8331,7 @@ namespace Mod::Attr::Custom_Attributes
if (item_def != nullptr)
format_str.insert(0, CFmtStr("\n%s:\n\n", GetItemNameForDisplay(item_def)));
else
format_str.insert(0, "\nCharacter Attributes:\n\n");
format_str.insert(0, "\n人物属:\n\n");

added_item_name = true;
}
Expand Down
34 changes: 17 additions & 17 deletions src/mod/item/item_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ extern std::map<int, std::string> g_AttribnamesShort;
static const char *loadoutStrings[] =
{
// Weapons & Equipment
"Primary", // LOADOUT_POSITION_PRIMARY = 0,
"Secondary", // LOADOUT_POSITION_SECONDARY,
"Melee", // LOADOUT_POSITION_MELEE,
"翋挕", // LOADOUT_POSITION_PRIMARY = 0,
"萵挕", // LOADOUT_POSITION_SECONDARY,
"輪桵挕", // LOADOUT_POSITION_MELEE,
"Utility", // LOADOUT_POSITION_UTILITY,
"Building", // LOADOUT_POSITION_BUILDING,
"膘耟", // LOADOUT_POSITION_BUILDING,
"PDA", // LOADOUT_POSITION_PDA,
"PDA 2", // LOADOUT_POSITION_PDA2,
"PDA 2", // LOADOUT_POSITION_PDA2,

// Wearables
"Head", // LOADOUT_POSITION_HEAD,
"Misc", // LOADOUT_POSITION_MISC,
"Action", // LOADOUT_POSITION_ACTION,
"Misc 2", // LOADOUT_POSITION_MISC2
"芛窒庉", // LOADOUT_POSITION_HEAD,
"旯极庉1", // LOADOUT_POSITION_MISC,
"雄釬", // LOADOUT_POSITION_ACTION,
"旯极庉2", // LOADOUT_POSITION_MISC2

"Taunt 1", // LOADOUT_POSITION_TAUNT
"Taunt 2", // LOADOUT_POSITION_TAUNT2
"Taunt 3", // LOADOUT_POSITION_TAUNT3
"Taunt 4", // LOADOUT_POSITION_TAUNT4
"Taunt 5", // LOADOUT_POSITION_TAUNT5
"Taunt 6", // LOADOUT_POSITION_TAUNT6
"Taunt 7", // LOADOUT_POSITION_TAUNT7
"Taunt 8", // LOADOUT_POSITION_TAUNT8
"1瘍陸當", // LOADOUT_POSITION_TAUNT
"2瘍陸當", // LOADOUT_POSITION_TAUNT2
"3瘍陸當", // LOADOUT_POSITION_TAUNT3
"4瘍陸當", // LOADOUT_POSITION_TAUNT4
"5瘍陸當", // LOADOUT_POSITION_TAUNT5
"6瘍陸當", // LOADOUT_POSITION_TAUNT6
"7瘍陸當", // LOADOUT_POSITION_TAUNT7
"8瘍陸當", // LOADOUT_POSITION_TAUNT8
};

static int GetSlotFromString(const char *string) {
Expand Down
24 changes: 12 additions & 12 deletions src/mod/mvm/extended_upgrades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ namespace Mod::MvM::Extended_Upgrades
void *menu = nullptr;
if (menus->GetDefaultStyle()->GetClientMenu(ENTINDEX(player), &menu) == MenuSource_BaseMenu && menu != nullptr) {
auto title = ((IBaseMenu *)menu)->GetDefaultTitle();
return title != nullptr && (FStrEq(title, "Player Upgrades") || FStrEq(title, "Extended Upgrades Menu") || StringStartsWith(title, "Upgrades for"));
return title != nullptr && (FStrEq(title, "�������") || FStrEq(title, "Extended Upgrades Menu") || StringStartsWith(title, "Upgrades for"));
/*auto handler = ((IBaseMenu *)menu)->GetHandler();
if (handler != nullptr && (dynamic_cast<SelectUpgradeWeaponHandler *>(handler) != nullptr || dynamic_cast<SelectUpgradeListHandler *>(handler) != nullptr)) {
return true;
Expand Down Expand Up @@ -1182,12 +1182,12 @@ namespace Mod::MvM::Extended_Upgrades

if (enabled) {

char text[128];
char text[2048];
if (upgrade->increment != 0 && max_step < 100000 ) {
snprintf(text, 128, "%s (%d/%d) $%d", upgrade->name.c_str(), cur_step, max_step, upgrade->cost);
snprintf(text, 2048, "%s (%d/%d) $%d", upgrade->name.c_str(), cur_step, max_step, upgrade->cost);
}
else { // If increment == 0 or max steps less than 100000, pretend unlimited upgrades
snprintf(text, 128, "%s $%d", upgrade->name.c_str(), upgrade->cost);
snprintf(text, 2048, "%s $%d", upgrade->name.c_str(), upgrade->cost);
}

ItemDrawInfo info1(text,
Expand All @@ -1209,12 +1209,12 @@ namespace Mod::MvM::Extended_Upgrades
}
else if (upgrade->show_requirements && disabled_reason != "") {

char text[128];
char text[2048];
if (upgrade->increment != 0 && max_step < 100000) {
snprintf(text, 128, "%s: %s (%d/%d) $%d", upgrade->name.c_str(), disabled_reason.c_str(), cur_step, max_step, upgrade->cost);
snprintf(text, 2048, "%s: %s (%d/%d) $%d", upgrade->name.c_str(), disabled_reason.c_str(), cur_step, max_step, upgrade->cost);
}
else { // If increment == 0 or max steps less than 100000, pretend unlimited upgrades
snprintf(text, 128, "%s: %s $%d", upgrade->name.c_str(), disabled_reason.c_str(), upgrade->cost);
snprintf(text, 2048, "%s: %s $%d", upgrade->name.c_str(), disabled_reason.c_str(), upgrade->cost);
}

ItemDrawInfo info1(text, ITEMDRAW_DISABLED);
Expand All @@ -1231,7 +1231,7 @@ namespace Mod::MvM::Extended_Upgrades
}

if(!Mod::Pop::PopMgr_Extensions::ExtendedUpgradesNoUndo()){
ItemDrawInfo info1("Undo upgrades");
ItemDrawInfo info1("�˿�����");
menu->AppendItem("1000", info1);
}
/*if (upgrades.size() == 1) {
Expand Down Expand Up @@ -1270,10 +1270,10 @@ namespace Mod::MvM::Extended_Upgrades
SelectUpgradeWeaponHandler *handler = new SelectUpgradeWeaponHandler(player);
IBaseMenu *menu = menus->GetDefaultStyle()->CreateMenu(handler, g_Ext.GetIdentity());

menu->SetDefaultTitle("Extended Upgrades Menu");
menu->SetDefaultTitle("Extended Upgrades Menu|��չ�����˵�");
menu->SetMenuOptionFlags(0);

ItemDrawInfo info1("Player Upgrades", WeaponHasValidUpgrades(nullptr, player) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
ItemDrawInfo info1("Player Upgrades|�������", WeaponHasValidUpgrades(nullptr, player) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
menu->AppendItem("player", info1);

for (loadout_positions_t slot : {
Expand All @@ -1300,12 +1300,12 @@ namespace Mod::MvM::Extended_Upgrades
}

static ConVarRef tf_mvm_respec_enabled("tf_mvm_respec_enabled");
ItemDrawInfo info2("Refund Upgrades", tf_mvm_respec_enabled.GetBool() ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
ItemDrawInfo info2("Refund Upgrades|�˿�����", tf_mvm_respec_enabled.GetBool() ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED);
menu->AppendItem("refund", info2);

if (Mod::Pop::PopMgr_Extensions::HasExtraLoadoutItems(player->GetPlayerClass()->GetClassIndex())) {

ItemDrawInfo info3("Extra loadout items", ITEMDRAW_DEFAULT);
ItemDrawInfo info3("Extra loadout items|�Զ�����Ʒ", ITEMDRAW_DEFAULT);
menu->AppendItem("extra", info3);
}

Expand Down
Loading

0 comments on commit aaf1e32

Please sign in to comment.