More additions to the tooltip
This commit is contained in:
committed by
logan
parent
10013fd9e6
commit
7a678e97a3
@@ -39,6 +39,7 @@ public final class Constants {
|
||||
public static final String TOOLTIP_CONFIRM = key("tooltip.{mod}.confirm");
|
||||
public static final String TOOLTIP_CANCEL = key("tooltip.{mod}.cancel");
|
||||
public static final String TOOLTIP_INTERNET_DISABLED = key("tooltip.{mod}.internet.disabled");
|
||||
public static final String TOOLTIP_INTERNET_ENERGY_PER_PACKET = key("tooltip.{mod}.internet.energy_per_packet");
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -107,8 +107,13 @@ public final class TooltipUtils {
|
||||
tooltip.add(withFormat(Component.translatable(Constants.TOOLTIP_ENERGY_CONSUMPTION, energy), ChatFormatting.GRAY));
|
||||
}
|
||||
|
||||
if (!Config.internetCardEnabled) {
|
||||
if (stack.getItem() == Items.INTERNET_GATEWAY.get()) {
|
||||
// Additional tooltips for InternetGateWay
|
||||
if (stack.getItem() == Items.INTERNET_GATEWAY.get()) {
|
||||
if (Config.gatewayEnergyPerPacket > 0) {
|
||||
final MutableComponent energy = withFormat(String.valueOf(Config.gatewayEnergyPerPacket), ChatFormatting.GREEN);
|
||||
tooltip.add(withFormat(new TranslatableComponent(Constants.TOOLTIP_INTERNET_ENERGY_PER_PACKET, energy), ChatFormatting.GRAY));
|
||||
}
|
||||
if (!Config.internetCardEnabled) {
|
||||
tooltip.add(withFormat(new TranslatableComponent(Constants.TOOLTIP_INTERNET_DISABLED), ChatFormatting.RED));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +153,8 @@
|
||||
"tooltip.oc2.confirm": "Confirm",
|
||||
"tooltip.oc2.cancel": "Cancel",
|
||||
"tooltip.oc2.network_tunnel_id": "Tunnel: %s",
|
||||
"tooltip.oc2.internet.disabled": "Note that Internet access is currently disabled. It can be enabled in the mod config, but know that this is potentially unsafe. Make sure that you either thrust everyone you're playing with, or configure address whitelist properly.",
|
||||
"tooltip.oc2.internet.disabled": "Note that Internet access is currently disabled. It can be enabled in the mod config, but expect this to be potentially unsafe. Make sure that you trust everyone you're playing with and/or limit addresses which can be connected to in the config.",
|
||||
"tooltip.oc2.internet.energy_per_packet": "Energy per packet sent: %s",
|
||||
|
||||
"subtitles.oc2.computer": "Computer fans running",
|
||||
"subtitles.oc2.floppy": "Floppy access",
|
||||
|
||||
Reference in New Issue
Block a user