Reworded some item descriptions trying to make them more concise.

Makes tooltips a little less daunting.
Also enable description for manual item.
This commit is contained in:
Florian Nücke
2022-01-10 19:26:01 +01:00
parent 533ef307f5
commit 4ff68cd390
2 changed files with 39 additions and 21 deletions

View File

@@ -7,9 +7,17 @@ import li.cil.manual.api.prefab.item.AbstractManualItem;
import li.cil.oc2.client.manual.Manuals;
import li.cil.oc2.client.manual.ModManualScreenStyle;
import li.cil.oc2.client.manual.ModManualStyle;
import li.cil.oc2.common.util.TooltipUtils;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.List;
public final class ManualItem extends AbstractManualItem {
public ManualItem() {
super(new Properties().tab(ItemGroup.COMMON));
@@ -17,6 +25,15 @@ public final class ManualItem extends AbstractManualItem {
///////////////////////////////////////////////////////////////////
@OnlyIn(Dist.CLIENT)
@Override
public void appendHoverText(final ItemStack stack, @Nullable final Level level, final List<Component> tooltip, final TooltipFlag flag) {
super.appendHoverText(stack, level, tooltip, flag);
TooltipUtils.tryAddDescription(stack, tooltip);
}
///////////////////////////////////////////////////////////////////
@Override
protected ManualModel getManualModel() {
return Manuals.MANUAL.get();

View File

@@ -2,16 +2,16 @@
"itemGroup.oc2.common": "OpenComputers II",
"block.oc2.computer": "Computer",
"block.oc2.computer.desc": "Use a Scrench or compatible wrench to add and remove components.",
"block.oc2.computer.desc": "Runs software from Flash Memory and Hard Disks.",
"block.oc2.computer.preconfigured": "Preconfigured Computer",
"block.oc2.bus_cable": "Bus Cable",
"block.oc2.bus_cable.desc": "Used in combination with Bus Interfaces to connect external devices to computers.",
"block.oc2.bus_cable.desc": "Connects Bus Interfaces.",
"block.oc2.network_connector": "Network Connector",
"block.oc2.network_connector.desc": "Connector for connecting a computer to a network via a Network Cable.",
"block.oc2.network_connector.desc": "Transmits network packets via Network Cables.",
"block.oc2.network_hub": "Network Hub",
"block.oc2.network_hub.desc": "Connects multiple computers into one network. Cables are connected via a Network Connector.",
"block.oc2.network_hub.desc": "Distributes network packets among all attached Network Connectors.",
"block.oc2.redstone_interface": "Redstone Interface",
"block.oc2.redstone_interface.desc": "Works similar to the Redstone Interface Card, but emits a redstone signal from itself.",
"block.oc2.redstone_interface.desc": "Emits and reads redstone signals.",
"block.oc2.disk_drive": "Disk Drive",
"block.oc2.disk_drive.desc": "Used to access Floppy Disks.",
"block.oc2.charger": "Charger",
@@ -20,40 +20,41 @@
"block.oc2.creative_energy.desc": "Provides unlimited energy to adjacent blocks. Intended for testing.",
"item.oc2.wrench": "Scrench",
"item.oc2.wrench.desc": "Used to configure devices and to dismantle them (while sneaking).",
"item.oc2.wrench.desc": "Configures devices and dismantles them (while sneaking).",
"item.oc2.manual": "The Computerist's Handbook",
"item.oc2.manual.desc": "Holds information on all things needed when working with Computers.",
"item.oc2.bus_interface": "Bus Interface",
"item.oc2.bus_interface.desc": "Required for connecting external devices via a Bus Cable.",
"item.oc2.bus_interface.desc": "Connects external devices to Computers.",
"item.oc2.network_cable": "Network Cable",
"item.oc2.network_cable.desc": "Flexible and thin cable. Connects two Network Connectors together.",
"item.oc2.network_cable.desc": "Connects Network Connectors.",
"item.oc2.memory": "Memory",
"item.oc2.memory.desc": "RAM module. Required for a computer or robot to work. The more you have, the better.",
"item.oc2.memory.desc": "Random Access Memory (RAM) used in Computers and Robots.",
"item.oc2.hard_drive": "Hard Drive",
"item.oc2.hard_drive.desc": "Reliable storage for the OS and user files. Almost nowhere without it.",
"item.oc2.hard_drive.desc": "Mass storage for operating systems and data.",
"item.oc2.floppy": "Floppy Disk",
"item.oc2.floppy.desc": "Cheap but small storage. Suitable for transferring some program to a friend.",
"item.oc2.floppy.desc": "Portable storage used to transfer data between Computers.",
"item.oc2.flash_memory": "Flash Memory",
"item.oc2.flash_memory.desc": "This small card can store firmware for a computer or a robot, so it is very important.",
"item.oc2.flash_memory.desc": "Readonly storage for firmware.",
"item.oc2.redstone_interface_card": "Redstone Interface Card",
"item.oc2.redstone_interface_card.desc": "This card allows the computer to emit a redstone signal from all directions. A useful thing.",
"item.oc2.redstone_interface_card.desc": "Emits and reads redstone signals through the Computer.",
"item.oc2.network_interface_card": "Network Interface Card",
"item.oc2.network_interface_card.desc": "Allows sending and receiving messages via attached Network Connector.",
"item.oc2.network_interface_card.desc": "Sends and receives network packets via attached Network Connectors.",
"item.oc2.network_interface_card.is_configured": "Has connectivity configuration.",
"item.oc2.file_import_export_card": "File Import/Export Card",
"item.oc2.file_import_export_card.desc": "Provides an API to import and export files into and out of a virtual computer from and into your real file system.",
"item.oc2.file_import_export_card.desc": "Imports and exports files from and into your real file system.",
"item.oc2.robot": "Robot",
"item.oc2.robot.desc": "Use a Scrench or compatible wrench to add and remove components.",
"item.oc2.robot.desc": "A mobile Computer. Use a Scrench to pick it back up.",
"item.oc2.inventory_operations_module": "Inventory Operations Module",
"item.oc2.inventory_operations_module.desc": "Enables robots to move items in, into and out of their inventory.",
"item.oc2.inventory_operations_module.desc": "Moves items in, into and out of the Robot's inventory.",
"item.oc2.block_operations_module": "Block Operations Module",
"item.oc2.block_operations_module.desc": "Enables robots to break and place blocks.",
"item.oc2.block_operations_module.desc": "Breaks and places blocks.",
"item.oc2.sound_card": "Sound Card",
"item.oc2.sound_card.desc": "Can play various sounds from its highly realistic sound bank.",
"item.oc2.sound_card.desc": "Plays various sounds from its highly realistic sound bank.",
"item.oc2.transistor": "Transistor",
"item.oc2.transistor.desc": "It may or may not conduct a signal. It is the basis of any computer and not only.",
"item.oc2.transistor.desc": "Crafting material.",
"item.oc2.circuit_board": "Circuit Board",
"item.oc2.circuit_board.desc": "Flat board with conductive tracks. Required for the manufacture of computer boards.",
"item.oc2.circuit_board.desc": "Crafting material.",
"entity.oc2.robot": "Robot",