public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            spawnDamage             = 0.5f;
            player.OnNewFloorLoaded = (Action <PlayerController>)Delegate.Combine(player.OnNewFloorLoaded, new Action <PlayerController>(this.HandleNewFloor));

            BlinkPassiveItem Scarf = PickupObjectDatabase.GetById(436).GetComponent <BlinkPassiveItem>();

            this.ScarfPrefab = Scarf.ScarfPrefab;

            //ETGModConsole.Log( + "", false);
            Shader.Find("_OverrideColor");
            Color ScarfColor = new Color(0.23529411764f, 0.30196078431f, 0.92549019607f);

            ScarfPrefab.ScarfMaterial.SetColor("_OverrideColor", ScarfColor);
            //ScarfPrefab.ScarfMaterial.SetColor("_Color", Color.black);
            ScarfPrefab.ScarfLength /= 2;
            //ScarfPrefab.ScarfMaterial.GetColor
            //ScarfPrefab.ScarfMaterial.mainTexture;
            //this.m_scarf = Scarf.m_scarf;

            if (this.ScarfPrefab)
            {
                this.m_scarf = UnityEngine.Object.Instantiate <GameObject>(this.ScarfPrefab.gameObject).GetComponent <ScarfAttachmentDoer>();
                this.m_scarf.Initialize(player);
            }
        }
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);


            BlinkPassiveItem Scarf = PickupObjectDatabase.GetById(436).GetComponent <BlinkPassiveItem>();

            this.ScarfPrefab = Scarf.ScarfPrefab;

            //ETGModConsole.Log( + "", false);
            Shader.Find("_OverrideColor");
            Color ScarfColor = new Color(0.18039215686f, 0f, 0.30196078431f);

            ScarfPrefab.ScarfMaterial.SetColor("_OverrideColor", ScarfColor);
            //ScarfPrefab.ScarfMaterial.SetColor("_Color", Color.black);
            ScarfPrefab.ScarfLength /= 2;
            //ScarfPrefab.ScarfMaterial.GetColor
            //ScarfPrefab.ScarfMaterial.mainTexture;
            //this.m_scarf = Scarf.m_scarf;

            if (this.ScarfPrefab)
            {
                this.m_scarf = UnityEngine.Object.Instantiate <GameObject>(this.ScarfPrefab.gameObject).GetComponent <ScarfAttachmentDoer>();
                this.m_scarf.Initialize(player);
            }
        }
Beispiel #3
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            m_BlinkPassive = PickupObjectDatabase.GetById(436).GetComponent <BlinkPassiveItem>();

            if (!m_BlinkPassive)
            {
                return;
            }

            EXRedScarfObject = expandSharedAssets1.LoadAsset <GameObject>("Bloodied Scarf");
            EXRedScarfObject.AddComponent <ExpandRedScarf>();
            EXRedScarfObject.AddComponent <tk2dSprite>();
            ExpandUtility.DuplicateSprite(EXRedScarfObject.GetComponent <tk2dSprite>(), m_BlinkPassive.GetComponent <tk2dSprite>());

            ExpandRedScarf redScarf = EXRedScarfObject.GetComponent <ExpandRedScarf>();

            ItemBuilder.SetupItem(redScarf, "Blink Away", "Dodge roll is augmented with a blink\n\nThis simple scarf was once worn by a skilled assassin. Betrayed by his brothers and assumed dead...", "ex");
            ItemBuilder.AddPassiveStatModifier(redScarf, PlayerStats.StatType.ReloadSpeed, 1.3f, StatModifier.ModifyMethod.MULTIPLICATIVE);
            // redScarf.PickupObjectId = m_BlinkPassive.PickupObjectId;
            redScarf.itemName       = "Red Bandana";
            redScarf.PickupObjectId = 436;
            redScarf.quality        = m_BlinkPassive.quality;
            if (!ExpandSettings.EnableEXItems)
            {
                redScarf.quality = ItemQuality.EXCLUDED;
            }
            redScarf.additionalMagnificenceModifier = m_BlinkPassive.additionalMagnificenceModifier;
            redScarf.ItemSpansBaseQualityTiers      = m_BlinkPassive.ItemSpansBaseQualityTiers;
            redScarf.ItemRespectsHeartMagnificence  = m_BlinkPassive.ItemRespectsHeartMagnificence;
            redScarf.associatedItemChanceMods       = m_BlinkPassive.associatedItemChanceMods;
            redScarf.contentSource             = m_BlinkPassive.contentSource;
            redScarf.ShouldBeExcludedFromShops = m_BlinkPassive.ShouldBeExcludedFromShops;
            redScarf.CanBeDropped = m_BlinkPassive.CanBeDropped;
            redScarf.PreventStartingOwnerFromDropping = m_BlinkPassive.PreventStartingOwnerFromDropping;
            redScarf.PersistsOnDeath   = m_BlinkPassive.PersistsOnDeath;
            redScarf.RespawnsIfPitfall = m_BlinkPassive.RespawnsIfPitfall;
            redScarf.PreventStartingOwnerFromDropping = m_BlinkPassive.PreventStartingOwnerFromDropping;
            redScarf.IgnoredByRat = m_BlinkPassive.IgnoredByRat;
            redScarf.SaveFlagToSetOnAcquisition  = m_BlinkPassive.SaveFlagToSetOnAcquisition;
            redScarf.ForcedPositionInAmmonomicon = m_BlinkPassive.ForcedPositionInAmmonomicon;
            redScarf.UsesCustomCost                  = m_BlinkPassive.UsesCustomCost;
            redScarf.CustomCost                      = m_BlinkPassive.CustomCost;
            redScarf.PersistsOnPurchase              = m_BlinkPassive.PersistsOnPurchase;
            redScarf.CanBeSold                       = m_BlinkPassive.CanBeSold;
            redScarf.passiveStatModifiers            = m_BlinkPassive.passiveStatModifiers;
            redScarf.ArmorToGainOnInitialPickup      = m_BlinkPassive.ArmorToGainOnInitialPickup;
            redScarf.minimapIcon                     = m_BlinkPassive.minimapIcon;
            redScarf.DodgeRollTimeMultiplier         = m_BlinkPassive.DodgeRollTimeMultiplier;
            redScarf.DodgeRollDistanceMultiplier     = m_BlinkPassive.DodgeRollDistanceMultiplier;
            redScarf.AdditionalInvulnerabilityFrames = m_BlinkPassive.AdditionalInvulnerabilityFrames;
            redScarf.ScarfPrefab                     = m_BlinkPassive.ScarfPrefab;
            redScarf.BlinkpoofVfx                    = m_BlinkPassive.BlinkpoofVfx;

            // Try to prevent original item from showing up. (can still be accessed via MTG console's give command however)
            if (ExpandSettings.EnableEXItems)
            {
                m_BlinkPassive.quality = ItemQuality.EXCLUDED;
            }
        }