mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
101 lines
2.9 KiB
Java
101 lines
2.9 KiB
Java
package com.hbm.handler.guncfg;
|
|
|
|
import com.hbm.handler.BulletConfiguration;
|
|
import com.hbm.handler.CasingEjector;
|
|
import com.hbm.handler.GunConfiguration;
|
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
|
import com.hbm.items.ModItems;
|
|
import com.hbm.items.ItemAmmoEnums.Ammo22LR;
|
|
import com.hbm.lib.HbmCollection;
|
|
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
|
import com.hbm.particle.SpentCasing;
|
|
import com.hbm.particle.SpentCasing.CasingType;
|
|
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
|
|
|
public class Gun22LRFactory {
|
|
|
|
private static final CasingEjector EJECTOR_22LR;
|
|
private static final SpentCasing CASING22LR;
|
|
|
|
static {
|
|
EJECTOR_22LR = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.2, 0.35).setAngleRange(0.01F, 0.03F);
|
|
CASING22LR = new SpentCasing(CasingType.STRAIGHT).setScale(0.8F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS);
|
|
}
|
|
|
|
public static GunConfiguration getUziConfig() {
|
|
|
|
GunConfiguration config = new GunConfiguration();
|
|
|
|
config.rateOfFire = 1;
|
|
config.roundsPerCycle = 1;
|
|
config.gunMode = GunConfiguration.MODE_NORMAL;
|
|
config.firingMode = GunConfiguration.FIRE_AUTO;
|
|
config.reloadDuration = 20;
|
|
config.firingDuration = 0;
|
|
config.ammoCap = 32;
|
|
config.reloadType = GunConfiguration.RELOAD_FULL;
|
|
config.allowsInfinity = true;
|
|
config.crosshair = Crosshair.L_CROSS;
|
|
config.durability = 3000;
|
|
config.reloadSound = GunConfiguration.RSOUND_MAG;
|
|
config.firingSound = "hbm:weapon.uziShoot";
|
|
config.reloadSoundEnd = false;
|
|
|
|
config.name = "uzi";
|
|
config.manufacturer = EnumGunManufacturer.IMI;
|
|
config.comment.add("Mom, where are my mittens?");
|
|
|
|
config.config = HbmCollection.twentyTwoLR;
|
|
|
|
config.ejector = EJECTOR_22LR;
|
|
|
|
return config;
|
|
}
|
|
|
|
public static GunConfiguration getSaturniteConfig() {
|
|
|
|
GunConfiguration config = getUziConfig();
|
|
|
|
config.durability = 4500;
|
|
|
|
config.name = "uziSatur";
|
|
config.manufacturer = EnumGunManufacturer.IMI_BIGMT;
|
|
|
|
config.config = HbmCollection.twentyTwoLRFire;
|
|
|
|
return config;
|
|
}
|
|
|
|
static float inaccuracy = 5;
|
|
public static BulletConfiguration get22LRConfig() {
|
|
|
|
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
|
|
|
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.STOCK));
|
|
bullet.spread *= inaccuracy;
|
|
bullet.dmgMin = 6;
|
|
bullet.dmgMax = 8;
|
|
|
|
bullet.spentCasing = CASING22LR.clone().register("22LRStock");
|
|
|
|
return bullet;
|
|
}
|
|
|
|
public static BulletConfiguration get22LRAPConfig() {
|
|
|
|
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
|
|
|
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.AP));
|
|
bullet.spread *= inaccuracy;
|
|
bullet.dmgMin = 12;
|
|
bullet.dmgMax = 16;
|
|
bullet.leadChance = 10;
|
|
bullet.wear = 15;
|
|
|
|
bullet.spentCasing = CASING22LR.clone().register("22LRAP");
|
|
|
|
return bullet;
|
|
}
|
|
|
|
}
|