Skip to content
This repository has been archived by the owner on Sep 4, 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 7, 2024
1 parent 6b5f9cf commit b7b207a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/mod/mvm/extended_upgrades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,12 +1182,12 @@ namespace Mod::MvM::Extended_Upgrades

if (enabled) {

char text[128];
char text[1024];
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, 1024, "%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, 1024, "%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[1024];
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, 1024, "%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, 1024, "%s: %s $%d", upgrade->name.c_str(), disabled_reason.c_str(), upgrade->cost);
}

ItemDrawInfo info1(text, ITEMDRAW_DISABLED);
Expand Down
6 changes: 3 additions & 3 deletions src/mod/pop/popmgr_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ namespace Mod::Pop::PopMgr_Extensions
DevMsg("Pass send\n");

if (state.m_ExtraLoadoutItemsNotify)
PrintToChat("\x07""7fd4ff当前任务可以装备自定义物品,输入!missionitems查看你当前兵种可用的物品\n",player);
PrintToChat("\x07""7fd4ff>当前任务可以装备自定义物品,输入!missionitems查看你当前兵种可用的物品\n",player);

//auto explanation = Mod::Pop::Wave_Extensions::GetWaveExplanation(0);

Expand Down Expand Up @@ -2362,7 +2362,7 @@ namespace Mod::Pop::PopMgr_Extensions
state.m_SandmanStuns.Get() ||
state.m_bNoReanimators
)) {
PrintToChat("\x07""7fd4ff输入!missioninfo查看自定义任务信息\n",player);
PrintToChat("\x07""7fd4ff>输入!missioninfo查看自定义任务信息\n",player);
}
}

Expand Down Expand Up @@ -4180,7 +4180,7 @@ namespace Mod::Pop::PopMgr_Extensions
}

char buf[256];
snprintf(buf, sizeof(buf), "%s: %s %s %s", loadoutStrings[item.loadout_slot], item.name.c_str(), cost, selected ? "(selected)" : "");
snprintf(buf, sizeof(buf), "%s: %s %s %s", loadoutStrings[item.loadout_slot], item.name.c_str(), cost, selected ? "(已选中)" : "");
ItemDrawInfo info1(buf, ITEMDRAW_DEFAULT);
std::string num = std::to_string(i);
menu->AppendItem(num.c_str(), info1);
Expand Down

0 comments on commit b7b207a

Please sign in to comment.