diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index cd3eefb0e..3fdee7ead 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -194,6 +194,9 @@ tile.turret_rocket.name=Raketengeschütz tile.turret_flamer.name=Flammenwerfergeschütz tile.turret_tau.name=Tauonengeschütz tile.turret_spitfire.name=Geschütz für das ich noch keinen Namen habe [WIP] +tile.turret_cwis.name=Phalanx Mk-15 CWIS +tile.machine_radar.name=Raketenradar +container.radar=Raketenradar item.turret_control.name=Geschützsteuerung item.turret_chip.name=Geschütz-KI-Chip @@ -384,6 +387,7 @@ tile.test_nuke.name=Test Atombombe item.ingot_uranium.name=Uranbarren item.ingot_u235.name=U235-Barren item.ingot_u238.name=U238-Barren +item.ingot_u238m2.name=Metastabiler U238/2-Barren item.ingot_plutonium.name=Plutoniumbarren item.ingot_pu238.name=Pu238-Barren item.ingot_pu239.name=Pu239-Barren @@ -1081,6 +1085,9 @@ item.syringe_metal_medx.name=Med-X item.syringe_metal_psycho.name=Psycho item.pill_iodine.name=Iodpille item.plan_c.name=Plan C +item.med_ipecac.name=Ipecac-Sirup +item.med_ptsd.name=PTBS-Medikament +item.med_schiziphrenia.name=Schizophrenie-Medikament item.stealth_boy.name=Mobile Tarnkappe diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 2b6cb5c32..81491e344 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -205,6 +205,9 @@ tile.turret_rocket.name=Rocket Turret tile.turret_flamer.name=Flamethrower Turret tile.turret_tau.name=Tauon Turret tile.turret_spitfire.name=Turret I have no name for right now [WIP] +tile.turret_cwis.name=Phalanx Mk-15 CWIS +tile.machine_radar.name=Missile Radar +container.radar=Missile Radar item.turret_control.name=Turret Controller item.turret_chip.name=Turret AI-Chip @@ -384,6 +387,7 @@ tile.test_nuke.name=Test Nuke item.ingot_uranium.name=Uranium Ingot item.ingot_u235.name=U235 Ingot item.ingot_u238.name=U238 Ingot +item.ingot_u238m2.name=Metastable U238-2 Ingot item.ingot_plutonium.name=Plutonium Ingot item.ingot_pu238.name=Pu238 Ingot item.ingot_pu239.name=Pu239 Ingot @@ -1084,6 +1088,9 @@ item.syringe_metal_medx.name=Med-X item.syringe_metal_psycho.name=Psycho item.pill_iodine.name=Iodine Pill item.plan_c.name=Plan C +item.med_ipecac.name=Ipecac Syrup +item.med_ptsd.name=PTSD Medication +item.med_schiziphrenia.name=Schizophrenia Medication item.stealth_boy.name=Stealth Device diff --git a/assets/hbm/textures/items/med_ipecac.png b/assets/hbm/textures/items/med_ipecac.png new file mode 100644 index 000000000..f6011aeef Binary files /dev/null and b/assets/hbm/textures/items/med_ipecac.png differ diff --git a/assets/hbm/textures/items/med_ipecac_new.png b/assets/hbm/textures/items/med_ipecac_new.png new file mode 100644 index 000000000..79839b96a Binary files /dev/null and b/assets/hbm/textures/items/med_ipecac_new.png differ diff --git a/assets/hbm/textures/items/med_ptsd.png b/assets/hbm/textures/items/med_ptsd.png new file mode 100644 index 000000000..32070af1b Binary files /dev/null and b/assets/hbm/textures/items/med_ptsd.png differ diff --git a/assets/hbm/textures/items/med_ptsd_new.png b/assets/hbm/textures/items/med_ptsd_new.png new file mode 100644 index 000000000..74f0423d8 Binary files /dev/null and b/assets/hbm/textures/items/med_ptsd_new.png differ diff --git a/assets/hbm/textures/items/med_schizophrenia.png b/assets/hbm/textures/items/med_schizophrenia.png new file mode 100644 index 000000000..5dd249e4f Binary files /dev/null and b/assets/hbm/textures/items/med_schizophrenia.png differ diff --git a/assets/hbm/textures/items/med_schizophrenia_new.png b/assets/hbm/textures/items/med_schizophrenia_new.png new file mode 100644 index 000000000..e5c3f8120 Binary files /dev/null and b/assets/hbm/textures/items/med_schizophrenia_new.png differ diff --git a/assets/hbm/textures/models/radar_base.png b/assets/hbm/textures/models/radar_base.png new file mode 100644 index 000000000..e87d6bb2f Binary files /dev/null and b/assets/hbm/textures/models/radar_base.png differ diff --git a/assets/hbm/textures/models/radar_head.png b/assets/hbm/textures/models/radar_head.png new file mode 100644 index 000000000..5f5b752da Binary files /dev/null and b/assets/hbm/textures/models/radar_head.png differ diff --git a/com/hbm/blocks/machine/MachineRadar.java b/com/hbm/blocks/machine/MachineRadar.java index e8aeaec47..2af67732b 100644 --- a/com/hbm/blocks/machine/MachineRadar.java +++ b/com/hbm/blocks/machine/MachineRadar.java @@ -67,7 +67,7 @@ public class MachineRadar extends BlockContainer { public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int m) { TileEntityMachineRadar entity = (TileEntityMachineRadar) world.getTileEntity(x, y, z); - return (!entity.nearbyMissiles.isEmpty()) ? 15 : 0; + return entity.getRedPower(); } public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m) diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index f867c28ac..00d793fa9 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -764,6 +764,10 @@ public class ModItems { public static Item lemon; public static Item definitelyfood; + public static Item med_ipecac; + public static Item med_ptsd; + public static Item med_schizophrenia; + public static Item flame_pony; public static Item flame_conspiracy; public static Item flame_politics; @@ -1851,6 +1855,9 @@ public class ModItems { glowing_stew = new ItemSoup(6).setUnlocalizedName("glowing_stew").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":glowing_stew"); lemon = new ItemLemon(3, 5, false).setUnlocalizedName("lemon").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":lemon"); definitelyfood = new ItemLemon(2, 5, false).setUnlocalizedName("definitelyfood").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":definitelyfood"); + med_ipecac = new ItemLemon(0, 0, false).setUnlocalizedName("med_ipecac").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":med_ipecac_new"); + med_ptsd = new ItemLemon(0, 0, false).setUnlocalizedName("med_ptsd").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":med_ptsd_new"); + med_schizophrenia = new ItemLemon(0, 0, false).setUnlocalizedName("med_schizophrenia").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":med_schizophrenia_new"); flame_pony = new ItemCustomLore().setUnlocalizedName("flame_pony").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":flame_pony"); flame_conspiracy = new ItemCustomLore().setUnlocalizedName("flame_conspiracy").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":flame_conspiracy"); @@ -3221,6 +3228,9 @@ public class ModItems { GameRegistry.registerItem(glowing_stew, glowing_stew.getUnlocalizedName()); GameRegistry.registerItem(lemon, lemon.getUnlocalizedName()); GameRegistry.registerItem(definitelyfood, definitelyfood.getUnlocalizedName()); + GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName()); + GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName()); + //GameRegistry.registerItem(med_schizophrenia, med_schizophrenia.getUnlocalizedName()); //Energy Drinks GameRegistry.registerItem(can_empty, can_empty.getUnlocalizedName()); diff --git a/com/hbm/items/food/ItemLemon.java b/com/hbm/items/food/ItemLemon.java index 7c2ab5555..49db68996 100644 --- a/com/hbm/items/food/ItemLemon.java +++ b/com/hbm/items/food/ItemLemon.java @@ -7,6 +7,9 @@ import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; public class ItemLemon extends ItemFood { @@ -29,6 +32,40 @@ public class ItemLemon extends ItemFood { list.add(""); list.add("Have some edible dirt."); } + + if(this == ModItems.med_ipecac) { + list.add("Bitter juice that will cause your stomach"); + list.add("to forcefully eject it's contents."); + } + + if(this == ModItems.med_ptsd) { + list.add("I don't get why I have to take PTSD mediaction"); + list.add("and Vee doesn't, I mean, he saw things wayyy worse"); + list.add("and he got away with it. This isn't even PTSD"); + list.add("mediaction, it's just Ipecac in a different bottle!"); + } + + if(this == ModItems.med_schizophrenia) { + list.add("Makes the voices go away. Just for a while."); + list.add(""); + list.add("..."); + list.add("Better not take it."); + } } + + @Override + protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) + { + if(this == ModItems.med_ipecac || this == ModItems.med_ptsd) { + player.addPotionEffect(new PotionEffect(Potion.hunger.id, 50, 49)); + } + + if(this == ModItems.med_schizophrenia) { + int o = 0; + + int z = 5 / o; + } + } + } diff --git a/com/hbm/main/ResourceManager.java b/com/hbm/main/ResourceManager.java index a7e3e5043..c252cc28e 100644 --- a/com/hbm/main/ResourceManager.java +++ b/com/hbm/main/ResourceManager.java @@ -96,6 +96,10 @@ public class ResourceManager { public static final ResourceLocation ams_emitter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_emitter.png"); public static final ResourceLocation ams_limiter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_limiter.png"); public static final ResourceLocation ams_destroyed_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_destroyed.png"); + + //Radar + public static final ResourceLocation radar_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radar_base.png"); + public static final ResourceLocation radar_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radar_head.png"); diff --git a/com/hbm/render/tileentity/RenderRadar.java b/com/hbm/render/tileentity/RenderRadar.java index 80f2ea953..fab4779cb 100644 --- a/com/hbm/render/tileentity/RenderRadar.java +++ b/com/hbm/render/tileentity/RenderRadar.java @@ -19,7 +19,7 @@ public class RenderRadar extends TileEntitySpecialRenderer { GL11.glDisable(GL11.GL_CULL_FACE); GL11.glRotatef(180, 0F, 1F, 0F); - bindTexture(ResourceManager.universal); + bindTexture(ResourceManager.radar_body_tex); ResourceManager.radar_body.renderAll(); @@ -38,7 +38,7 @@ public class RenderRadar extends TileEntitySpecialRenderer { GL11.glRotatef((System.currentTimeMillis() / 10) % 360, 0F, 1F, 0F); - bindTexture(ResourceManager.universal); + bindTexture(ResourceManager.radar_head_tex); ResourceManager.radar_head.renderAll(); GL11.glPopMatrix(); diff --git a/com/hbm/tileentity/machine/TileEntityMachineRadar.java b/com/hbm/tileentity/machine/TileEntityMachineRadar.java index a93ee5a28..47d850250 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineRadar.java +++ b/com/hbm/tileentity/machine/TileEntityMachineRadar.java @@ -10,6 +10,8 @@ import com.hbm.packet.AuxElectricityPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.TERadarPacket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; @@ -53,7 +55,7 @@ public class TileEntityMachineRadar extends TileEntity implements IConsumer { sendMissileData(); } - power -= 1000; + power -= 500; if(power < 0) power = 0; } @@ -78,6 +80,30 @@ public class TileEntityMachineRadar extends TileEntity implements IConsumer { } } + public int getRedPower() { + + if(!nearbyMissiles.isEmpty()) { + + double maxRange = range * Math.sqrt(2D); + + int power = 0; + + for(int i = 0; i < nearbyMissiles.size(); i++) { + + int[] j = nearbyMissiles.get(i); + double dist = Math.sqrt(Math.pow(j[0] - xCoord, 2) + Math.pow(j[1] - zCoord, 2)); + int p = 15 - (int)Math.floor(dist / maxRange * 15); + + if(p > power) + power = p; + } + + return power; + } + + return 0; + } + private void sendMissileData() { for(int[] e : this.nearbyMissiles) { @@ -103,4 +129,16 @@ public class TileEntityMachineRadar extends TileEntity implements IConsumer { public long getMaxPower() { return maxPower; } + + @Override + public AxisAlignedBB getRenderBoundingBox() { + return TileEntity.INFINITE_EXTENT_AABB; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() + { + return 65536.0D; + } }