good god, we gonna rock down to electric avenue
@ -9,6 +9,7 @@
|
||||
* Explosive .50 BMG
|
||||
* Explosive 10 gauge buckshot (unlike 12 gauge which has explosive slugs)
|
||||
* Lincoln's repeater, a b-side to the lever action rifle
|
||||
* Weapon modification table
|
||||
|
||||
## Changed
|
||||
* Fat mines now use the standardized mini nuke code
|
||||
@ -29,6 +30,7 @@
|
||||
* Removed the crafting recipe for the small geothermal generator and ZPE generators
|
||||
* Removed the gemothermal, ZPE and ambient radiation generators from the creative menu
|
||||
* Disabled the horrid flicker on the quad rocket launcher's antenna, making steered mode look less terrible
|
||||
* All non-legendary .357 revolvers now fire a quarter of a second faster
|
||||
|
||||
## Fixed
|
||||
* Fixed animation errors on the MAS-36
|
||||
@ -40,4 +42,5 @@
|
||||
* Potentially fixed another issue regarding NPCs firing belt-fed guns
|
||||
* Chunk-loading drones may or may not be fixed
|
||||
* Fixed disperser canisters not actually despawning on impact, endlessly spawning mist clouds
|
||||
* Fixed issues where the new packet system didn't play nice with machines that are being sent packets by other machines, like watz segments and radar screens
|
||||
* Fixed issues where the new packet system didn't play nice with machines that are being sent packets by other machines, like watz segments and radar screens
|
||||
* Fixed fat man's piston not being extended correctly in non-first person rendering when unloaded
|
||||
@ -29,9 +29,9 @@ public class BlockWeaponTable extends Block implements IGUIProvider {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_top");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_bottom");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_side");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_top");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_bottom");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -31,6 +31,9 @@ public class WeaponRecipes {
|
||||
|
||||
public static void register() {
|
||||
|
||||
//Weapon mod table
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.machine_weapon_table, 1), new Object[] { "PPP", "TCT", "TST", 'P', GUNMETAL.plate(), 'T', STEEL.ingot(), 'C', Blocks.crafting_table, 'S', STEEL.block() });
|
||||
|
||||
//SEDNA Parts
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.part_stock, 1, Mats.MAT_WOOD.id), new Object[] { "WWW", " W", 'W', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.part_grip, 1, Mats.MAT_WOOD.id), new Object[] { "W ", " W", " W", 'W', KEY_PLANKS });
|
||||
|
||||
@ -1507,6 +1507,8 @@ public class ModItems {
|
||||
public static Item ammo_secret;
|
||||
|
||||
public static Item weapon_mod_test;
|
||||
public static Item weapon_mod_generic;
|
||||
public static Item weapon_mod_special;
|
||||
|
||||
public static Item crucible;
|
||||
|
||||
@ -6489,6 +6491,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(weapon_mod_test, weapon_mod_test.getUnlocalizedName());
|
||||
GameRegistry.registerItem(weapon_mod_generic, weapon_mod_generic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(weapon_mod_special, weapon_mod_special.getUnlocalizedName());
|
||||
|
||||
//Ammo
|
||||
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
package com.hbm.items.weapon.sedna;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.interfaces.IItemHUD;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.gui.GUIWeaponTable;
|
||||
import com.hbm.items.IEquipReceiver;
|
||||
import com.hbm.items.IKeybindReceiver;
|
||||
import com.hbm.items.weapon.sedna.hud.IHUDComponent;
|
||||
@ -49,6 +54,10 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
public double shotRand = 0D;
|
||||
|
||||
public static List<Item> secrets = new ArrayList();
|
||||
public List<ComparableStack> recognizedMods = new ArrayList();
|
||||
|
||||
public static final DecimalFormatSymbols SYMBOLS_US = new DecimalFormatSymbols(Locale.US);
|
||||
public static final DecimalFormat FORMAT_DMG = new DecimalFormat("#.##", SYMBOLS_US);
|
||||
|
||||
public static float recoilVertical = 0;
|
||||
public static float recoilHorizontal = 0;
|
||||
@ -144,10 +153,10 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
list.add("Ammo: " + mag.getIconForHUD(stack, player).getDisplayName() + " " + mag.reportAmmoStateForHUD(stack, player));
|
||||
float dmg = rec.getBaseDamage(stack);
|
||||
list.add("Base Damage: " + dmg);
|
||||
list.add("Base Damage: " + FORMAT_DMG.format(dmg));
|
||||
if(mag.getType(stack, player.inventory) instanceof BulletConfig) {
|
||||
BulletConfig bullet = (BulletConfig) mag.getType(stack, player.inventory);
|
||||
list.add("Damage with current ammo: " + dmg * bullet.damageMult + (bullet.projectilesMin > 1 ? (" x" + (bullet.projectilesMin != bullet.projectilesMax ? (bullet.projectilesMin + "-" + bullet.projectilesMax) : bullet.projectilesMin)) : ""));
|
||||
list.add("Damage with current ammo: " + FORMAT_DMG.format(dmg * bullet.damageMult) + (bullet.projectilesMin > 1 ? (" x" + (bullet.projectilesMin != bullet.projectilesMax ? (bullet.projectilesMin + "-" + bullet.projectilesMax) : bullet.projectilesMin)) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,6 +173,11 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
case SECRET: list.add((BobMathUtil.getBlink() ? EnumChatFormatting.DARK_RED : EnumChatFormatting.RED) + "SECRET"); break;
|
||||
case DEBUG: list.add((BobMathUtil.getBlink() ? EnumChatFormatting.YELLOW : EnumChatFormatting.GOLD) + "DEBUG"); break;
|
||||
}
|
||||
|
||||
if(Minecraft.getMinecraft().currentScreen instanceof GUIWeaponTable) {
|
||||
list.add(EnumChatFormatting.RED + "Accepts:");
|
||||
for(ComparableStack comp : this.recognizedMods) list.add(EnumChatFormatting.RED + " " + comp.toStack().getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -67,7 +67,9 @@ public class GunFactory {
|
||||
XFactory10ga.init();
|
||||
XFactory35800.init();
|
||||
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test");
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test").setMaxStackSize(1);
|
||||
ModItems.weapon_mod_generic = new ItemEnumMulti(EnumModGeneric.class, true, true).setUnlocalizedName("weapon_mod_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
ModItems.weapon_mod_special = new ItemEnumMulti(EnumModSpecial.class, true, true).setUnlocalizedName("weapon_mod_special").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
@ -93,7 +95,8 @@ public class GunFactory {
|
||||
COIL_TUNGSTEN, COIL_FERROURANIUM,
|
||||
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
|
||||
G10, G10_SHRAPNEL, G10_DU, G10_SLUG,
|
||||
R762_HE, BMG50_HE, G10_EXPLOSIVE
|
||||
R762_HE, BMG50_HE, G10_EXPLOSIVE,
|
||||
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
||||
|
||||
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
|
||||
;
|
||||
@ -105,6 +108,7 @@ public class GunFactory {
|
||||
M44_BP, M44_SP, M44_FMJ, M44_JHP, M44_AP, M44_EXPRESS,
|
||||
P22_SP, P22_FMJ, P22_JHP, P22_AP,
|
||||
P9_SP, P9_FMJ, P9_JHP, P9_AP,
|
||||
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
||||
R556_SP, R556_FMJ, R556_JHP, R556_AP,
|
||||
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU, R762_HE,
|
||||
BMG50_SP, BMG50_FMJ, BMG50_JHP, BMG50_AP, BMG50_DU, BMG50_HE,
|
||||
@ -135,4 +139,22 @@ public class GunFactory {
|
||||
public static enum EnumModTest {
|
||||
FIRERATE, DAMAGE, MULTI;
|
||||
}
|
||||
|
||||
public static enum EnumModGeneric {
|
||||
IRON_DAMAGE, IRON_DURA,
|
||||
STEEL_DAMAGE, STEEL_DURA,
|
||||
DURA_DAMAGE, DURA_DURA,
|
||||
DESH_DAMAGE, DESH_DURA,
|
||||
WSTEEL_DAMAGE, WSTEEL_DURA,
|
||||
FERRO_DAMAGE, FERRO_DURA,
|
||||
TCALLOY_DAMAGE, TCALLOY_DURA,
|
||||
BIGMT_DAMAGE, BIGMT_DURA,
|
||||
BRONZE_DAMAGE, BRONZE_DURA,
|
||||
}
|
||||
|
||||
public static enum EnumModSpecial {
|
||||
SILENCER, SCOPE, SAW, GREASEGUN, SLOWDOWN,
|
||||
SPEEDUP, CHOKE, SPEEDLOADER,
|
||||
FURNITURE_GREEN, FURNITURE_BLACK, BAYONET
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class XFactory357 {
|
||||
ModItems.gun_light_revolver = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(7.5F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.dmg(7.5F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_bp, m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ATLAS))
|
||||
@ -51,7 +51,7 @@ public class XFactory357 {
|
||||
ModItems.gun_light_revolver_atlas = new ItemGunBaseNT(WeaponQuality.B_SIDE, new GunConfig()
|
||||
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12.5F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.dmg(12.5F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_bp, m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ATLAS))
|
||||
@ -67,7 +67,7 @@ public class XFactory357 {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DANI))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI),
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI),
|
||||
new GunConfig().dura(30_000).draw(20).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).spreadHipfire(0F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 0.9F)
|
||||
@ -76,7 +76,7 @@ public class XFactory357 {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DANI))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
).setUnlocalizedName("gun_light_revolver_dani");
|
||||
}
|
||||
|
||||
@ -94,11 +94,11 @@ public class XFactory357 {
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(0, 0, 1, 200));
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 300).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(0, 0, 1, 200));
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(0, 0, 90, 300).addPos(0, 0, 90, 2000).addPos(0, 0, 0, 150))
|
||||
.addBus("FRONT", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(0, 0, 45, 150).addPos(0, 0, 45, 2000).addPos(0, 0, 0, 75))
|
||||
@ -119,19 +119,4 @@ public class XFactory357 {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DANI_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(360 * 3, 0, 0, 1000, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 300).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
}
|
||||
|
||||
return LAMBDA_ATLAS_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
public static final String KEY_MAG_PREV = "magprev";
|
||||
public static final String KEY_MAG_AFTER = "magafter";
|
||||
|
||||
protected List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
public List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
|
||||
/** A number so the gun tell multiple mags apart */
|
||||
public int index;
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
public abstract class WeaponModBase implements IWeaponMod {
|
||||
|
||||
public static final int PRIORITY_MULTIPLICATIVE = 1_000;
|
||||
public static final int PRIORITY_ADDITIVE = 500;
|
||||
public static final int PRIORITY_MULT_FINAL = -1;
|
||||
|
||||
public String[] slots;
|
||||
public int priority = 0;
|
||||
@ -20,5 +24,5 @@ public abstract class WeaponModBase implements IWeaponMod {
|
||||
* @param Any value with the type that should be cast to
|
||||
* @return
|
||||
*/
|
||||
public <T> T fagSlop(Object arg, T castTo) { return (T) arg; } //TODO: rename this to something more tactful
|
||||
public <T> T cast(Object arg, T castTo) { return (T) arg; }
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModGenericDamage extends WeaponModBase {
|
||||
|
||||
public WeaponModGenericDamage(int id) {
|
||||
super(id, "GENERIC_DAMAGE");
|
||||
this.setPriority(PRIORITY_MULTIPLICATIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.F_BASEDAMAGE && base instanceof Float) {
|
||||
return cast((Float) base * 1.33F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModGenericDurability extends WeaponModBase {
|
||||
|
||||
public WeaponModGenericDurability(int id) {
|
||||
super(id, "GENERIC_DURABILITY");
|
||||
this.setPriority(PRIORITY_MULTIPLICATIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof GunConfig && key == GunConfig.F_DURABILITY && base instanceof Float) {
|
||||
return cast((Float) base * 2F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory12ga;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModLiberatorSpeedloader extends WeaponModBase {
|
||||
|
||||
public static MagazineFullReload MAG = new MagazineFullReload(0, 4);
|
||||
|
||||
public WeaponModLiberatorSpeedloader(int id) {
|
||||
super(id, "SPEEDLOADER");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.FUN_ANIMNATIONS) { return (T) LAMBDA_LIBERATOR_ANIMS; }
|
||||
if(parent instanceof Receiver && base instanceof IMagazine && key == Receiver.O_MAGAZINE) {
|
||||
MagazineSingleReload originalMag = (MagazineSingleReload) base;
|
||||
if(MAG.acceptedBullets.isEmpty()) MAG.acceptedBullets.addAll(originalMag.acceptedBullets);
|
||||
return (T) MAG;
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case RELOAD_END: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50).addPos(0, 0, 0, 550).addPos(15, 0, 0, 100).addPos(15, 0, 0, 600).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP).addPos(0, 0, 0, 600).addPos(45, 0, 0, 250, IType.SIN_DOWN).addPos(45, 0, 0, 300).addPos(0, 0, 0, 150, IType.SIN_UP));
|
||||
}
|
||||
|
||||
return XFactory12ga.LAMBDA_LIBERATOR_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
@ -8,6 +8,9 @@ import java.util.List;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModGeneric;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModSpecial;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModTest;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
@ -35,14 +38,80 @@ public class WeaponModManager {
|
||||
public static void init() {
|
||||
|
||||
/* ORDER MATTERS! */
|
||||
/* CTOR contains registering to the ID_LIST, avoid reordering to prevent ID shifting! */
|
||||
IWeaponMod TEST_FIRERATE = new WeaponModTestFirerate(0);
|
||||
IWeaponMod TEST_DAMAGE = new WeaponModTestDamage(1);
|
||||
IWeaponMod TEST_MULTI = new WeaponModTestMulti(2);
|
||||
/* CTOR contains registering to the idToMod, avoid reordering to prevent ID shifting! */
|
||||
/// TEST ///
|
||||
IWeaponMod TEST_FIRERATE = new WeaponModTestFirerate(0, "FIRERATE");
|
||||
IWeaponMod TEST_DAMAGE = new WeaponModTestDamage(1, "DAMAGE");
|
||||
IWeaponMod TEST_MULTI = new WeaponModTestMulti(2, "MULTI");
|
||||
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.FIRERATE.ordinal())).addDefault(TEST_FIRERATE);
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.DAMAGE.ordinal())).addDefault(TEST_DAMAGE);
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.MULTI.ordinal())).addDefault(TEST_MULTI);
|
||||
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_generic, 1, EnumModGeneric.IRON_DAMAGE.ordinal())).addMod(ModItems.gun_pepperbox, new WeaponModGenericDamage(100));
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_generic, 1, EnumModGeneric.IRON_DURA.ordinal())).addMod(ModItems.gun_pepperbox, new WeaponModGenericDurability(101));
|
||||
|
||||
Item[] steelGuns = new Item[] {
|
||||
ModItems.gun_light_revolver,
|
||||
ModItems.gun_light_revolver_atlas,
|
||||
ModItems.gun_henry,
|
||||
ModItems.gun_henry_lincoln,
|
||||
ModItems.gun_greasegun,
|
||||
ModItems.gun_maresleg,
|
||||
ModItems.gun_maresleg_akimbo,
|
||||
ModItems.gun_flaregun };
|
||||
Item[] duraGuns = new Item[] {
|
||||
ModItems.gun_am180,
|
||||
ModItems.gun_liberator,
|
||||
ModItems.gun_congolake,
|
||||
ModItems.gun_flamer,
|
||||
ModItems.gun_flamer_topaz };
|
||||
Item[] deshGuns = new Item[] {
|
||||
ModItems.gun_heavy_revolver,
|
||||
ModItems.gun_carbine,
|
||||
ModItems.gun_uzi,
|
||||
ModItems.gun_uzi_akimbo,
|
||||
ModItems.gun_spas12,
|
||||
ModItems.gun_panzerschreck };
|
||||
Item[] wsteelGuns = new Item[] {
|
||||
ModItems.gun_g3,
|
||||
ModItems.gun_stinger,
|
||||
ModItems.gun_chemthrower };
|
||||
Item[] ferroGuns = new Item[] {
|
||||
ModItems.gun_m2,
|
||||
ModItems.gun_autoshotgun,
|
||||
ModItems.gun_autoshotgun_shredder,
|
||||
ModItems.gun_quadro };
|
||||
Item[] tcalloyGuns = new Item[] {
|
||||
ModItems.gun_lag,
|
||||
ModItems.gun_minigun,
|
||||
ModItems.gun_missile_launcher,
|
||||
ModItems.gun_tesla_cannon };
|
||||
Item[] bigmtGuns = new Item[] {
|
||||
ModItems.gun_stg77,
|
||||
ModItems.gun_fatman,
|
||||
ModItems.gun_tau };
|
||||
Item[] bronzeGuns = new Item[] {
|
||||
ModItems.gun_lasrifle };
|
||||
|
||||
new WeaponModDefinition(EnumModGeneric.STEEL_DAMAGE).addMod(steelGuns, new WeaponModGenericDamage(102));
|
||||
new WeaponModDefinition(EnumModGeneric.STEEL_DURA).addMod(steelGuns, new WeaponModGenericDurability(103));
|
||||
new WeaponModDefinition(EnumModGeneric.DURA_DAMAGE).addMod(duraGuns, new WeaponModGenericDamage(104));
|
||||
new WeaponModDefinition(EnumModGeneric.DURA_DURA).addMod(duraGuns, new WeaponModGenericDurability(105));
|
||||
new WeaponModDefinition(EnumModGeneric.DESH_DAMAGE).addMod(deshGuns, new WeaponModGenericDamage(106));
|
||||
new WeaponModDefinition(EnumModGeneric.DESH_DURA).addMod(deshGuns, new WeaponModGenericDurability(107));
|
||||
new WeaponModDefinition(EnumModGeneric.WSTEEL_DAMAGE).addMod(wsteelGuns, new WeaponModGenericDamage(108));
|
||||
new WeaponModDefinition(EnumModGeneric.WSTEEL_DURA).addMod(wsteelGuns, new WeaponModGenericDurability(109));
|
||||
new WeaponModDefinition(EnumModGeneric.FERRO_DAMAGE).addMod(ferroGuns, new WeaponModGenericDamage(110));
|
||||
new WeaponModDefinition(EnumModGeneric.FERRO_DURA).addMod(ferroGuns, new WeaponModGenericDurability(111));
|
||||
new WeaponModDefinition(EnumModGeneric.TCALLOY_DAMAGE).addMod(tcalloyGuns, new WeaponModGenericDamage(112));
|
||||
new WeaponModDefinition(EnumModGeneric.TCALLOY_DURA).addMod(tcalloyGuns, new WeaponModGenericDurability(113));
|
||||
new WeaponModDefinition(EnumModGeneric.BIGMT_DAMAGE).addMod(bigmtGuns, new WeaponModGenericDamage(114));
|
||||
new WeaponModDefinition(EnumModGeneric.BIGMT_DURA).addMod(bigmtGuns, new WeaponModGenericDurability(115));
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DAMAGE).addMod(bronzeGuns, new WeaponModGenericDamage(116));
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DURA).addMod(bronzeGuns, new WeaponModGenericDurability(117));
|
||||
|
||||
new WeaponModDefinition(EnumModSpecial.SPEEDLOADER).addMod(ModItems.gun_liberator, new WeaponModLiberatorSpeedloader(200));
|
||||
}
|
||||
|
||||
public static ItemStack[] getUpgradeItems(ItemStack stack, int cfg) {
|
||||
@ -104,7 +173,9 @@ public class WeaponModManager {
|
||||
|
||||
if(checkMutex) for(int i : gun.stackTagCompound.getIntArray(KEY_MOD_LIST + cfg)) {
|
||||
IWeaponMod iMod = idToMod.get(i);
|
||||
if(iMod != null) for(String mutex0 : newMod.getSlots()) for(String mutex1 : iMod.getSlots()) if(mutex0.equals(mutex1)) return false; //if any of the mod's slots are already taken
|
||||
if(iMod != null) for(String mutex0 : newMod.getSlots()) for(String mutex1 : iMod.getSlots()) {
|
||||
if(mutex0.equals(mutex1)) return false; //if any of the mod's slots are already taken
|
||||
}
|
||||
}
|
||||
|
||||
return true; //yippie!
|
||||
@ -143,12 +214,28 @@ public class WeaponModManager {
|
||||
this.stack = stack;
|
||||
stackToMod.put(new ComparableStack(stack), this);
|
||||
}
|
||||
|
||||
public WeaponModDefinition(EnumModGeneric num) {
|
||||
this.stack = new ItemStack(ModItems.weapon_mod_generic, 1, num.ordinal());
|
||||
stackToMod.put(new ComparableStack(stack), this);
|
||||
}
|
||||
|
||||
public WeaponModDefinition(EnumModSpecial num) {
|
||||
this.stack = new ItemStack(ModItems.weapon_mod_special, 1, num.ordinal());
|
||||
stackToMod.put(new ComparableStack(stack), this);
|
||||
}
|
||||
|
||||
public WeaponModDefinition addMod(ItemStack gun, IWeaponMod mod) { return addMod(new ComparableStack(gun), mod); }
|
||||
public WeaponModDefinition addMod(Item gun, IWeaponMod mod) { return addMod(new ComparableStack(gun), mod); }
|
||||
public WeaponModDefinition addMod(Item[] gun, IWeaponMod mod) { for(Item item : gun) addMod(new ComparableStack(item), mod); return this; }
|
||||
public WeaponModDefinition addMod(ComparableStack gun, IWeaponMod mod) {
|
||||
modByGun.put(gun, mod);
|
||||
modToStack.put(mod, stack);
|
||||
if(gun != null) {
|
||||
ItemGunBaseNT nt = (ItemGunBaseNT) gun.item;
|
||||
ComparableStack comp = new ComparableStack(stack);
|
||||
if(!nt.recognizedMods.contains(comp)) nt.recognizedMods.add(comp);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestDamage extends WeaponModBase {
|
||||
|
||||
public WeaponModTestDamage(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.F_BASEDAMAGE && base instanceof Float) {
|
||||
return fagSlop((Float) base * 1.5F, base);
|
||||
return cast((Float) base * 1.5F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestFirerate extends WeaponModBase {
|
||||
|
||||
public WeaponModTestFirerate(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.I_DELAYAFTERFIRE && base instanceof Integer) {
|
||||
return fagSlop(Math.max((Integer) base / 2, 1), base);
|
||||
return cast(Math.max((Integer) base / 2, 1), base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestMulti extends WeaponModBase {
|
||||
|
||||
public WeaponModTestMulti(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.I_ROUNDSPERCYCLE && base instanceof Integer) {
|
||||
return fagSlop((Integer) base * 3, base);
|
||||
return cast((Integer) base * 3, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -121,6 +121,8 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
boolean isLoaded = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null) > 0;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_tex);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
@ -128,10 +130,10 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
|
||||
ResourceManager.fatman.renderPart("Handle");
|
||||
ResourceManager.fatman.renderPart("Gauge");
|
||||
ResourceManager.fatman.renderPart("Lid");
|
||||
if(!isLoaded) GL11.glTranslated(0, 0, 3);
|
||||
ResourceManager.fatman.renderPart("Piston");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
if(gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null) > 0) ResourceManager.fatman.renderPart("MiniNuke");
|
||||
if(isLoaded) ResourceManager.fatman.renderPart("MiniNuke");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,6 +461,7 @@ container.uf6_tank=UF6 Tank
|
||||
container.vacuumDistill=Vakuumraffinerie
|
||||
container.wasteDrum=Abklingbecken-Trommel
|
||||
container.watzPowerplant=Watzkraftwerk
|
||||
container.weaponsTable=Waffenmodifikationstisch
|
||||
container.zirnox=ZIRNOX Atomreaktor
|
||||
|
||||
crucible.aa=Herstellung - Fortgeschrittene Legierung
|
||||
@ -4630,6 +4631,7 @@ tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranhexafluorid-Tank
|
||||
tile.machine_vacuum_distill.name=Vakuumraffinerie
|
||||
tile.machine_waste_drum.name=Abklingbecken-Trommel
|
||||
tile.machine_weapon_table.name=Waffenmodifikationstisch
|
||||
tile.machine_wood_burner.name=Brennholzgenerator
|
||||
tile.machine_wood_burner.desc=Erzeugt 100HE/t aus Items$Sammelt Asche$Kann 40mB/s Flüssigkeiten mit 50%% Effizienz verbrennen
|
||||
tile.machine_well.name=Ölbohrturm
|
||||
|
||||
@ -866,6 +866,7 @@ container.uf6_tank=UF6 Tank
|
||||
container.vacuumDistill=Vacuum Refinery
|
||||
container.wasteDrum=Spent Fuel Pool Drum
|
||||
container.watzPowerplant=Watz Power Plant
|
||||
container.weaponsTable=Weapon Modification Table
|
||||
container.zirnox=ZIRNOX Nuclear Reactor
|
||||
|
||||
copytool.filter=Filter
|
||||
@ -5760,6 +5761,7 @@ tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranium Hexafluoride Tank
|
||||
tile.machine_vacuum_distill.name=Vacuum Refinery
|
||||
tile.machine_waste_drum.name=Spent Fuel Pool Drum
|
||||
tile.machine_weapon_table.name=Weapon Modification Table
|
||||
tile.machine_wood_burner.name=Wood-Burning Generator
|
||||
tile.machine_wood_burner.desc=Generates 100HE/t when burning items$Collects ashes$Can burn fluids at 50%% efficiency at 40mB/s
|
||||
tile.machine_well.name=Oil Derrick
|
||||
|
||||
|
After Width: | Height: | Size: 203 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gun_table_side.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gun_table_top.png
Normal file
|
After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 291 B |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 300 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 269 B |
|
After Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 267 B |
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 306 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 201 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.3 KiB |