tooltips for turret buttons, armor mod table, more lang keys

better gun smoke effect for atlas
This commit is contained in:
Bob 2022-07-06 23:32:32 +02:00
parent 810f5d2680
commit 752a863559
13 changed files with 126 additions and 31 deletions

View File

@ -2187,7 +2187,7 @@ public class ModBlocks {
machine_electrolyser = new MachineElectrolyser().setBlockName("machine_electrolyser").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
machine_autocrafter = new MachineAutocrafter().setBlockName("machine_autocrafter").setCreativeTab(MainRegistry.machineTab);
machine_autocrafter = new MachineAutocrafter().setBlockName("machine_autocrafter").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab);
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
anvil_lead = new NTMAnvil(Material.iron, 1).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");

View File

@ -275,8 +275,10 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 0), new Object[] { "CIC", "CSC", "CCC", 'C', ModItems.cordite, 'I', IRON.block(), 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 1), new Object[] { " D ", "DSD", " D ", 'D', ModItems.ball_dynamite, 'S', new ItemStack(ModItems.ammo_arty, 1, 0) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 2), new Object[] { "TTT", "TST", "TTT", 'T', ModItems.ball_tnt, 'S', new ItemStack(ModItems.ammo_arty, 1, 0) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 5), new Object[] { " D ", "DSD", " D ", 'D', P_WHITE.ingot(), 'S', new ItemStack(ModItems.ammo_arty, 1, 0) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 5), new Object[] { "D", "S", "D", 'D', P_WHITE.ingot(), 'S', new ItemStack(ModItems.ammo_arty, 1, 0) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 7), new Object[] { "DSD", "SCS", "DSD", 'D', P_WHITE.ingot(), 'S', new ItemStack(ModItems.ammo_arty, 1, 5), 'C', ModBlocks.det_cord });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 3), new Object[] { " P ", "NSN", " P ", 'P', PU239.nugget(), 'N', OreDictManager.getReflector(), 'S', new ItemStack(ModItems.ammo_arty, 1, 0) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 6), new Object[] { "DSD", "SCS", "DSD", 'D', OreDictManager.getReflector(), 'S', new ItemStack(ModItems.ammo_arty, 1, 3), 'C', ModBlocks.det_cord });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_arty, 1, 4), new Object[] { new ItemStack(ModItems.ammo_arty, 1, 2), ModItems.boy_bullet, ModItems.boy_target, ModItems.boy_shielding, ModItems.circuit_red_copper, ModItems.ducttape });
//DGK Belts

View File

@ -5,16 +5,17 @@ import org.lwjgl.opengl.GL11;
import com.hbm.handler.ArmorModHandler;
import com.hbm.inventory.container.ContainerArmorTable;
import com.hbm.lib.RefStrings;
import com.hbm.util.I18nUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIArmorTable extends GuiContainer {
public class GUIArmorTable extends GuiInfoContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_armor_modifier.png");
public int left;
@ -29,6 +30,35 @@ public class GUIArmorTable extends GuiContainer {
guiLeft = (this.width - this.xSize) / 2;
guiTop = (this.height - this.ySize) / 2;
}
@Override
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
if(this.mc.thePlayer.inventory.getItemStack() == null) {
String[] unloc = new String[] {
"armorMod.type.helmet",
"armorMod.type.chestplate",
"armorMod.type.leggings",
"armorMod.type.boots",
"armorMod.type.servo",
"armorMod.type.cladding",
"armorMod.type.insert",
"armorMod.type.special",
"armorMod.insertHere"
};
for(int i = 0; i < 9; ++i) {
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
if(this.isMouseOverSlot(slot, x, y) && !slot.getHasStack()) {
this.drawCreativeTabHoveringText((i < 8 ? EnumChatFormatting.LIGHT_PURPLE : EnumChatFormatting.YELLOW) + I18nUtil.resolveKey(unloc[i]), x, y);
}
}
}
}
protected void drawGuiContainerForegroundLayer(int mX, int mY) {
@ -51,6 +81,10 @@ public class GUIArmorTable extends GuiContainer {
this.drawTexturedModalRect(guiLeft + 41, guiTop + 60, 176, 74, 22, 22);
else
this.drawTexturedModalRect(guiLeft + 41, guiTop + 60, 176, 52, 22, 22);
} else {
if(System.currentTimeMillis() % 1000 < 500)
this.drawTexturedModalRect(guiLeft + 41, guiTop + 60, 176, 52, 22, 22);
}
for(int i = 0; i < 8; i++) {

View File

@ -11,6 +11,7 @@ import com.hbm.packet.AuxButtonPacket;
import com.hbm.packet.NBTControlPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
import com.hbm.util.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -53,6 +54,13 @@ public abstract class GUITurretBase extends GuiInfoContainer {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 45, 16, 52, turret.power, turret.getMaxPower());
String on = EnumChatFormatting.GREEN + I18nUtil.resolveKey("turret.on");
String off = EnumChatFormatting.RED + I18nUtil.resolveKey("turret.off");
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 8, guiTop + 30, 10, 10, mouseX, mouseY, I18nUtil.resolveKeyArray("turret.players", turret.targetPlayers ? on : off));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 22, guiTop + 30, 10, 10, mouseX, mouseY, I18nUtil.resolveKeyArray("turret.animals", turret.targetAnimals ? on : off));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 36, guiTop + 30, 10, 10, mouseX, mouseY, I18nUtil.resolveKeyArray("turret.mobs", turret.targetMobs ? on : off));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 50, guiTop + 30, 10, 10, mouseX, mouseY, I18nUtil.resolveKeyArray("turret.machines", turret.targetMachines ? on : off));
}
protected void mouseClicked(int x, int y, int i) {
@ -153,7 +161,7 @@ public abstract class GUITurretBase extends GuiInfoContainer {
List<String> names = turret.getWhitelist();
String n = EnumChatFormatting.ITALIC + "None";
String n = EnumChatFormatting.ITALIC + I18nUtil.resolveKey("turret.none");
while(this.index >= this.getCount())
this.index--;

View File

@ -1252,7 +1252,7 @@ public class AssemblerRecipes {
public static void saveTemplateJSON(File dir) {
template = new File(dir.getAbsolutePath() + File.separatorChar + "hbmTemplate.json");
template = new File(dir.getAbsolutePath() + File.separatorChar + "_hbmAssembler.json");
try {

View File

@ -2,6 +2,9 @@ package com.hbm.items.machine;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -9,6 +12,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
@ -116,7 +120,7 @@ public class ItemCassette extends Item {
if(!(stack.getItem() instanceof ItemCassette))
return;
list.add("[CREATED USING TEMPLATE FOLDER]");
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
list.add("");
list.add("Siren sound cassette:");

View File

@ -25,7 +25,7 @@ public class ItemTemplateFolder extends Item {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
String[] lang = I18nUtil.resolveKeyArray(this.getUnlocalizedName() + ".desc");
String[] lang = I18nUtil.resolveKeyArray(ModItems.template_folder.getUnlocalizedName() + ".desc");
for(String line : lang) {
list.add(line);
}

View File

@ -102,10 +102,16 @@ public class ItemAmmoArty extends Item {
list.add(r + "Phosphorus splash");
list.add(b + "Does not destroy blocks");
break;
case PHOSPHORUS_MULTI:
list.add(r + "Splits x10");
break;
case MINI_NUKE:
list.add(y + "Strength: 20");
list.add(r + "Deals nuclear damage");
list.add(r + "Destroys blocks");
case MINI_NUKE_MULTI:
list.add(r + "Splits x5");
break;
case NUKE:
list.add(r + "");
list.add(r + "(that is the best skull and crossbones");

View File

@ -28,7 +28,6 @@ public class ItemGunBio extends ItemGunBase {
@Override
public void startActionClient(ItemStack stack, World world, EntityPlayer player, boolean main) {
lastShot = System.currentTimeMillis();
}
@Override
@ -57,7 +56,7 @@ public class ItemGunBio extends ItemGunBase {
}
double alpha = (System.currentTimeMillis() - ItemGunBio.lastShot) / 2000D;
alpha = (1 - alpha) * 0.35D;
alpha = (1 - alpha) * 0.5D;
if(this.getReloadCycle(stack) > 0) alpha = 0;
@ -71,7 +70,9 @@ public class ItemGunBio extends ItemGunBase {
//GunConfiguration config = ((ItemGunBase) stack.getItem()).mainConfig;
//return config.animations.get(type);
if(type == AnimType.CYCLE) return new BusAnimation()
if(type == AnimType.CYCLE) {
lastShot = System.currentTimeMillis();
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 50))
.addKeyframe(new BusAnimationKeyframe(0, 0, -3, 50))
@ -85,20 +86,22 @@ public class ItemGunBio extends ItemGunBase {
.addBus("DRUM", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 50))
);
}
if(type == AnimType.RELOAD) return new BusAnimation()
.addBus("LATCH", new BusAnimationSequence()
if(type == AnimType.RELOAD) {
return new BusAnimation()
.addBus("LATCH", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 90, 300))
.addKeyframe(new BusAnimationKeyframe(0, 0, 90, 2000))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 150))
)
.addBus("FRONT", new BusAnimationSequence()
.addBus("FRONT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
.addKeyframe(new BusAnimationKeyframe(0, 0, 45, 150))
.addKeyframe(new BusAnimationKeyframe(0, 0, 45, 2000))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
)
.addBus("RELOAD_ROT", new BusAnimationSequence()
.addBus("RELOAD_ROT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300))
.addKeyframe(new BusAnimationKeyframe(60, 0, 0, 500))
.addKeyframe(new BusAnimationKeyframe(60, 0, 0, 500))
@ -110,16 +113,17 @@ public class ItemGunBio extends ItemGunBase {
.addKeyframe(new BusAnimationKeyframe(-45, 0, 0, 100))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300))
)
.addBus("RELOAD_MOVE", new BusAnimationSequence()
.addBus("RELOAD_MOVE", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300))
.addKeyframe(new BusAnimationKeyframe(0, -15, 0, 1000))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 450))
)
.addBus("DRUM_PUSH", new BusAnimationSequence()
.addBus("DRUM_PUSH", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 1600))
.addKeyframe(new BusAnimationKeyframe(0, 0, -5, 0))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300))
);
}
return null;
}

View File

@ -34,8 +34,8 @@ public class ItemRenderBioRevolver implements IItemRenderer {
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bio_revolver_tex);
@ -48,14 +48,16 @@ public class ItemRenderBioRevolver implements IItemRenderer {
GL11.glTranslated(1.0, 0.25, -0.25);
GL11.glRotated(80, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double width = 0.3D;
double width = 0.5D;
GL11.glPushMatrix();
GL11.glTranslated(0.0, 2.0, 10.0);
GL11.glTranslated(0.0, 1.75, 10.0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(0, -recoil[2] * 1.5, recoil[2]);
GL11.glShadeModel(GL11.GL_SMOOTH);
if(ItemGunBio.smokeNodes.size() > 1) {
Tessellator tess = Tessellator.instance;
@ -67,11 +69,22 @@ public class ItemRenderBioRevolver implements IItemRenderer {
double[] past = ItemGunBio.smokeNodes.get(i + 1);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0] - width, node[1], node[2]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0] + width, node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0] + width, past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0] - width, node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0] - width, past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
}
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
GL11.glEnable(GL11.GL_BLEND);
@ -93,8 +106,6 @@ public class ItemRenderBioRevolver implements IItemRenderer {
GL11.glRotated(reloadRot[0], 1, 0, 0);
GL11.glRotated(reloadRot[2], 0, 0, 1);
GL11.glRotated(reloadRot[1], 0, 1, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.bio_revolver.renderPart("Grip");
GL11.glPushMatrix(); /// FRONT PUSH ///
@ -130,19 +141,21 @@ public class ItemRenderBioRevolver implements IItemRenderer {
case EQUIPPED:
double scale = 0.125D;
double scale = 0.1D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(10, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(4F, -2F, 5F);
GL11.glTranslatef(4F, 1F, 4F);
break;
case ENTITY:
double s1 = 0.1D;
double s1 = 0.075D;
GL11.glScaled(s1, s1, s1);
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0F, 1F, 0F);
break;

View File

@ -109,12 +109,13 @@ armorMod.boots=Stiefel
armorMod.chestplates=Brustplatten
armorMod.helmets=Helme
armorMod.leggings=Beinschienen
armorMod.insertHere=Rüstung zum Modifizieren einlegen...
armorMod.type.boots=Stiefel
armorMod.type.chestplate=Brustplatte
armorMod.type.cladding=Beschläge
armorMod.type.helmet=Helm
armorMod.type.insert=Einlage
armorMod.type.leggins=Beinschienen
armorMod.type.leggings=Beinschienen
armorMod.type.servo=Servos
armorMod.type.special=Spezial
@ -700,8 +701,10 @@ item.ammo_arty.name=16" Artilleriegranate
item.ammo_arty_classic.name=16" Artilleriegranate (Das Factorio-Spezial)
item.ammo_arty_he.name=16" Artilleriegranate (HE)
item.ammo_arty_mini_nuke.name=16" Mikroatomgranate
item.ammo_arty_mini_nuke_multi.name=16" Mehrfach-Mikroatomgranate
item.ammo_arty_nuke.name=16" Atomare Artilleriegranate
item.ammo_arty_phosphorus.name=16" Phosphor-Artilleriegranate
item.ammo_arty_phosphorus_multi.name=16" Mehrfach-Phosphor-Artilleriegranate
item.ammo_cell.name=Energiezelle
item.ammo_container.name=Munitionsbehälter
item.ammo_dart.name=Plastikdart (Withernd)
@ -1505,6 +1508,7 @@ item.gun_b92_ammo.name=§9B92-Energiezelle§r
item.gun_b93.name=§cB93 Energiemod§r
item.gun_bf.name=BEL
item.gun_bf_ammo.name=Balefire-Geschoss
item.gun_bio_revolver.name=Atlas
item.gun_bolt_action.name=Dream-Repetiergewehr (Original)
item.gun_bolt_action_ammo.name=12x74 Brenneke (LEGACY)
item.gun_bolt_action_green.name=Dream-Repetiergewehr (Grün)
@ -3813,6 +3817,14 @@ tool.ability.shredder=Auto-Brecher
tool.ability.silktouch=Behutsamkeit
tool.ability.smelter=Auto-Ofen
turret.animals=Passive anzielen: %s
turret.machines=Maschinen anzielen: %s
turret.mobs=Mobs anzielen: %s
turret.none=Keine
turret.off=AUS
turret.on=AN
turret.players=Spieler anzielen: %s
wavelengths.name.ir=Infrarot
wavelengths.name.visible=Sichtbares Licht
wavelengths.name.uv=Ultraviolett

View File

@ -153,13 +153,14 @@ armorMod.applicableTo=Applicable To:
armorMod.boots=Boots
armorMod.chestplates=Chestplates
armorMod.helmets=Helmets
armorMod.insertHere=Insert armor to modify...
armorMod.leggings=Leggings
armorMod.type.boots=Boots
armorMod.type.chestplate=Chestplate
armorMod.type.cladding=Cladding
armorMod.type.helmet=Helmet
armorMod.type.insert=Insert
armorMod.type.leggins=Leggings
armorMod.type.leggings=Leggings
armorMod.type.servo=Servos
armorMod.type.special=Special
@ -914,8 +915,10 @@ item.ammo_arty.name=16" Artillery Shell
item.ammo_arty_classic.name=16" Artillery Shell (The Factorio Special)
item.ammo_arty_he.name=16" High Explosive Artillery Shell
item.ammo_arty_mini_nuke.name=16" Micro Nuclear Artillery Shell
item.ammo_arty_mini_nuke_multi.name=16" Multi Micro Nuclear Artillery Shell
item.ammo_arty_nuke.name=16" Nuclear Artillery Shell
item.ammo_arty_phosphorus.name=16" Phosphorus Shell
item.ammo_arty_phosphorus_multi.name=16" Multi Phosphorus Shell
item.ammo_cell.name=Energy Cell
item.ammo_container.name=Ammo Container
item.ammo_dart.name=Plastic Dart (Withering)
@ -1757,6 +1760,7 @@ item.gun_b92_ammo.name=§9B92 Energy Cell§r
item.gun_b93.name=§cB93 Energy Mod§r
item.gun_bf.name=BEL
item.gun_bf_ammo.name=Balefire Shell
item.gun_bio_revolver.name=Atlas
item.gun_bolt_action.name=Dream Bolt-Action Rifle (Original)
item.gun_bolt_action_ammo.name=12x74 Slug (LEGACY)
item.gun_bolt_action_green.name=Dream Bolt-Action Rifle (Green)
@ -4226,6 +4230,14 @@ tool.ability.shredder=Auto-Shredder
tool.ability.silktouch=Silk Touch
tool.ability.smelter=Auto-Smelter
turret.animals=Target Passive: %s
turret.machines=Target Machines: %s
turret.mobs=Target Mobs: %s
turret.none=None
turret.off=OFF
turret.on=ON
turret.players=Target Players: %s
wavelengths.name.ir=Infrared
wavelengths.name.visible=Visible Light
wavelengths.name.uv=Ultraviolet

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB