diff options
3 files changed, 53 insertions, 37 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java index 3071cb95a3..197d2bdaa5 100644 --- a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java +++ b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java @@ -82,24 +82,24 @@ public class GT_Multiblock_Tooltip_Builder { hBlocks = Multimaps.newSetMultimap(new HashMap<>(), HashSet::new); hBlocks.put(StructureLibAPI.HINT_BLOCK_META_AIR, TT_air); } - + /** * Add a line telling you what the machine type is. Usually, this will be the name of a SB version.<br> * Machine Type: machine - * + * * @param machine * Name of the machine type - * + * * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMachineType(String machine) { iLines.add(TT_machineType + COLON + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); return this; } - + /** * Add a basic line of information about this structure - * + * * @param info * The line to be added. * @return Instance this method was called on. @@ -108,24 +108,24 @@ public class GT_Multiblock_Tooltip_Builder { iLines.add(info); return this; } - + /** * Add a separator line like this:<br> * ----------------------------------------- - * + * * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addSeparator() { iLines.add("-----------------------------------------"); return this; } - + /** * Add a line telling how much this machine pollutes. - * + * * @param pollution * Amount of pollution per second when active - * + * * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addPollutionAmount(int pollution) { @@ -136,7 +136,7 @@ public class GT_Multiblock_Tooltip_Builder { /** * Begin adding structural information by adding a line about the structure's dimensions * and then inserting a "Structure:" line. - * + * * @param w * Structure width. * @param h @@ -157,11 +157,11 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TT_structure + COLON); return this; } - + /** * Begin adding structural information by adding a line about the structure's dimensions<br> * and then inserting a "Structure:" line. Variable version displays min and max - * + * * @param wmin * Structure min width. * @param wmax @@ -188,7 +188,7 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TT_structure + COLON); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Controller: info @@ -200,7 +200,7 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TAB + TT_controller + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)minCountx casingName (minimum) @@ -214,7 +214,7 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TAB + minCount +"x " + casingName + " " + TT_minimum); return this; } - + /** * Use this method to add a structural part that isn't covered by the other methods.<br> * (indent)name: info @@ -228,7 +228,7 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TAB + name + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Maintenance Hatch: info @@ -240,19 +240,19 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TAB + TT_maintenancehatch + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Muffler Hatch: info * @param info - * Location where the hatch goes + * Location where the hatch goes * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info) { sLines.add(TAB + TT_mufflerhatch + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Energy Hatch: info @@ -264,7 +264,7 @@ public class GT_Multiblock_Tooltip_Builder { sLines.add(TAB + TT_energyhatch + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Dynamo Hatch: info @@ -281,43 +281,43 @@ public class GT_Multiblock_Tooltip_Builder { * Add a line of information about the structure:<br> * (indent)Input Bus: info * @param info - * Location where the bus goes + * Location where the bus goes * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addInputBus(String info) { sLines.add(TAB + TT_inputbus + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Input Hatch: info * @param info - * Location where the hatch goes + * Location where the hatch goes * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addInputHatch(String info) { sLines.add(TAB + TT_inputhatch + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Output Bus: info * @param info - * Location where the bus goes + * Location where the bus goes * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addOutputBus(String info) { sLines.add(TAB + TT_outputbus + COLON + info); return this; } - + /** * Add a line of information about the structure:<br> * (indent)Output Hatch: info * @param info - * Location where the bus goes + * Location where the bus goes * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addOutputHatch(String info) { @@ -466,6 +466,18 @@ public class GT_Multiblock_Tooltip_Builder { return this; } + /** + * Use this method to add non-standard structural info.<br> + * (indent)info + * @param channel the name of subchannel + * @param purpose the purpose of subchannel + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addSubChannelUsage(String channel, String purpose) { + sLines.add(StatCollector.translateToLocalFormatted("GT5U.MBTT.subchannel", channel, purpose)); + return this; + } + /** * Use this method to add non-standard structural hint. This info will appear before the standard structural hint. * @param info @@ -489,12 +501,12 @@ public class GT_Multiblock_Tooltip_Builder { for (int dot : dots) hBlocks.put(dot, StatCollector.translateToLocal(name)); return this; } - + /** * Call at the very end.<br> * Adds a final line with the mod name and information on how to display the structure guidelines.<br> * Ends the building process. - * + * * @param mod * Name of the mod that adds this multiblock machine */ @@ -507,11 +519,11 @@ public class GT_Multiblock_Tooltip_Builder { // e.getKey() - 1 because 1 dot is meta 0. hArray = Stream.concat(hLines.stream(), hBlocks.asMap().entrySet().stream().map(e -> TT_dots[e.getKey() - 1] + COLON + String.join(SEPARATOR, e.getValue()))).toArray(String[]::new); } - + public String[] getInformation() { return iArray; } - + public String[] getStructureInformation() { return sArray; } diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index e80e56d179..6a05a1e1b7 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -37,6 +37,8 @@ GT5U.MBTT.StructureHint=Some blocks have multiple candidates or can use any tier GT5U.MBTT.Mod=Added by GT5U.MBTT.Air=Mandatory Air +GT5U.MBTT.subchannel=Uses sub channel §6%s§r for %s + GT5U.cracker.io_side=Input/Output Hatches must be on opposite sides! GT5U.turbine.running.true=Turbine running diff --git a/src/main/resources/assets/gregtech/lang/zh_CN.lang b/src/main/resources/assets/gregtech/lang/zh_CN.lang index fb4823ad74..c79e678f9a 100644 --- a/src/main/resources/assets/gregtech/lang/zh_CN.lang +++ b/src/main/resources/assets/gregtech/lang/zh_CN.lang @@ -33,6 +33,8 @@ GT5U.MBTT.StructureHint=多种可选方块或任意等级方块 GT5U.MBTT.Mod=添加模组: GT5U.MBTT.Air=必须留空 +GT5U.MBTT.subchannel=子信道 §6%s§r 将被用于 %s + GT5U.cracker.io_side=输入/输出仓必须处在对侧! GT5U.turbine.running.true=涡轮运行 @@ -105,7 +107,7 @@ GT5U.machines.item_transfer.tooltip.extended.5=§7Shift以切换多组输入. GT5U.machines.battery_slot.tooltip=电力槽 GT5U.machines.battery_slot.tooltip.1=§7使用 %1$s§7 电池供能 GT5U.machines.battery_slot.tooltip.2=§7可以为 %1$s§7 工具&电池充电 -GT5U.machines.battery_slot.tooltip.extended=§4警告:§7 如果通过线缆输入 +GT5U.machines.battery_slot.tooltip.extended=§4警告:§7 如果通过线缆输入 GT5U.machines.battery_slot.tooltip.extended.1=§7%2$s§7+ 电压将导致爆炸. GT5U.machines.battery_slot.tooltip.alternative=电力槽 GT5U.machines.battery_slot.tooltip.alternative.1=%1$s§7 电压? 你已经不再需要tooltip了. @@ -360,7 +362,7 @@ achievement.Olivine.desc=高度:10-40,几率:60, 暮色森林/鸟神星/ achievement.Apatite=找到磷灰石矿石 achievement.Apatite.desc=高度:40-60,几率:60,主世界/暮色森林/鲸鱼座T星// 大概已经不存在了 achievement.TricalciumPhosphate=找到磷酸三钙矿石 -achievement.TricalciumPhosphate.desc=高度:40-60,几率:60,主世界/暮色森林/鲸鱼座T星// +achievement.TricalciumPhosphate.desc=高度:40-60,几率:60,主世界/暮色森林/鲸鱼座T星// achievement.Phosphate=找到磷酸盐矿石 achievement.Phosphate.desc=高度:40-60,几率:60,主世界/暮色森林/鲸鱼座T星// 大概已经不存在了 achievement.Galena=找到方铅矿矿石 @@ -616,7 +618,7 @@ achievement.unitool=万用工具 achievement.unitool.desc=制造一把万用铲 achievement.recycling=回收利用 achievement.recycling.desc=制造一台电弧炉 -achievement.crushed=粉碎 +achievement.crushed=粉碎 achievement.crushed.desc=用锤子粉碎矿石 achievement.cleandust=清洗 achievement.cleandust.desc=在坩埚里清洗粉末 @@ -1176,7 +1178,7 @@ gregtech.areaLethargic=摸鱼 gregtech.areaExploratory=探索 gregtech.speedUnproductive=不生产 gregtech.speedAccelerated=加速 -gregtech.lifeBlink=瞬灭 +gregtech.lifeBlink=瞬灭 gregtech.lifeEon=永生 entity.gregtech.GT_Entity_Arrow.name=GT箭头 @@ -1265,4 +1267,4 @@ fluid.poo=便便 fluid.sewerage=下水 fluid.fuelgc=GC燃油 fluid.dirtywater=污水 -fluid.oilgc=GC石油
\ No newline at end of file +fluid.oilgc=GC石油 |