diff --git a/src/main/java/com/hbm/handler/HbmKeybinds.java b/src/main/java/com/hbm/handler/HbmKeybinds.java index 06a9c90a1..886f388b9 100644 --- a/src/main/java/com/hbm/handler/HbmKeybinds.java +++ b/src/main/java/com/hbm/handler/HbmKeybinds.java @@ -37,6 +37,8 @@ public class HbmKeybinds { public static KeyBinding hudKey = new KeyBinding(category + ".toggleHUD", Keyboard.KEY_V, category); public static KeyBinding dashKey = new KeyBinding(category + ".dash", Keyboard.KEY_LSHIFT, category); public static KeyBinding trainKey = new KeyBinding(category + ".trainInv", Keyboard.KEY_R, category); + + public static KeyBinding qmaw = new KeyBinding(category + ".qmaw", Keyboard.KEY_F1, category); public static KeyBinding abilityCycle = new KeyBinding(category + ".ability", -99, category); public static KeyBinding abilityAlt = new KeyBinding(category + ".abilityAlt", Keyboard.KEY_LMENU, category); @@ -61,6 +63,8 @@ public class HbmKeybinds { ClientRegistry.registerKeyBinding(hudKey); ClientRegistry.registerKeyBinding(dashKey); ClientRegistry.registerKeyBinding(trainKey); + + ClientRegistry.registerKeyBinding(qmaw); ClientRegistry.registerKeyBinding(reloadKey); ClientRegistry.registerKeyBinding(gunPrimaryKey); diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 823e38433..c82f7b1b2 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -14,6 +14,7 @@ import com.hbm.extprop.HbmPlayerProps; import com.hbm.handler.ArmorModHandler; import com.hbm.handler.HTTPHandler; import com.hbm.handler.HazmatRegistry; +import com.hbm.handler.HbmKeybinds; import com.hbm.handler.ImpactWorldHandler; import com.hbm.hazard.HazardSystem; import com.hbm.interfaces.IHoldableWeapon; @@ -753,7 +754,7 @@ public class ModEventHandlerClient { try { QuickManualAndWiki qmaw = QMAWLoader.triggers.get(comp); if(qmaw != null) { - list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("qmaw.tab")); + list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("qmaw.tab", Keyboard.getKeyName(HbmKeybinds.qmaw.getKeyCode()))); lastQMAW = qmaw; qmawTimestamp = Clock.get_ms(); } @@ -907,7 +908,7 @@ public class ModEventHandlerClient { } } - if(Keyboard.isKeyDown(Keyboard.KEY_TAB) && Minecraft.getMinecraft().currentScreen != null) { + if(Keyboard.isKeyDown(HbmKeybinds.qmaw.getKeyCode()) && Minecraft.getMinecraft().currentScreen != null) { QuickManualAndWiki qmaw = qmawTimestamp > Clock.get_ms() - 100 ? lastQMAW : null; diff --git a/src/main/java/com/hbm/qmaw/GuiQMAW.java b/src/main/java/com/hbm/qmaw/GuiQMAW.java index 9e3b37595..b4d60c42b 100644 --- a/src/main/java/com/hbm/qmaw/GuiQMAW.java +++ b/src/main/java/com/hbm/qmaw/GuiQMAW.java @@ -3,12 +3,18 @@ package com.hbm.qmaw; import java.util.ArrayList; import java.util.List; +import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.qmaw.components.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.resources.LanguageManager; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; public class GuiQMAW extends GuiScreen { @@ -16,19 +22,130 @@ public class GuiQMAW extends GuiScreen { protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_wiki.png"); public String title; - public List lines = new ArrayList(); + public ItemStack icon; + public List> lines = new ArrayList(); - protected int xSize = 192; - protected int ySize = 256; + protected int xSize = 340; + protected int ySize = 224; protected int guiLeft; protected int guiTop; + protected boolean isDragging = false; + protected int scrollProgress = 0; + protected int lastClickX = 0; + protected int lastClickY = 0; + + public static final String EN_US = "en_US"; + public GuiQMAW(QuickManualAndWiki qmaw) { parseQMAW(qmaw); } protected void parseQMAW(QuickManualAndWiki qmaw) { + LanguageManager lang = Minecraft.getMinecraft().getLanguageManager(); + this.title = qmaw.title.get(lang.getCurrentLanguage()); + if(title == null) this.title = qmaw.title.get(EN_US); + if(title == null) this.title = "Missing Localization!"; + + this.icon = qmaw.icon; + + String toParse = qmaw.contents.get(lang.getCurrentLanguage()); + if(toParse == null) toParse = qmaw.contents.get(EN_US); + if(toParse == null) toParse = "Missing Localization!"; + toParse = "" + toParse; // strings are reference types, no? + + int maxLineLength = xSize - 29; + String prevToParse = "" + toParse; + int maxIterations = 1000; + int currentLineWidth = 0; + + while(!toParse.isEmpty() && maxIterations > 0) { + if(this.lines.isEmpty()) this.lines.add(new ArrayList()); + List currentLine = this.lines.get(this.lines.size() - 1); + + toParse = toParse.trim(); + + maxIterations--; + + if(toParse.startsWith("
")) { + toParse = toParse.substring(4); + currentLine = new ArrayList(); + this.lines.add(currentLine); + currentLineWidth = 0; + continue; + } + + // handle links + if(toParse.startsWith("[[")) { + int end = toParse.indexOf("]]"); + if(end != -1) { + String link = toParse.substring(2, end); + toParse = toParse.substring(end + 2); + + int pipe = link.indexOf("|"); + QComponentLink linkComponent; + + String suffix = toParse.startsWith(" ") ? " " : ""; + + if(pipe == -1) { + linkComponent = new QComponentLink(link, link + suffix); + } else { + linkComponent = new QComponentLink(link.substring(pipe + 1, link.length()), link.substring(0, pipe) + suffix); + } + + // append to current line + int width = linkComponent.getWidth(); + if(width + currentLineWidth <= maxLineLength) { + currentLine.add(linkComponent); + currentLineWidth += width; + // new line + } else { + currentLine = new ArrayList(); + this.lines.add(currentLine); + currentLine.add(linkComponent); + currentLineWidth = width; + } + + prevToParse = "" + toParse; + continue; + } + } + + // handle standard text + int delimit = toParse.length(); + + int spaceIndex = toParse.indexOf(" "); + if(spaceIndex != -1) delimit = Math.min(delimit, spaceIndex); + int linkIndex = toParse.indexOf("[["); + if(linkIndex != -1) delimit = Math.min(delimit, linkIndex); + int brIndex = toParse.indexOf("
"); + if(brIndex != -1) delimit = Math.min(delimit, brIndex); + + if(delimit > 0) { + QComponentText textComponent = new QComponentText(toParse.substring(0, delimit) + (spaceIndex == delimit ? " " : "")); + toParse = toParse.substring(delimit); + + // append to current line + int width = textComponent.getWidth(); + if(width + currentLineWidth <= maxLineLength) { + currentLine.add(textComponent); + currentLineWidth += width; + // new line + } else { + currentLine = new ArrayList(); + this.lines.add(currentLine); + currentLine.add(textComponent); + currentLineWidth = width; + } + + prevToParse = "" + toParse; + continue; + } + + if(toParse.equals(prevToParse)) break; + prevToParse = "" + toParse; + } } @Override @@ -38,19 +155,85 @@ public class GuiQMAW extends GuiScreen { this.guiTop = (this.height - this.ySize) / 2; } + @Override + protected void mouseClicked(int x, int y, int key) { + super.mouseClicked(x, y, key); + + if(key == 0) { + this.lastClickX = x; + this.lastClickY = y; + } + } + + public int getSliderPosition() { + double progress = (double) scrollProgress / (double) (lines.size() - 1); + return 25 + (int) (progress * 180); + } + @Override public void drawScreen(int mouseX, int mouseY, float f) { - this.drawDefaultBackground(); + + if(Mouse.isButtonDown(0) && guiLeft + xSize - 15 <= mouseX && guiLeft + xSize - 15 + 12 > mouseX && guiTop + 25 < mouseY && guiTop + 25 + 191 >= mouseY) { + isDragging = true; + } + + if(!Mouse.isButtonDown(0)) isDragging = false; + + if(isDragging) { + int min = guiTop + 25 + 8; + int max = guiTop + 25 + 191 - 8; + int span = max - min; + + double progress = MathHelper.clamp_double((double) (mouseY - min) / span, 0D, 1D); + this.scrollProgress = MathHelper.clamp_int((int) Math.round((lines.size() - 1) * progress), 0, lines.size() - 1); + } + + handleScroll(); + + //this.drawRect(0, 0, this.width, this.height, 0x80919191); + this.drawRect(0, 0, this.width, this.height, 0xe0000000); + this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY); GL11.glDisable(GL11.GL_LIGHTING); this.drawGuiContainerForegroundLayer(mouseX, mouseY); GL11.glEnable(GL11.GL_LIGHTING); + + this.lastClickX = 0; + this.lastClickY = 0; + } + + protected void handleScroll() { + + if(!Mouse.isButtonDown(0) && !Mouse.isButtonDown(1) && Mouse.next()) { + int scroll = Mouse.getEventDWheel(); + if(scroll > 0 && this.scrollProgress > 0) this.scrollProgress--; + if(scroll < 0 && this.scrollProgress < this.lines.size() - 1) this.scrollProgress++; + } } private void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - int x = 0; - int y = 0; + int x = 7; + int y = 4; + + if(this.icon != null) { + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_DEPTH_TEST); + Minecraft mc = Minecraft.getMinecraft(); + GL11.glRotated(180, 1, 0, 0); + RenderHelper.enableStandardItemLighting(); + GL11.glRotated(-180, 1, 0, 0); + itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, mc.renderEngine, this.icon, guiLeft + x, guiTop + y); + itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, mc.renderEngine, this.icon, guiLeft + x, guiTop + y, null); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glPopMatrix(); + + x += 18; + y += (16 - this.fontRendererObj.FONT_HEIGHT) / 2; + } + + y += 1; this.fontRendererObj.drawString(title, guiLeft + x, guiTop + y, 0xFFFFFF); } @@ -58,6 +241,52 @@ public class GuiQMAW extends GuiScreen { private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, 170, ySize); + drawTexturedModalRect(guiLeft + 170, guiTop, 22, 0, 170, ySize); + + // scroll bar + drawTexturedModalRect(guiLeft + xSize - 15, guiTop + getSliderPosition(), 192, 0, 12, 16); + + int x = guiLeft + 7; + int y = guiTop + 30; + int lineNum = 0; + + for(List line : lines) { + lineNum++; + + if(lineNum <= this.scrollProgress) continue; + + int maxHeight = 0; + int inset = 0; + + for(ManualElement element : line) { + maxHeight = Math.max(maxHeight, element.getHeight()); + } + + if(y + maxHeight > guiTop + 219) break; + + if(line.isEmpty()) y += this.fontRendererObj.FONT_HEIGHT; + + for(ManualElement element : line) { + int elementX = x + inset; + int elementY = y + (maxHeight - element.getHeight()) / 2; + boolean mouseOver = (elementX <= mouseX && elementX + element.getWidth() > mouseX && elementY < mouseY && elementY + element.getHeight() >= mouseY); + element.render(mouseOver, elementX, elementY, mouseX, mouseY); + if(elementX <= lastClickX && elementX + element.getWidth() > lastClickX && elementY < lastClickY && elementY + element.getHeight() >= lastClickY) + element.onClick(); + inset += element.getWidth(); + } + + y += maxHeight + 2; + } + } + + @Override + protected void keyTyped(char typedChar, int keyCode) { + + if(keyCode == 1 || keyCode == this.mc.gameSettings.keyBindInventory.getKeyCode()) { + this.mc.displayGuiScreen((GuiScreen) null); + this.mc.setIngameFocus(); + } } } diff --git a/src/main/java/com/hbm/qmaw/ManualElement.java b/src/main/java/com/hbm/qmaw/ManualElement.java index f878bf8ae..7d5c640d5 100644 --- a/src/main/java/com/hbm/qmaw/ManualElement.java +++ b/src/main/java/com/hbm/qmaw/ManualElement.java @@ -1,12 +1,9 @@ package com.hbm.qmaw; public abstract class ManualElement { - - public int x; - public int y; public abstract int getWidth(); public abstract int getHeight(); - public abstract void render(boolean isMouseOver, int mouseX, int mouseY); + public abstract void render(boolean isMouseOver, int x, int y, int mouseX, int mouseY); public abstract void onClick(); } diff --git a/src/main/java/com/hbm/qmaw/QMAWLoader.java b/src/main/java/com/hbm/qmaw/QMAWLoader.java index c5bdf391e..f085aeba4 100644 --- a/src/main/java/com/hbm/qmaw/QMAWLoader.java +++ b/src/main/java/com/hbm/qmaw/QMAWLoader.java @@ -78,7 +78,7 @@ public class QMAWLoader implements IResourceManagerReloadListener { for(File modFile : registeredModFiles) dissectZip(modFile); - File devEnvManualFolder = new File(Minecraft.getMinecraft().mcDataDir.getAbsolutePath().replace("/eclipse/.", "") + "/src/main/resources/assets/hbm/manual"); + File devEnvManualFolder = new File(Minecraft.getMinecraft().mcDataDir.getAbsolutePath().replace("/eclipse/.".replace('/', File.separatorChar), "") + "/src/main/resources/assets/hbm/manual".replace('/', File.separatorChar)); if(devEnvManualFolder.exists() && devEnvManualFolder.isDirectory()) { MainRegistry.logger.info("[QMAW] Exploring " + devEnvManualFolder.getAbsolutePath()); dissectManualFolder(devEnvManualFolder); @@ -172,7 +172,9 @@ public class QMAWLoader implements IResourceManagerReloadListener { } /** Extracts all the info from a json file's main object to add a QMAW to the system. Very barebones, only handles name, icon and the localized text. */ - public static void registerJson(String name, JsonObject json) { + public static void registerJson(String file, JsonObject json) { + + String name = json.get("name").getAsString(); QuickManualAndWiki qmaw = new QuickManualAndWiki(name); if(json.has("icon")) { @@ -195,7 +197,7 @@ public class QMAWLoader implements IResourceManagerReloadListener { ItemStack trigger = SerializableRecipe.readItemStack(element.getAsJsonArray()); // items get renamed and removed all the time, so we add some more debug goodness for those cases if(trigger == null || trigger.getItem() == ModItems.nothing) { - MainRegistry.logger.info("[QMAW] Manual " + name + " references nonexistant trigger " + element.toString()); + MainRegistry.logger.info("[QMAW] Manual " + file + " references nonexistant trigger " + element.toString()); } else { QMAWLoader.triggers.put(new ComparableStack(trigger).makeSingular(), qmaw); } diff --git a/src/main/java/com/hbm/qmaw/components/QComponentLink.java b/src/main/java/com/hbm/qmaw/components/QComponentLink.java index 6024deb6f..97402d9fb 100644 --- a/src/main/java/com/hbm/qmaw/components/QComponentLink.java +++ b/src/main/java/com/hbm/qmaw/components/QComponentLink.java @@ -9,10 +9,12 @@ import com.hbm.qmaw.QuickManualAndWiki; import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; public class QComponentLink extends ManualElement { @@ -35,6 +37,8 @@ public class QComponentLink extends ManualElement { } else { this.icon = qmaw.icon; } + + this.font = Minecraft.getMinecraft().fontRenderer; } public QComponentLink setColor(int color, int hoverColor) { @@ -45,30 +49,33 @@ public class QComponentLink extends ManualElement { @Override public int getWidth() { - return font.getStringWidth(text) + (icon != null ? 20 : 0); + return font.getStringWidth(text) + (icon != null ? 18 : 0); } @Override public int getHeight() { - return Math.max(font.FONT_HEIGHT, icon != null ? 18 : 0); + return Math.max(font.FONT_HEIGHT, icon != null ? 16 : 0); } @Override - public void render(boolean isMouseOver, int mouseX, int mouseY) { - int x = this.x; - int y = this.y; + public void render(boolean isMouseOver, int x, int y, int mouseX, int mouseY) { if(this.icon != null) { - + + GL11.glPushMatrix(); GL11.glEnable(GL11.GL_DEPTH_TEST); Minecraft mc = Minecraft.getMinecraft(); + GL11.glRotated(180, 1, 0, 0); + RenderHelper.enableStandardItemLighting(); + GL11.glRotated(-180, 1, 0, 0); itemRender.renderItemAndEffectIntoGUI(this.font, mc.renderEngine, this.icon, x, y); itemRender.renderItemOverlayIntoGUI(this.font, mc.renderEngine, this.icon, x, y, null); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glPopMatrix(); - x += 20; - y += (18 - font.FONT_HEIGHT) / 2; + x += 18; + y += (16 - font.FONT_HEIGHT) / 2; } font.drawString(text, x, y, isMouseOver ? hoverColor : color); @@ -76,6 +83,9 @@ public class QComponentLink extends ManualElement { @Override public void onClick() { QuickManualAndWiki qmaw = QMAWLoader.qmaw.get(link); - if(qmaw != null) FMLCommonHandler.instance().showGuiScreen(new GuiQMAW(qmaw)); + if(qmaw != null) { + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); + FMLCommonHandler.instance().showGuiScreen(new GuiQMAW(qmaw)); + } } } diff --git a/src/main/java/com/hbm/qmaw/components/QComponentText.java b/src/main/java/com/hbm/qmaw/components/QComponentText.java index fd06d1150..30fd266b5 100644 --- a/src/main/java/com/hbm/qmaw/components/QComponentText.java +++ b/src/main/java/com/hbm/qmaw/components/QComponentText.java @@ -36,7 +36,7 @@ public class QComponentText extends ManualElement { } @Override - public void render(boolean isMouseOver, int mouseX, int mouseY) { + public void render(boolean isMouseOver, int x, int y, int mouseX, int mouseY) { font.drawString(text, x, y, color); } diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 444cc8a7c..037898b56 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -3722,6 +3722,8 @@ potion.hbm_telekinesis=! ! ! purex.recycle=Wiederanreicherung von %s purex.schrab=Schrabidium extrahieren aus %s +qmaw.tab=[ Drücke %s für Hilfe ] + radar.clearMap=Karte zurücksetzen radar.detectMissiles=Raketen erkennen radar.detectPlayers=Spieler erkennen diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 32d100935..cd951f6c2 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -4780,6 +4780,8 @@ potion.hbm_telekinesis=! ! ! purex.recycle=Reprocessing of %s purex.schrab=Schrabidium extraction from %s +qmaw.tab=[ Press %s for help ] + radar.clearMap=Clear Map radar.detectMissiles=Detect Missiles radar.detectPlayers=Detect Players diff --git a/src/main/resources/assets/hbm/manual/alloy.json b/src/main/resources/assets/hbm/manual/alloy.json new file mode 100644 index 000000000..0c583e585 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/alloy.json @@ -0,0 +1,11 @@ +{ + "name": "Advanced Alloy", + "icon": ["hbm:item.ingot_advanced_alloy", 1, 0], + "trigger": [["hbm:item.ingot_advanced_alloy"], ["hbm:item.powder_advanced_alloy"], ["hbm:item.plate_advanced_alloy"]], + "title": { + "en_US": "Advanced Alloy" + }, + "content": { + "en_US": "Made in a [[blast furnace|Blast Furnace]] from [[steel|Steel]] and [[Minecraft grade copper|Minecraft Grade Copper]]. Makes better-than-diamond gear. Also used in some high-powered magnets for the [[fusion reactor|Fusion Reactor]] and the [[exposure chamber|Exposure Chamber]]." + } +} diff --git a/src/main/resources/assets/hbm/manual/bakelite.json b/src/main/resources/assets/hbm/manual/bakelite.json new file mode 100644 index 000000000..38d2a9dd1 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/bakelite.json @@ -0,0 +1,11 @@ +{ + "name": "Bakelite", + "icon": ["hbm:item.ingot_bakelite", 1, 0], + "trigger": [["hbm:item.ingot_bakelite"], ["hbm:item.powder_bakelite"]], + "title": { + "en_US": "Bakelite" + }, + "content": { + "en_US": "Alternative to [[polymer|Polymer]] made from [[aromatic hydrocarbons|Aromatic Hydrocarbons]] derived from [[cracked oil products|Catalytic Cracking Tower]]. Completely interchangeable in all recipes." + } +} diff --git a/src/main/resources/assets/hbm/manual/demo.json b/src/main/resources/assets/hbm/manual/demo.json deleted file mode 100644 index d64a6de99..000000000 --- a/src/main/resources/assets/hbm/manual/demo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "DEMO", - "icon": ["hbm:item.gun_light_revolver", 1, 0], - "trigger": [["hbm:item.plate_iron"], ["hbm:item.plate_gold"], ["hbm:item.plate_sludge"]], - "title": { - "en_US": "TEST PAGE" - } - "content": { - "en_US": "This is a test page that links to [[Demo|DEMO]].\n\nFormat line break" - } -} diff --git a/src/main/resources/assets/hbm/manual/mingrade.json b/src/main/resources/assets/hbm/manual/mingrade.json new file mode 100644 index 000000000..73e1a6827 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/mingrade.json @@ -0,0 +1,11 @@ +{ + "name": "Minecraft Grade Copper", + "icon": ["hbm:item.ingot_red_copper", 1, 0], + "trigger": [["hbm:item.ingot_red_copper"], ["hbm:item.powder_red_copper"]], + "title": { + "en_US": "Minecraft Grade Copper (Red Copper)" + }, + "content": { + "en_US": "Alloy made from copper and redstone in equal parts using the [[blast furnace|Blast Furnace]]. Used in almost all things electric, commonly in wire form." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium-238.json b/src/main/resources/assets/hbm/manual/plutonium-238.json new file mode 100644 index 000000000..74e61a1de --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium-238.json @@ -0,0 +1,11 @@ +{ + "name": "Plutonium-238", + "icon": ["hbm:item.billet_pu238", 1, 0], + "trigger": [["hbm:item.ingot_pu238"], ["hbm:item.billet_pu238"], ["hbm:item.nugget_pu238"]], + "title": { + "en_US": "Plutonium-238" + }, + "content": { + "en_US": "Radioisotope, used mainly in [[RTGs|RTG]]. Derived from [[plutonium|Plutonium]] hexafluoride, or from various nuclear fuels, mainly ones using [[uranium-235|Uranium-235]]. Usable with [[beryllium|Beryllium]] as Pu238Be neutron sources in [[RBMKs|RBMK]].

Moderately radioactive, very hot." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium-239.json b/src/main/resources/assets/hbm/manual/plutonium-239.json new file mode 100644 index 000000000..307242d98 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium-239.json @@ -0,0 +1,11 @@ +{ + "name": "Plutonium-239", + "icon": ["hbm:item.billet_pu239", 1, 0], + "trigger": [["hbm:item.ingot_pu239"], ["hbm:item.billet_pu239"], ["hbm:item.nugget_pu239"]], + "title": { + "en_US": "Plutonium-239" + }, + "content": { + "en_US": "Primary fissile isotope of [[plutonium|Plutonium]]. Can be extracted from many spent fuels that use [[uranium-238|Uranium-238]] or directly from [[reactor-grade plutonium|Reactor-Grade Plutonium]]. Usable in high enriched fuels for various reactors, mixed with other isotopes for lower enriched fuels, or as fissile material in many nuclear bombs.

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium-240.json b/src/main/resources/assets/hbm/manual/plutonium-240.json new file mode 100644 index 000000000..3a024fec6 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium-240.json @@ -0,0 +1,11 @@ +{ + "name": "Plutonium-240", + "icon": ["hbm:item.billet_pu240", 1, 0], + "trigger": [["hbm:item.ingot_pu240"], ["hbm:item.billet_pu240"], ["hbm:item.nugget_pu240"]], + "title": { + "en_US": "Plutonium-240" + }, + "content": { + "en_US": "Non-fissile isotope found in [[plutonium|Plutonium]] and [[reactor-grade plutonium|Reactor-Grade-Plutonium]]. Only useful when manually making reactor-grade plutonium from [[plutonium-239|Plutonium-239]] or inspecialized [[zirconium|Zirconium]] fast breeder rods for making [[plutonium-241|Plutonium-241]] in the [[RBMK]]." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium-241.json b/src/main/resources/assets/hbm/manual/plutonium-241.json new file mode 100644 index 000000000..8edf8eddc --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium-241.json @@ -0,0 +1,11 @@ +{ + "name": "Plutonium-241", + "icon": ["hbm:item.billet_pu241", 1, 0], + "trigger": [["hbm:item.ingot_pu241"], ["hbm:item.billet_pu241"], ["hbm:item.nugget_pu241"]], + "title": { + "en_US": "Plutonium-241" + }, + "content": { + "en_US": "Secondary fissile isotope of [[plutonium|Plutonium]]. Can be recovered from [[plutonium-240|Plutonium-240]]-rich spent [[RBMK]] fuels, as well as certain types of [[zirconium|Zirconium]] fast breefer fuels. Only used in specialized breeding fuels and as high enriched fuel, which is more powerful than its [[plutonium-239|Plutonium-239]] counterpart. Plutonium-241 in RBMKs yields [[americium-241|Americium-241]] and [[americium-242|Americium-242]] when reprocessed.

Highly radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium-rg.json b/src/main/resources/assets/hbm/manual/plutonium-rg.json new file mode 100644 index 000000000..9164df069 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium-rg.json @@ -0,0 +1,11 @@ +{ + "name": "Reactor-Grade Plutonium", + "icon": ["hbm:item.billet_pu_mix", 1, 0], + "trigger": [["hbm:item.ingot_pu_mix"], ["hbm:item.billet_pu_mix"], ["hbm:item.nugget_pu_mix"]], + "title": { + "en_US": "Reactor-Grade Plutonium" + }, + "content": { + "en_US": "Mixture of [[plutonium-239|Plutonium-239]] and [[plutonium-240|Plutonium-240]]. Common result of reprocessing many [[uranium|Uranium]]-based fuels, as well as by breeding uranium in the [[Chicago Pile]]. Usable in many reactors as medium enriched plutonium fuel.

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/plutonium.json b/src/main/resources/assets/hbm/manual/plutonium.json new file mode 100644 index 000000000..7952e22e5 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/plutonium.json @@ -0,0 +1,11 @@ +{ + "name": "Plutonium", + "icon": ["hbm:item.ingot_plutonium", 1, 0], + "trigger": [["hbm:item.ingot_plutonium"], ["hbm:item.billet_plutonium"], ["hbm:item.nugget_plutonium"], ["hbm:item.powder_plutonium"]], + "title": { + "en_US": "Plutonium" + }, + "content": { + "en_US": "Rare form of impure plutonium, composed of plutonium-238, 239 and 240. Plutonium in ore form is disabled by default. May be processed in a [[gas centrifuge|Gas Centrifuge]] in hexafluoride form, or used for certain [[cyclotron|Cyclotron]] recipes.

Moderately radioactive.

See also:
[[Plutonium-238]]
[[Plutonium-239]]
[[Plutonium-240]]
[[Plutonium-241]]" + } +} diff --git a/src/main/resources/assets/hbm/manual/polonium.json b/src/main/resources/assets/hbm/manual/polonium.json new file mode 100644 index 000000000..00fac7d84 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/polonium.json @@ -0,0 +1,11 @@ +{ + "name": "Polonium-210", + "icon": ["hbm:item.billet_polonium", 1, 0], + "trigger": [["hbm:item.ingot_polonium"], ["hbm:item.billet_polonium"], ["hbm:item.nugget_polonium"]], + "title": { + "en_US": "Polonium-210" + }, + "content": { + "en_US": "Radioisotope derived from reprocessing [[radium-226|Radium-226]] neutron sources. Usable for [[RTGs|RTG]], or with [[beryllium|Beryllium]] in Po210Be neutron sources for [[RBMKs|RBMK]].

Highly radioactive, very hot." + } +} diff --git a/src/main/resources/assets/hbm/manual/polymer.json b/src/main/resources/assets/hbm/manual/polymer.json new file mode 100644 index 000000000..1fbd464c2 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/polymer.json @@ -0,0 +1,11 @@ +{ + "name": "Polymer", + "icon": ["hbm:item.ingot_polymer", 1, 0], + "trigger": [["hbm:item.ingot_polymer"], ["hbm:item.powder_polymer"]], + "title": { + "en_US": "Polymer" + }, + "content": { + "en_US": "Polymer ('Teflon') is the first available type of plastic. Requires [[petroleum gas|Petroleum Gas]] and therefore [[oil processing|Crude Oil]].

Fully interchangable with [[Bakelite]], which becomes available after [[oil cracking|Catalytic Cracking Tower]]." + } +} diff --git a/src/main/resources/assets/hbm/manual/radium.json b/src/main/resources/assets/hbm/manual/radium.json new file mode 100644 index 000000000..6ec2dcd92 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/radium.json @@ -0,0 +1,11 @@ +{ + "name": "Radium-226", + "icon": ["hbm:item.billet_ra226", 1, 0], + "trigger": [["hbm:item.ingot_ra226"], ["hbm:item.billet_ra226"], ["hbm:item.nugget_ra226"], ["hbm:item.powder_ra226"]], + "title": { + "en_US": "Radium-226" + }, + "content": { + "en_US": "Rare radioactive material found in [[uranium|Uranium]] and [[thorium|Thorium-232]] ores, may be extracted using a [[centrifuge|Centrifuge]]. Used with [[beryllium|Beryllium]] in Ra226Be neutron sources, which are vital for kickstarting the [[Chicago Pile]], [[PWR]], [[research reactor|Research Reactor]] and [[RBMK]]. The first available neutron source, and often times the cheapest.

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/silicon.json b/src/main/resources/assets/hbm/manual/silicon.json new file mode 100644 index 000000000..97cec4e51 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/silicon.json @@ -0,0 +1,11 @@ +{ + "name": "Silicon", + "icon": ["hbm:item.billet_silicon", 1, 0], + "trigger": [["hbm:item.ingot_silicon"], ["hbm:item.billet_silicon"], ["hbm:item.nugget_silicon"]], + "title": { + "en_US": "Silicon" + }, + "content": { + "en_US": "Important material for producing integrated circuits, and any electronics more sophisticated than an analog circuit. Created in an [[electric arc furnace|Electric Arc Furnace]] using things that contain silicon dioxide, like regular sand, nether quartz, fiberglass, flint or [[asbestos|Asbestos]]. Used primarily as wafers (i.e. billets) which are [[pressed|Burner Press]] using a circuit stamp, and then crafted into different types of microchips. Due to requiring an arc furnace, silicon is available after obtaining [[polymer|Polmyer]], requiring [[oil|Crude Oil]] processing." + } +} diff --git a/src/main/resources/assets/hbm/manual/steel.json b/src/main/resources/assets/hbm/manual/steel.json new file mode 100644 index 000000000..113d25af1 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/steel.json @@ -0,0 +1,11 @@ +{ + "name": "Steel", + "icon": ["hbm:item.ingot_steel", 1, 0], + "trigger": [["hbm:item.ingot_steel"], ["hbm:item.plate_steel"], ["hbm:item.powder_steel"]], + "title": { + "en_US": "Steel" + }, + "content": { + "en_US": "Upgraded version of iron, basic material. Used in almost everything. Initially obtained by combining coal and iron in a [[blast furnace|Blast Furnace]]. Upgraded recipes are available later on via [[crucible|Crucible]] and [[rotary furnace|Rotary Furnace]]." + } +} diff --git a/src/main/resources/assets/hbm/manual/technetium.json b/src/main/resources/assets/hbm/manual/technetium.json new file mode 100644 index 000000000..97748ea2b --- /dev/null +++ b/src/main/resources/assets/hbm/manual/technetium.json @@ -0,0 +1,11 @@ +{ + "name": "Technetium", + "icon": ["hbm:item.ingot_technetium", 1, 0], + "trigger": [["hbm:item.billet_technetium"], ["hbm:item.ingot_technetium"], ["hbm:item.nugget_technetium"]], + "title": { + "en_US": "Technetium" + }, + "content": { + "en_US": "Synthetic metal, reprocessed from [[ZIRNOX]] or [[PWR]] fuel early on. May also be extracted from some [[RBMK]] fuels or [[bedrock ore|Bedrock Ore]] with high-performance solvent.

Primarily used for [[technetium steel|Technetium Steel]].

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/technetium_steel.json b/src/main/resources/assets/hbm/manual/technetium_steel.json new file mode 100644 index 000000000..5f33be6c7 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/technetium_steel.json @@ -0,0 +1,11 @@ +{ + "name": "Technetium Steel", + "icon": ["hbm:item.ingot_tcalloy", 1, 0], + "trigger": [["hbm:item.ingot_tcalloy"], ["hbm:item.powder_tcalloy"]], + "title": { + "en_US": "Technetium Steel" + }, + "content": { + "en_US": "Alloy made from [[steel|Steel]] and [[technetium|Technetium]]. Corrosion resistant, used in stronger fluid tanks and many advanced machines. Obtainable after either a [[ZIRNOX]] or [[PWR]] due to technetium being synthetic.

Fully interchangable with [[cadmium steel|Cadmium Steel]]." + } +} diff --git a/src/main/resources/assets/hbm/manual/thorium.json b/src/main/resources/assets/hbm/manual/thorium.json new file mode 100644 index 000000000..1812f13e7 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/thorium.json @@ -0,0 +1,11 @@ +{ + "name": "Thorium-232", + "icon": ["hbm:item.billet_th232", 1, 0], + "trigger": [["hbm:item.ingot_th232"], ["hbm:item.billet_th232"], ["hbm:item.nugget_th232"], ["hbm:item.powder_thorium"]], + "title": { + "en_US": "Thorium-232" + }, + "content": { + "en_US": "Fertile (i.e. can be bred) isotope which yields [[uranium-233|Uranium-233]]. Can either be irradiated in an [[RBMK]] to produce [[thorium fuel|Thorium Fuel]] or combined with uranium-233. Thorium-derived fuels are generally cost-effective but not very powerful. Also usable in [[liquid thorium salt|Liquid Thorium Salt]], a powerful [[PWR]] coolant (turning it into a molten salt reactor) which yields tons of uranium-233 quickly.

Slightly radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/uranium-233.json b/src/main/resources/assets/hbm/manual/uranium-233.json new file mode 100644 index 000000000..1852de4c2 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/uranium-233.json @@ -0,0 +1,11 @@ +{ + "name": "Uranium-233", + "icon": ["hbm:item.billet_u233", 1, 0], + "trigger": [["hbm:item.ingot_u233"], ["hbm:item.billet_u233"], ["hbm:item.nugget_u233"]], + "title": { + "en_US": "Uranium-233" + }, + "content": { + "en_US": "Artificial type of fissile uranium (i.e. reactor capable), created by reprocessing [[thorium-based fuels|Thorium Fuel]]. High enriched uranium-233 fuel is generally more powerful than fuel derived from [[uranium-235|Uranium-235]].

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/uranium-235.json b/src/main/resources/assets/hbm/manual/uranium-235.json new file mode 100644 index 000000000..361c97c72 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/uranium-235.json @@ -0,0 +1,11 @@ +{ + "name": "Uranium-235", + "icon": ["hbm:item.billet_u235", 1, 0], + "trigger": [["hbm:item.ingot_u235"], ["hbm:item.billet_u235"], ["hbm:item.nugget_u235"]], + "title": { + "en_US": "Uranium-235" + }, + "content": { + "en_US": "Enriched uranium. Fissile, usable in some reactors directly as high enriched fuel, or mixed back with [[uranium-238|Uranium-238]] for medium enriched uranium fuels. Weapons grade. Created initially by processing [[uranium hexafluuoride|Uranium Hexafluoride]] in a cascade of four [[gas centrifuges|Gas Centriuge]], available later on by separating [[natural uranium|Uranium]] via [[SILEX]].

Moderately radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/uranium-238.json b/src/main/resources/assets/hbm/manual/uranium-238.json new file mode 100644 index 000000000..bef789d01 --- /dev/null +++ b/src/main/resources/assets/hbm/manual/uranium-238.json @@ -0,0 +1,11 @@ +{ + "name": "Uranium-238", + "icon": ["hbm:item.billet_u238", 1, 0], + "trigger": [["hbm:item.ingot_u238"], ["hbm:item.billet_u238"], ["hbm:item.nugget_u238"]], + "title": { + "en_US": "Uranium-238" + }, + "content": { + "en_US": "Depleted uranium, not fissile (i.e. not directly reactor-usable). Primarily a byproduct from enriching [[uranium|Uranium]]. Used in [[ferrouranium|Ferrouranium]], for [[depleted uranium ammo|Depleted Uranium Ammo]] and for certain low-enriched fuels. Fuels that contain uranium-238 typically yield useful [[plutonium-239|Plutonium-239]] when reprocessing.

Slightly radioactive." + } +} diff --git a/src/main/resources/assets/hbm/manual/uranium.json b/src/main/resources/assets/hbm/manual/uranium.json new file mode 100644 index 000000000..3c34cc07e --- /dev/null +++ b/src/main/resources/assets/hbm/manual/uranium.json @@ -0,0 +1,11 @@ +{ + "name": "Uranium", + "icon": ["hbm:item.ingot_uranium", 1, 0], + "trigger": [["hbm:item.ingot_uranium"], ["hbm:item.billet_uranium"], ["hbm:item.nugget_uranium"], ["hbm:item.powder_uranium"], ["hbm:tile.ore_uranium"]], + "title": { + "en_US": "Uranium" + }, + "content": { + "en_US": "Natural uranium, slightly radioactive. Not very fissile on its own, can be enriched by turning it into [[uranium hexafluoride|Uranium Hexafluoride]] and processing it in [[gas centrifuges|Gas Centrifuge]]. [[ZIRNOX]], [[RBMK]] and [[Chigago Pile]] may use natural uranium as fuel without enrichment.

See also:
[[Uranium-233]]
[[Uranium-235]]
[[Uranium-238]]" + } +} diff --git a/src/main/resources/assets/hbm/textures/gui/gui_wiki.png b/src/main/resources/assets/hbm/textures/gui/gui_wiki.png index 25d913919..48c92d1c4 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_wiki.png and b/src/main/resources/assets/hbm/textures/gui/gui_wiki.png differ