State clear that we need any of items specified in research
This commit is contained in:
parent
7f99f6f03e
commit
22c6b856bf
@ -462,6 +462,10 @@ private fun research(provider: MatteryLanguageProvider) {
|
||||
add("android_research.status.requires_item", "Requires %s")
|
||||
add("android_research.status.requires_item_multiple0", "Requires %s x%s (missing %s)")
|
||||
add("android_research.status.requires_item_multiple1", "Requires %s x%s")
|
||||
|
||||
add("android_research.status.requires_item_any", "Requires any of %s")
|
||||
add("android_research.status.requires_item_multiple_any0", "Requires any of %s x%s (missing %s)")
|
||||
add("android_research.status.requires_item_multiple_any1", "Requires any of %s x%s")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,18 +341,19 @@ class AndroidResearch(val type: AndroidResearchType, val capability: MatteryPlay
|
||||
}
|
||||
|
||||
val chooseItem = tag.items[((System.nanoTime() / 300_000_000L).absoluteValue % tag.items.size).toInt()]
|
||||
val suffix = if (tag.items.size > 1) "_any" else ""
|
||||
|
||||
if (required > 0) {
|
||||
if (count == 1) {
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item$suffix", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
} else {
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item_multiple0", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_RED), TextComponent(count.toString()).withStyle(ChatFormatting.YELLOW), TextComponent(required.toString()).withStyle(ChatFormatting.YELLOW)).withStyle(ChatFormatting.GRAY))
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item_multiple${suffix}0", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_RED), TextComponent(count.toString()).withStyle(ChatFormatting.YELLOW), TextComponent(required.toString()).withStyle(ChatFormatting.YELLOW)).withStyle(ChatFormatting.GRAY))
|
||||
}
|
||||
} else {
|
||||
if (count == 1) {
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item$suffix", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
} else {
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item_multiple1", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_GREEN), TextComponent(count.toString()).withStyle(ChatFormatting.YELLOW)).withStyle(ChatFormatting.GRAY))
|
||||
builder.add(TranslatableComponent("android_research.status.requires_item_multiple${suffix}1", chooseItem.hoverName.copy().withStyle(ChatFormatting.DARK_GREEN), TextComponent(count.toString()).withStyle(ChatFormatting.YELLOW)).withStyle(ChatFormatting.GRAY))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user