Skip to content

Commit

Permalink
Merge pull request #475 from Nxer/smallFix
Browse files Browse the repository at this point in the history
fix texts and recipe map display
  • Loading branch information
Nxer committed Jun 17, 2024
2 parents bb08e30 + de1b14e commit bba7446
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,28 @@ public void securityBreak() {

@Override
protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
maintenance_EM();
if (structureCheck_EM("MAIN", 3, 3, 0)) {
return !mInputBusses.isEmpty() && !mOutputBusses.isEmpty()
&& (!mEnergyHatches.isEmpty() || !eEnergyMulti.isEmpty())
&& !mMaintenanceHatches.isEmpty();
&& (!mEnergyHatches.isEmpty() || !eEnergyMulti.isEmpty());
}
return false;
}

protected void maintenance_EM() {
mWrench = true;
mScrewdriver = true;
mSoftHammer = true;
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
}

@Override
public boolean doRandomMaintenanceDamage() {
return true;
}

@NotNull
public DimensionalCoord getLocation() {
return new DimensionalCoord(
Expand Down Expand Up @@ -364,15 +378,21 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
.addInfo(TextEnums.tr("tst.megacraftingcenter.desc.2"))
.addInfo(TextEnums.tr("tst.megacraftingcenter.desc.3"))
.addInfo(TextEnums.tr("tst.megacraftingcenter.desc.4"))
.addStructureInfo(Text_SeparatingLine)
// #tr tst.megacraftingcenter.desc.5
// # There is a performance issue when checking pattern. Please use with caution.
// #zh_CN 当前检查样板功能存在性能问题. 谨慎使用.
.addInfo(TextEnums.tr("tst.megacraftingcenter.desc.5"))
.addInfo(Text_SeparatingLine)
.toolTipFinisher(ModName);
return tt;
}

public static ItemStack[] convertAEToMC(IAEItemStack[] STACK) {
// TODO use normal code style instead `Stream`
return Arrays.stream(STACK)
.filter(Objects::nonNull)
.map(IAEItemStack::getItemStack)
.toArray(ItemStack[]::new);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,16 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
// #zh_CN 结构中采矿通道部分需要至少延伸至高度20以下.
.addInfo(TextEnums.tr("Tooltip_Starcore_08"))
// #tr Tooltip_Starcore_Crash_20240606
// # There is a serious bug in the blueprint automatic construction function of this machine,
// #zh_CN {\RED}{\BOLD}此机器的蓝图自动搭建功能出现严重bug,
// # There is a serious bug in the blueprint automatic construction function of borosilicate glass,
// #zh_CN {\RED}{\BOLD}蓝图自动搭建硼玻璃功能发现严重bug,
.addInfo(TextEnums.tr("Tooltip_Starcore_Crash_20240606"))
// #tr Tooltip_Starcore_Crash_20240606_02
// # {\RED}{\BOLD}{\SPACE}which may cause the save file to crash and become inaccessible.
// #zh_CN {\RED}{\BOLD}{\SPACE}可能导致存档崩溃无法进入.
.addInfo(TextEnums.tr("Tooltip_Starcore_Crash_20240606_02"))
// #tr Tooltip_Starcore_Crash_20240606_03
// # In case of emergency, you can install ZeroPointBugFix-0.4.1 mod for temporary fix.
// #zh_CN {\RED}紧急情况可安装 ZeroPointBugFix-0.4.1 mod临时修复.
// # In case of emergency, you can install ZeroPointBugFix mod for temporary fix.
// #zh_CN {\RED}紧急情况可安装 ZeroPointBugFix mod 临时修复.
.addInfo(TextEnums.tr("Tooltip_Starcore_Crash_20240606_03"))
.addInfo(TextLocalization.Tooltips_JoinWirelessNetWithoutEnergyHatch)
.addSeparator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,5 +486,10 @@ public boolean supportsSingleRecipeLocking() {
return true;
}

@Override
public int getRecipeCatalystPriority() {
return -1;
}

// endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ public class GTCMRecipe {
.disableOptimize()
.build();

// #tr tst.recipe.MassFabricatorGenesis
// # Mass Fabricator : Genesis
// #zh_CN 质量发生器 : 创世纪
public static final RecipeMap<TST_RecipeMapBackend> MassFabricatorGenesis = RecipeMapBuilder
.of("tst.recipe.MassFabricatorGenesis", TST_RecipeMapBackend::new)
.maxIO(1, 0, 0, 1)
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/assets/gtnhcommunitymod/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1253,9 +1253,9 @@ Tooltip_IndistinctTentaclePrototypeMK2_02_01= Only §cPerfect Execution Core
InstallingModuleNearControllerImproveMachine=Installing module hatches near the controller block can significantly improve machine performance.
NameIndistinctTentaclePrototypeMK2=§8§lIndistinct Tentacle §rPrototype MK-II
Waila.PerfectExecutionCore.ThisExecutionCore=This Execution Core
Tooltip_Starcore_Crash_20240606=There is a serious bug in the blueprint automatic construction function of this machine,
Tooltip_Starcore_Crash_20240606=There is a serious bug in the blueprint automatic construction function of borosilicate glass,
Tooltip_Starcore_Crash_20240606_02=§c§l which may cause the save file to crash and become inaccessible.
Tooltip_Starcore_Crash_20240606_03=In case of emergency, you can install ZeroPointBugFix-0.4.1 mod for temporary fix.
Tooltip_Starcore_Crash_20240606_03=In case of emergency, you can install ZeroPointBugFix mod for temporary fix.
GTCM_LightningSpire_11=§nOtherwise all internal lightning rods will be lost!
Tooltip_MassFabricatorGenesis_MachineType=§fModularized Machine §7- §eNeutron Activator
Tooltip_MassFabricatorGenesis_01=§9§o“Even though the future seems far away, it is actually beginning right now.”
Expand All @@ -1280,3 +1280,5 @@ Tooltip_IncompactCyclotron_04="That's incredible!"
Tooltip_IncompactCyclotron_05=Thanks to the upgrade of technology
Tooltip_IncompactCyclotron_06=The accelerator upgraded 100%% speedup and 256 parallel
Tooltip_IncompactCyclotron_07=But it requires additional 60%% of power to work
tst.megacraftingcenter.desc.5=There is a performance issue when checking pattern. Please use with caution.
tst.recipe.MassFabricatorGenesis=Mass Fabricator : Genesis
6 changes: 4 additions & 2 deletions src/main/resources/assets/gtnhcommunitymod/lang/zh_CN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1253,9 +1253,9 @@ Tooltip_IndistinctTentaclePrototypeMK2_02_01= 只可安装 §c完美执行核
InstallingModuleNearControllerImproveMachine=在主机附近安装模块仓室可以显著提升机器性能.
NameIndistinctTentaclePrototypeMK2=§8§l不可视之触§r原型机MK-II
Waila.PerfectExecutionCore.ThisExecutionCore=此执行核心
Tooltip_Starcore_Crash_20240606=§c§l此机器的蓝图自动搭建功能出现严重bug,
Tooltip_Starcore_Crash_20240606=§c§l蓝图自动搭建硼玻璃功能发现严重bug,
Tooltip_Starcore_Crash_20240606_02=§c§l 可能导致存档崩溃无法进入.
Tooltip_Starcore_Crash_20240606_03=§c紧急情况可安装 ZeroPointBugFix-0.4.1 mod临时修复.
Tooltip_Starcore_Crash_20240606_03=§c紧急情况可安装 ZeroPointBugFix mod 临时修复.
GTCM_LightningSpire_11=§n否则会丢失所有内部避雷针!
Tooltip_MassFabricatorGenesis_MachineType=§f模块化机械 §7- §e质量发生器
Tooltip_MassFabricatorGenesis_01=§9§o“虽然未来似乎很遥远,但其实已经开始了。”
Expand All @@ -1280,3 +1280,5 @@ Tooltip_IncompactCyclotron_04=这太神奇了!
Tooltip_IncompactCyclotron_05=得益于工艺的升级
Tooltip_IncompactCyclotron_06=加速器拥有了额外100%的额外加速,以及256并行
Tooltip_IncompactCyclotron_07=但是需要额外60%%的供电来运行
tst.megacraftingcenter.desc.5=当前检查样板功能存在性能问题. 谨慎使用.
tst.recipe.MassFabricatorGenesis=质量发生器 : 创世纪

0 comments on commit bba7446

Please sign in to comment.