Fix missing text bug

This commit is contained in:
dazedanon 2025-10-22 17:22:34 -05:00
parent 03184e0881
commit 53201e19c3
2 changed files with 18 additions and 15 deletions

View file

@ -85,14 +85,14 @@ MapParts.NinshinGauge = defineObject(BaseObject,
var bote = root.getMetaSession().getGlobalSwitchTable().isSwitchOn(this.val * 10 + 3);
var hininId = getEroEquipSwitchId(this.val, itemIdMap[34]);
var hinin = root.getMetaSession().getGlobalSwitchTable().isSwitchOn(hininId);
ItemInfoRenderer.drawKeyword(x, y, '');
ItemInfoRenderer.drawKeyword(x, y, 'HP');
if (bote) {
ItemInfoRenderer.drawKeyword(x, y + 24, '妊娠中');
ItemInfoRenderer.drawKeyword(x, y + 24, 'Pregnant');
} else if (hinin) {
ItemInfoRenderer.drawKeyword(x, y + 24, '避妊の法装備中');
ItemInfoRenderer.drawKeyword(x, y + 24, 'Wearing Contraceptive Talisman');
}
else {
ItemInfoRenderer.drawKeyword(x, y + 24, '妊娠ゲージ');
ItemInfoRenderer.drawKeyword(x, y + 24, 'Pregnancy Gauge');
}
x += 110;
@ -219,7 +219,7 @@ function getNinshinMax(val) {
case 9: return 45;
case 10: return 55;
case 11: return 50;
case 12: return 80; // サリア
case 12: return 80; // Saria
case 14: return 70;
default: return -1;
}
@ -239,10 +239,10 @@ SelectScrollbar.drawScrollContent = function (x, y, object, isSelect, index) {
TitleRenderer.drawTitle(pic, x, y, width, height, count + 2);
var text = object.text;
text = text.replace('1111', '    HP↓↓ 妊娠↑↑');
text = text.replace('2222', ' HP↓↓ 妊娠↑');
text = text.replace('3333', '  HP↓  妊娠↑');
text = text.replace('4444', ' HP↓  妊娠↑');
text = text.replace('1111', ' HP↓↓ Pregnancy↑↑');
text = text.replace('2222', ' HP↓↓ Pregnancy↑');
text = text.replace('3333', ' HP↓ Pregnancy↑');
text = text.replace('4444', ' HP↓ Pregnancy↑');
var textWidth = TextRenderer.getTextWidth(text, font);
@ -284,7 +284,7 @@ AttackEvaluator.PassiveAction.evaluateAttackEntry = function (virtualActive, vir
return;
}
// ダメージを受けても死亡しない場合は続行しない
// If they won't die even after taking damage, do not continue
if (virtualPassive.hp - attackEntry.damagePassive > 0) {
return;
}
@ -295,17 +295,17 @@ AttackEvaluator.PassiveAction.evaluateAttackEntry = function (virtualActive, vir
}
if (value === SurvivalValue.SURVIVAL) {
// ダメージを1つ減らすことでHP1で残るようにする
// By reducing damage by 1, leave HP at 1
attackEntry.damagePassive--;
attackEntry.damagePassiveFull = attackEntry.damagePassive;
if (attackEntry.damageActive < 0) {
// 吸収による回復が生じているため、1つ増やす(回復量が1つ減る)
// If healing occurred due to absorption, increase by 1 (reducing healing by 1)
attackEntry.damageActive++;
}
}
else if (value === SurvivalValue.IMMORTAL) {
// 相手は不死身であり、死亡させるわけにはいかないため、これまでの設定を無効にする
// The enemy is immortal and cannot be killed, so invalidate settings so far
attackEntry.damagePassive = virtualPassive.hp - 1;
attackEntry.damagePassiveFull = attackEntry.damagePassive;
}
@ -369,4 +369,4 @@ var _VariableReplacer_configureVariableObject = VariableReplacer._configureVaria
VariableReplacer._configureVariableObject = function(groupArray) {
_VariableReplacer_configureVariableObject.call(this, groupArray);
groupArray.appendObject(DataVariable.Pdc);
};
};

View file

@ -333,7 +333,10 @@ var QuestListScrollbar = defineObject(BaseScrollbar,
},
getObjectWidth: function() {
return DefineControl.getTextPartsWidth() + GraphicsFormat.ICON_WIDTH;
// Increase width to allow longer quest names to render without truncation.
// Previously this relied on DefineControl.getTextPartsWidth() (135px) which is too small for translated text.
// Bump the effective width to ~1.8x of the default text parts width plus the icon width.
return Math.floor(DefineControl.getTextPartsWidth() * 1.8) + GraphicsFormat.ICON_WIDTH;
},
getObjectHeight: function() {