Skip to content

Commit

Permalink
Finishing the Moritas + spas alt fire anim
Browse files Browse the repository at this point in the history
  • Loading branch information
70000hp committed Aug 28, 2023
1 parent 3ceb447 commit e3dd577
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 6 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@ public static GunConfiguration getSpas12Config() {
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
)
);

config.animations.put(AnimType.ALT_CYCLE, new BusAnimation()
.addBus("SPAS_RECOIL_TRANSLATE", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, -2, 100))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
)
.addBus("SPAS_RECOIL_ROT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(-1, 0, 1, 100))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
)
.addBus("SPAS_PUMP", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 450))
.addKeyframe(new BusAnimationKeyframe(0, 0, -1.8, 200))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
)
);

config.ejector = EJECTOR_SPAS;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/handler/guncfg/Gun22LRFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public static BulletConfiguration get22LRSatConfig() {

bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 18;
bullet.dmgMax = 26;
bullet.dmgMin = 12;
bullet.dmgMax = 16;
bullet.dmgFire = true;
bullet.wear = 5;
bullet.spentCasing = CASING22LR.clone().register("22LRStock");
Expand Down
27 changes: 25 additions & 2 deletions src/main/java/com/hbm/handler/guncfg/Gun556mmFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static GunConfiguration getMoritaConfig() {
)
);

config.name = "morita";
config.name = "Morita Assault Rifle";
config.manufacturer = EnumGunManufacturer.MORITA;

config.comment.add("Smells like crayons.");
Expand Down Expand Up @@ -222,7 +222,7 @@ public static GunConfiguration getMUnderbarrelConfig(){
return config;
}

public static GunConfiguration getMoritaCarbineConfig() {
public static GunConfiguration getMoritaCarbineBurstConfig() {

GunConfiguration config = getMoritaConfig();
config.rateOfFire = 4;
Expand All @@ -231,10 +231,33 @@ public static GunConfiguration getMoritaCarbineConfig() {
config.partialFire = true;
config.durability = 8000;
config.reloadDuration = 15;
config.comment.clear();
config.name = "Morita Carbine Rifle";
config.comment.add("COME ON YOU APES, YOU WANNA LIVE FOREVER??");
config.comment.add("Main fire for full auto, alt fire for 3 round bursts");
config.animations.put(AnimType.ALT_CYCLE, new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0.5, 0, 0, 25))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
)
);
return config;
}
public static GunConfiguration getMoritaCarbineAutoConfig() {

GunConfiguration config = getMoritaCarbineBurstConfig();

config.rateOfFire = 2;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.firingSound = "hbm:weapon.moritaShoot";
config.firingDuration = 0;

return config;
}


private static float inaccuracy = 2.5F;
public static BulletConfiguration get556Config() {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/items/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -4243,7 +4243,7 @@ public static void initializeItem()
gun_uac_pistol = new ItemGunBase(Gun45ACPFactory.getUACPistolConfig()).setFull3D().setUnlocalizedName("gun_uac_pistol").setCreativeTab(MainRegistry.weaponTab);

gun_morita = new ItemGunBase(Gun556mmFactory.getMoritaConfig(), Gun556mmFactory.getMUnderbarrelConfig()).setUnlocalizedName("gun_morita").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_morita");
gun_morita_carbine = new ItemGunBase(Gun556mmFactory.getMoritaCarbineConfig()).setUnlocalizedName("gun_morita_carbine").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_morita");
gun_morita_carbine = new ItemGunBase(Gun556mmFactory.getMoritaCarbineAutoConfig(), Gun556mmFactory.getMoritaCarbineBurstConfig()).setUnlocalizedName("gun_morita_carbine").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_morita");

ToolMaterial matCrucible = EnumHelper.addToolMaterial("CRUCIBLE", 10, 3, 50.0F, 100.0F, 0);
crucible = new ItemCrucible(5000, 1F, matCrucible).setUnlocalizedName("crucible").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":crucible");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) {

GL11.glEnable(GL11.GL_LIGHTING);

double s = 1.7D;
double s = item.isItemEqual(new ItemStack(ModItems.gun_morita)) ? 1.45D : 1.7D;

GL11.glTranslated(6, 10, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glRotated(135, 1, 0, 0);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/hbm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@ gun.make.MANN=Open Mann Co.
gun.make.MAXIM=Hiram Maxim
gun.make.METRO=Metro Gunsmiths
gun.make.MWT=MWT Prototype Labs
gun.make.MORITA=Morita Company
gun.make.NAWS=Kayarm Industries
gun.make.ERFURT=Erfurter Maschinenfabrik Geipel
gun.make.NONE=-
Expand Down

0 comments on commit e3dd577

Please sign in to comment.