Skip to content

Commit

Permalink
deagle
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Feb 27, 2019
1 parent b90ecc1 commit 7383218
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/hbm/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,7 @@ item.gun_revolver_pip.name=Lil' Pipsqueak
item.gun_revolver_nopip.name=Novac
item.gun_revolver_blackjack.name=Blackjack Five-Shooter
item.gun_revolver_red.name=Roter Schlüssel-Revolver
item.gun_deagle.name=Großes Eisen
item.gun_calamity.name=Calamity
item.gun_minigun.name=CZ53 Persönliche Minigun
item.gun_avenger.name=CZ57 Avenger-Minigun
Expand Down
1 change: 1 addition & 0 deletions assets/hbm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,7 @@ item.gun_revolver_pip.name=Lil' Pipsqueak
item.gun_revolver_nopip.name=Novac
item.gun_revolver_blackjack.name=Blackjack Five-Shooter
item.gun_revolver_red.name=Red Key Revolver
item.gun_deagle.name=Big Iron
item.gun_calamity.name=Calamity
item.gun_calamity_dual.name=Saddle Gun
item.gun_minigun.name=CZ53 Personal Minigun
Expand Down
Binary file added assets/hbm/textures/items/gun_deagle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions com/hbm/handler/BulletConfigSyncingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public ConfigKeyPair(BulletConfiguration c, int i) {
public static final int R5_NORMAL_BOLT = 0x93;
public static final int R5_EXPLOSIVE_BOLT = 0x94;
public static final int R5_DU_BOLT = 0x95;

public static final int AE50_NORMAL = 0xA0;
public static final int AE50_AP = 0xA1;
public static final int AE50_DU = 0xA2;

public static void loadConfigsForSync() {

Expand Down Expand Up @@ -160,6 +164,10 @@ public static void loadConfigsForSync() {
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_NORMAL_BOLT));
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmExplosiveConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_EXPLOSIVE_BOLT));
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmDUConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_DU_BOLT));

configSet.add(new ConfigKeyPair(Gun50AEFactory.get50AEConfig(), AE50_NORMAL));
configSet.add(new ConfigKeyPair(Gun50AEFactory.get50APConfig(), AE50_AP));
configSet.add(new ConfigKeyPair(Gun50AEFactory.get50DUConfig(), AE50_DU));
}

public static BulletConfiguration pullConfig(int key) {
Expand Down
95 changes: 95 additions & 0 deletions com/hbm/handler/guncfg/Gun50AEFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
package com.hbm.handler.guncfg;

import java.util.ArrayList;

import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.ModItems;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;

public class Gun50AEFactory {

public static GunConfiguration getBaseConfig() {

GunConfiguration config = new GunConfiguration();

config.rateOfFire = 10;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_MANUAL;
config.hasReloadAnim = false;
config.hasFiringAnim = false;
config.hasSpinup = false;
config.hasSpindown = false;
config.reloadDuration = 10;
config.firingDuration = 0;
config.ammoCap = 7;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CLASSIC;
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
config.firingSound = "hbm:weapon.revolverShootAlt";

return config;
}

public static GunConfiguration getDeagleConfig() {

GunConfiguration config = getBaseConfig();

config.durability = 2500;

config.name = "IMI Desert Eagle";
config.manufacturer = " Magnum Research / Israel Military Industries";

config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.AE50_NORMAL);
config.config.add(BulletConfigSyncingUtil.AE50_AP);
config.config.add(BulletConfigSyncingUtil.AE50_DU);

return config;
}

static float inaccuracy = 0.0005F;
public static BulletConfiguration get50AEConfig() {

BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();

bullet.ammo = ModItems.ammo_50ae;
bullet.spread *= inaccuracy;
bullet.dmgMin = 15;
bullet.dmgMax = 18;

return bullet;
}

public static BulletConfiguration get50APConfig() {

BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();

bullet.ammo = ModItems.ammo_50ae_ap;
bullet.spread *= inaccuracy;
bullet.dmgMin = 20;
bullet.dmgMax = 22;
bullet.leadChance = 10;
bullet.wear = 15;

return bullet;
}

public static BulletConfiguration get50DUConfig() {

BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();

bullet.ammo = ModItems.ammo_50ae_du;
bullet.spread *= inaccuracy;
bullet.dmgMin = 24;
bullet.dmgMax = 28;
bullet.leadChance = 50;
bullet.wear = 25;

return bullet;
}

}
4 changes: 4 additions & 0 deletions com/hbm/items/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.hbm.handler.guncfg.Gun22LRFactory;
import com.hbm.handler.guncfg.Gun357MagnumFactory;
import com.hbm.handler.guncfg.Gun44MagnumFactory;
import com.hbm.handler.guncfg.Gun50AEFactory;
import com.hbm.handler.guncfg.Gun50BMGFactory;
import com.hbm.handler.guncfg.Gun5mmFactory;
import com.hbm.handler.guncfg.Gun9mmFactory;
Expand Down Expand Up @@ -906,6 +907,7 @@ public static void mainRegistry()
public static Item gun_revolver_blackjack;
public static Item gun_revolver_red;
public static Item gun_revolver_nopip_ammo;
public static Item gun_deagle;
public static Item gun_calamity;
public static Item gun_calamity_dual;
public static Item gun_calamity_ammo;
Expand Down Expand Up @@ -2378,6 +2380,7 @@ public static void initializeItem()
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setMaxDamage(1000).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setMaxDamage(1000).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
gun_revolver_red = new ItemGunBase(Gun44MagnumFactory.getRedConfig()).setMaxDamage(1000).setUnlocalizedName("gun_revolver_red").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_red");
gun_deagle = new ItemGunBase(Gun50AEFactory.getDeagleConfig()).setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
gun_calamity = new ItemGunBase(Gun50BMGFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
gun_calamity_dual = new ItemGunBase(Gun50BMGFactory.getSaddleConfig()).setUnlocalizedName("gun_calamity_dual").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_dual");
Expand Down Expand Up @@ -3976,6 +3979,7 @@ private static void registerItem() {
GameRegistry.registerItem(gun_revolver_nopip, gun_revolver_nopip.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_blackjack, gun_revolver_blackjack.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_red, gun_revolver_red.getUnlocalizedName());
GameRegistry.registerItem(gun_deagle, gun_deagle.getUnlocalizedName());
GameRegistry.registerItem(gun_calamity, gun_calamity.getUnlocalizedName());
GameRegistry.registerItem(gun_calamity_dual, gun_calamity_dual.getUnlocalizedName());
GameRegistry.registerItem(gun_minigun, gun_minigun.getUnlocalizedName());
Expand Down
1 change: 1 addition & 0 deletions com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ public static void reg2() {
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.nuclear_waste, 'G', Items.gunpowder }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.trinitite, 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSM", " RW", 'S', ModBlocks.block_schrabidium, 'W', "ingotTungsten", 'R', ModItems.wire_schrabidium, 'M', ModItems.mechanism_special }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_deagle, 1), new Object[] { "PPM", " BI", 'P', "plateSteel", 'B', ModItems.bolt_tungsten, 'I', "ingotPolymer", 'M', ModItems.mechanism_rifle_1 }));
//GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 16), new Object[] { "L", "N", "S", 'L', ModItems.plate_schrabidium, 'S', Items.gunpowder, 'N', Items.nether_star });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium", 'M', ModItems.mechanism_revolver_2 }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 32), new Object[] { "L", "L", 'L', "plateSteel", 'S', Items.gunpowder }));
Expand Down

0 comments on commit 7383218

Please sign in to comment.