Exemplo n.º 1
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Disc Gun", "discgun");

            Game.Items.Rename("outdated_gun_mods:disc_gun", "nn:disc_gun");
            gun.gameObject.AddComponent <DiscGun>();
            gun.SetShortDescription("Bad Choices");
            gun.SetLongDescription("Fires sharp, bouncing discs." + "\n\nCapable of hurting it's bearer, because someone thought that would be funny.");

            gun.SetupSprite(null, "discgun_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 14);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1f;
            gun.DefaultModule.cooldownTime        = 0.25f;
            gun.DefaultModule.numberOfShotsInClip = 10;
            gun.SetBaseMaxAmmo(300);
            //gun.DefaultModule.positionOffset = new Vector3(1f, 0f, 0f);
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.68f, 0f);
            gun.gunClass = GunClass.PISTOL;

            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 4f;
            projectile.baseData.range       *= 20f;
            projectile.baseData.speed       *= 0.4f;
            projectile.SetProjectileSpriteRight("discgun_projectile", 15, 15, true, tk2dBaseSprite.Anchor.MiddleCenter, 9, 9);
            SelfHarmBulletBehaviour SuicidalTendancies = projectile.gameObject.AddComponent <SelfHarmBulletBehaviour>();

            PierceProjModifier Piercing = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            Piercing.penetratesBreakables = true;
            Piercing.penetration         += 10;
            BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces = 10;

            projectile.transform.parent      = gun.barrelOffset;
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Disc Gun Discs", "NevernamedsItems/Resources/CustomGunAmmoTypes/discgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/discgun_clipempty");
            gun.quality = PickupObject.ItemQuality.D;

            gun.encounterTrackable.EncounterGuid = "this is the Disc Gun";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            DiscGunID = gun.PickupObjectId;

            string bleh = "Not a Bot, if you're sniffing around in my code, lookin to steal for the Nuclear Throne Mode, you're a stinker. It's cool, I'm a stinker too, just wanted to let you know";

            if (bleh == null)
            {
                ETGModConsole.Log("BOT WHAT THE F**K DID YOU DO");
            }
        }
Exemplo n.º 2
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Super Disc Gun", "discgun_superdiscsynergyforme");

            Game.Items.Rename("outdated_gun_mods:super_disc_gun", "nn:disc_gun+super_disc");
            gun.gameObject.AddComponent <DiscGunSuperDiscForme>();
            gun.SetShortDescription("Badder Choices");
            gun.SetLongDescription("Fires a shit-ton of discs. If you're reading this, you're a hacker.");

            gun.SetupSprite(null, "discgun_superdiscsynergyforme_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 14);

            for (int i = 0; i < 5; i++)
            {
                gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            }

            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.ammoCost            = 1;
                mod.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.cooldownTime        = 0.25f;
                mod.numberOfShotsInClip = 10;
                mod.angleVariance       = 20f;

                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.baseData.damage *= 4f;
                projectile.baseData.range  *= 20f;
                projectile.baseData.speed  *= 0.4f;
                projectile.SetProjectileSpriteRight("discgun_projectile", 15, 15, true, tk2dBaseSprite.Anchor.MiddleCenter, 9, 9);
                SelfHarmBulletBehaviour SuicidalTendancies = projectile.gameObject.AddComponent <SelfHarmBulletBehaviour>();

                PierceProjModifier Piercing = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                Piercing.penetratesBreakables = true;
                Piercing.penetration         += 10;
                BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();
                Bouncing.numberOfBounces = 10;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
            }

            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(300);
            //gun.DefaultModule.positionOffset = new Vector3(1f, 0f, 0f);
            gun.barrelOffset.transform.localPosition = new Vector3(1.75f, 1.12f, 0f);


            //BULLET STATS

            gun.quality = PickupObject.ItemQuality.EXCLUDED;

            gun.encounterTrackable.EncounterGuid = "this is the Disc Gun Super Disc Synergy Forme";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            string bleh = "Not a Bot, if you're sniffing around in my code, lookin to steal for the Nuclear Throne Mode, you're a stinker. It's cool, I'm a stinker too, just wanted to let you know";

            if (bleh == null)
            {
                ETGModConsole.Log("BOT WHAT THE F**K DID YOU DO");
            }

            DiscGunSuperDiscSynergyFormeID = gun.PickupObjectId;
        }