示例#1
0
        public override void PageTick()
        {
            base.PageTick();

#if UNITY_EDITOR
            if (Object != null && ObjectControls.Count <= 1)
            {
                RefreshObjectControls(Object);
            }
#else
            if (ClearObjectControlsOnRelease && Object != null && Object.m_hand == null)
            {
                CleanupHeldObject();

                //check for a hand->hand transfer, ie mag put into gun, as this doesn't fire ObjectPickedUpEvent
                foreach (FVRViveHand hand in GM.CurrentMovementManager.Hands)
                {
                    if (hand.CurrentInteractable != null && hand.CurrentInteractable is FVRPhysicalObject)
                    {
                        FVRPhysicalObject obj = hand.CurrentInteractable as FVRPhysicalObject;
                        RefreshObjectControls(obj);
                        break;
                    }
                }
            }
#endif

            TryToGetCurrentChamber();
        }
        public static bool Speedloader_DuplicateFromSpawnLock(Speedloader __instance, ref GameObject __result, FVRViveHand hand)
        {
            //unlike MonoMod the base class can technically be retrived, but it's a PitA so again this is copied from FVRPhysicalObject.DuplicateFromSpawnLock
            GameObject        gameObject = UnityEngine.Object.Instantiate <GameObject>(__instance.ObjectWrapper.GetGameObject(), __instance.Transform.position, __instance.Transform.rotation);
            FVRPhysicalObject fvrObj     = gameObject.GetComponent <FVRPhysicalObject>();

            if (fvrObj is FVREntityProxy)
            {
                (fvrObj as FVREntityProxy).Data.PrimeDataLists((fvrObj as FVREntityProxy).Flags);
            }

            hand.ForceSetInteractable(fvrObj);
            fvrObj.SetQuickBeltSlot(null);
            fvrObj.BeginInteraction(hand);

            Speedloader component = gameObject.GetComponent <Speedloader>();

            for (int i = 0; i < __instance.Chambers.Count; i++)
            {
                component.Chambers[i].Type = __instance.Chambers[i].Type;

                if (__instance.Chambers[i].IsLoaded)
                {
                    component.Chambers[i].Load(__instance.Chambers[i].LoadedClass, false);
                }
                else
                {
                    component.Chambers[i].Unload();
                }
            }
            __result = gameObject;
            return(false);
        }
示例#3
0
        private GameObject UpdateCurrentGameObj(GameObject obj)
        {
            if (obj != null)
            {
                m_currentGameObj       = obj;
                m_currentFVRObj        = null;
                m_currentFVRPhysObj    = null;
                m_currentItemSpawnerID = null;

                if (m_currentGameObj.GetComponentInChildren <FVRPhysicalObject>() != null)
                {
                    m_currentFVRPhysObj    = m_currentGameObj.GetComponentInChildren <FVRPhysicalObject>();
                    m_currentFVRObj        = m_currentFVRPhysObj.ObjectWrapper;
                    m_currentItemSpawnerID = m_currentFVRPhysObj.IDSpawnedFrom;

#if !UNITY_EDITOR && !UNITY_STANDALONE
                    if (m_currentFVRObj != null && IM.HasSpawnedID(m_currentFVRObj.SpawnedFromId))
                    {
                        m_currentItemSpawnerID = IM.GetSpawnerID(m_currentFVRObj.SpawnedFromId);
                    }
#endif
                }
                SpawnerRefreshElements();
            }

            return(m_currentGameObj);
        }
示例#4
0
        public GameObject DuplicateFromSpawnLock(FVRViveHand hand)
        {
            //the base keyword does not work for some strange reason, so this is copied from FVRPhysicalObject.DuplicateFromSpawnLock
            GameObject        gameObject = UnityEngine.Object.Instantiate <GameObject>(this.ObjectWrapper.GetGameObject(), this.Transform.position, this.Transform.rotation);
            FVRPhysicalObject fvrObj     = gameObject.GetComponent <FVRPhysicalObject>();

            (fvrObj as FVREntityProxy)?.Data.PrimeDataLists((fvrObj as FVREntityProxy).Flags);
            hand?.ForceSetInteractable(fvrObj);
            fvrObj.SetQuickBeltSlot(null);
            fvrObj.BeginInteraction(hand);

            patch_FVRFireArmClip component = gameObject.GetComponent <patch_FVRFireArmClip>();

            for (int i = 0; i < Mathf.Min(this.LoadedRounds.Length, component.LoadedRounds.Length); i++)
            {
                if (this.LoadedRounds[i] != null && this.LoadedRounds[i].LR_Mesh != null)
                {
                    component.LoadedRounds[i].LR_Class         = this.LoadedRounds[i].LR_Class;
                    component.LoadedRounds[i].LR_Type          = this.LoadedRounds[i].LR_Type;
                    component.LoadedRounds[i].LR_Mesh          = this.LoadedRounds[i].LR_Mesh;
                    component.LoadedRounds[i].LR_Material      = this.LoadedRounds[i].LR_Material;
                    component.LoadedRounds[i].LR_ObjectWrapper = this.LoadedRounds[i].LR_ObjectWrapper;
                }
            }
            component.m_numRounds = this.m_numRounds;
            component.UpdateBulletDisplay();
            return(gameObject);
        }
示例#5
0
        public void CleanupHeldObject()
        {
            ClearObjectControls();
            Object = null;
            if (Panel != null && Panel.PageNameText != null)
            {
                Panel.PageNameText.text = PageTitle;
            }

            m_curChamber      = null;
            m_curChamberIndex = -1;
        }
示例#6
0
 public static bool CalcLightPrimerStrikeFail(FVRPhysicalObject obj)
 {
     if (!isAmmoFailEnabled)
     {
         return(true);
     }
     //if it fails, don't run the routine that fires it
     if (Meatyceiver.CalcFail(Meatyceiver.LPSFailureRate.Value * Meatyceiver.generalMult.Value, obj))
     {
         return(false);
     }
     return(true);
 }
示例#7
0
        public static MunchieObject CopyFrom(FVRPhysicalObject original, AudioEvent audioEvent)
        {
            original.gameObject.SetActive(false);
            var real = original.gameObject.AddComponent <MunchieObject>();

            real.ControlType             = original.ControlType;
            real.IsSimpleInteract        = original.IsSimpleInteract;
            real.HandlingGrabSound       = original.HandlingGrabSound;
            real.HandlingReleaseSound    = original.HandlingReleaseSound;
            real.PoseOverride            = original.PoseOverride;
            real.QBPoseOverride          = original.QBPoseOverride;
            real.PoseOverride_Touch      = original.PoseOverride_Touch;
            real.UseGrabPointChild       = original.UseGrabPointChild;
            real.UseGripRotInterp        = original.UseGripRotInterp;
            real.PositionInterpSpeed     = original.PositionInterpSpeed;
            real.RotationInterpSpeed     = original.RotationInterpSpeed;
            real.EndInteractionIfDistant = original.EndInteractionIfDistant;
            real.EndInteractionDistance  = original.EndInteractionDistance;
            real.UXGeo_Held  = original.UXGeo_Held;
            real.UXGeo_Hover = original.UXGeo_Hover;
            real.UseFilteredHandTransform       = original.UseFilteredHandTransform;
            real.UseFilteredHandRotation        = original.UseFilteredHandRotation;
            real.UseFilteredHandPosition        = original.UseFilteredHandPosition;
            real.UseSecondStepRotationFiltering = original.UseSecondStepRotationFiltering;
            real.ObjectWrapper = original.ObjectWrapper;
            real.SpawnLockable = original.SpawnLockable;
            real.Harnessable   = original.Harnessable;
            real.HandlingReleaseIntoSlotSound = original.HandlingReleaseIntoSlotSound;
            real.Size                        = original.Size;
            real.QBSlotType                  = original.QBSlotType;
            real.ThrowVelMultiplier          = original.ThrowVelMultiplier;
            real.ThrowAngMultiplier          = original.ThrowAngMultiplier;
            real.UsesGravity                 = original.UsesGravity;
            real.DependantRBs                = original.DependantRBs;
            real.DistantGrabbable            = original.DistantGrabbable;
            real.IsDebug                     = original.IsDebug;
            real.IsAltHeld                   = original.IsAltHeld;
            real.IsKinematicLocked           = original.IsKinematicLocked;
            real.DoesQuickbeltSlotFollowHead = original.DoesQuickbeltSlotFollowHead;
            real.IsInWater                   = original.IsInWater;
            real.AttachmentMounts            = original.AttachmentMounts;
            real.IsAltToAltTransfer          = original.IsAltToAltTransfer;
            real.CollisionSound              = original.CollisionSound;
            real.IsPickUpLocked              = original.IsPickUpLocked;
            real.OverridesObjectToHand       = original.OverridesObjectToHand;
            real.MP       = original.MP;
            real.EatSound = audioEvent;
            Destroy(original);
            original.gameObject.SetActive(true);
            return(real);
        }
示例#8
0
        public static bool CalcFail(float chance, FVRPhysicalObject obj)
        {
            //effectively returns a number between 0 and 100 with 2 decimal points
            float rand = (float)randomVar.Next(0, 10001) / 100;
            float mult = 1;

            if (obj != null)
            {
                mult += MCM.GetMultForRoundsUsed(obj);
            }
            if (enableConsoleDebugging.Value)
            {
                Debug.Log("Base Chance: " + chance + " Chance: " + (chance * mult) + " Rand: " + rand + " Mult: " + mult);
            }
            if (rand <= chance * mult)
            {
                return(true);
            }
            return(false);
        }
        static bool GeneralPatch_FailureToExtract(FVRInteractiveObject __instance)
        {
            //these firearms will break if an FTE is caused
            if (__instance is BoltActionRifle || __instance is LeverActionFirearm)
            {
                return(false);
            }
            if (!Meatyceiver.enableFirearmFailures.Value)
            {
                return(true);
            }
            float             chance = Meatyceiver.FTERate.Value * Meatyceiver.generalMult.Value;
            FVRPhysicalObject obj    = null;

            if (__instance is ClosedBolt)
            {
                obj = (__instance as ClosedBolt).Weapon;
            }
            if (__instance is HandgunSlide)
            {
                obj = (__instance as HandgunSlide).Handgun;
            }
            if (__instance is OpenBoltReceiverBolt)
            {
                obj = (__instance as OpenBoltReceiverBolt).Receiver;
            }
            if (Meatyceiver.CalcFail(chance, obj))
            {
                __instance.RotationInterpSpeed = 2;
                return(false);
            }
//			rand = (float)randomVar.Next(0, 10001) / 100;
//			chance = stovepipeRate.Value * generalMult.Value;
//			consoleDebugging(0, FTEfailureName, rand, chance);
//			if (rand <= chance)
//			{
//				consoleDebugging(1, FTEfailureName, rand, chance);
//				return false;
//			}
            return(true);
        }
示例#10
0
        // Shared load checks between mag & clip
        private static bool FirearmLoadCheck(FVRPhysicalObject obj, Collider col, string layer)
        {
            if (GM.CurrentSceneSettings.AreQuickbeltSlotsEnabled)
            {
                FVRPhysicalObject fvrObj = null;

                if (obj is FVRFireArmMagazine mag && mag.FireArm == null)
                {
                    fvrObj = mag;
                }
                else if (obj is FVRFireArmClip clip && clip.FireArm == null)
                {
                    fvrObj = clip;
                }

                var bod = GM.CurrentPlayerBody;
                if (fvrObj != null && fvrObj.QuickbeltSlot != null && ((fvrObj.QuickbeltSlot.name == bod.RightHand.name || fvrObj.QuickbeltSlot.name == bod.LeftHand.name)))
                {
                    if (col.gameObject.CompareTag(layer))
                    {
                        return(true);
                    }
                }
            }
示例#11
0
 public static bool PivotLockerUnlockParentage(FVRPivotLocker __instance, FVRPhysicalObject ___m_obj)
 {
     ___m_obj.transform.SetParent(null);
     return(true);
 }
示例#12
0
        public void RefreshObjectControls(FVRPhysicalObject obj)
        {
            if (Object != null)
            {
                CleanupHeldObject();
            }

            Object = obj;

            m_columnStarts = new int[] { 0, 0, 0 };

            if (Object != null)
            {
                if (Panel != null && Panel.PageNameText != null && Object.ObjectWrapper != null)
                {
                    Panel.PageNameText.text = PageTitle + " - " + Object.ObjectWrapper.DisplayName;
                }

                m_columnStarts[0] = AddObjectControls(Columns[0], m_columnStarts[0], Object, new string[] { "SpawnLockable", "Harnessable", "Size", "QBSlotType", "ThrowVelMultiplier", "ThrowAngMultiplier", "UsesGravity", "DoesQuickbeltSlotFollowHead", "DistantGrabbable", "IsPickUpLocked", "UseGripRotInterp" });
                m_columnStarts[0] = AddObjectControls(Columns[0], m_columnStarts[0], Object, new string[] { "ToggleKinematicLocked" }, null, null, new bool[] { true });

                if (Object.GetComponentInChildren <FVRFireArmMagazine>() != null)
                {
                    m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2], Object.GetComponentInChildren <FVRFireArmMagazine>(), new string[] { "m_capacity", "IsInfinite", "MagazineType", "RoundType", "FuelAmountLeft", "CanManuallyEjectRounds" });
                }
                if (Object.GetComponentInChildren <FVRFireArmClip>() != null)
                {
                    m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2], Object.GetComponentInChildren <FVRFireArmClip>(), new string[] { "m_capacity", "IsInfinite", "ClipType", "RoundType", "CanManuallyEjectRounds" });
                }

#if !UNITY_EDITOR && !UNITY_STANDALONE
                if (Object.GetComponent <FVRFireArm>() != null)
                {
                    m_columnStarts[0] = AddObjectControls(Columns[0], m_columnStarts[0] + 1, Object.GetComponent <FVRFireArm>(), new string[] { "MagazineType", "ClipType", "RoundType" });
                    if (m_curChamber == null)
                    {
                        TryToGetCurrentChamber();
                    }

                    if (AccessTools.Field(Object.GetType(), "Chamber") != null)
                    {
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetType().GetField("Chamber").GetValue(Object), new string[] { "RoundType", "ChamberVelocityMultiplier", "IsManuallyExtractable" });
                    }
                    else if (AccessTools.Field(Object.GetType(), "m_curChamber") != null)
                    {
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], m_curChamber, new string[] { "RoundType", "ChamberVelocityMultiplier", "IsManuallyExtractable" }, null, new bool[] { true, true, true });
                    }

                    if (Object.GetComponent <Handgun>() != null)
                    {
                        Handgun handgun = Object.GetComponent <Handgun>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, handgun, new string[] { "HasManualDecocker", "HasMagReleaseInput", "CanPhysicsSlideRack" });
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, handgun.Slide, new string[] { "Speed_Forward", "Speed_Rearward", "Speed_Held", "SpringStiffness", "HasLastRoundSlideHoldOpen" });
                        AddObjectControls(Columns[2], 14, handgun.FireSelectorModes[handgun.FireSelectorModeIndex], new string[] { "ModeType", "BurstAmount" });
                    }

                    else if (Object.GetComponent <OpenBoltReceiver>() != null)
                    {
                        OpenBoltReceiver obr = Object.GetComponent <OpenBoltReceiver>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, obr, new string[] { "HasMagReleaseButton" });
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, obr.Bolt, new string[] { "BoltSpeed_Forward", "BoltSpeed_Rearward", "BoltSpeed_Held", "BoltSpringStiffness", "HasLastRoundBoltHoldOpen", "BoltRot_Standard", "BoltRot_Safe", "BoltRot_SlipDistance" });
                        AddObjectControls(Columns[2], 14, obr.FireSelector_Modes[obr.FireSelectorModeIndex], new string[] { "ModeType" });
                        AddObjectControls(Columns[2], 15, obr, new string[] { "SuperBurstAmount" });
                    }

                    else if (Object.GetComponent <ClosedBoltWeapon>() != null)
                    {
                        ClosedBoltWeapon cbw = Object.GetComponent <ClosedBoltWeapon>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, cbw, new string[] { "EjectsMagazineOnEmpty", "BoltLocksWhenNoMagazineFound", "DoesClipEntryRequireBoltBack", "HasMagReleaseButton" });
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, cbw.Bolt, new string[] { "Speed_Forward", "Speed_Rearward", "Speed_Held", "SpringStiffness", "HasLastRoundBoltHoldOpen", "UsesAKSafetyLock", "DoesClipHoldBoltOpen" });
                        AddObjectControls(Columns[2], 14, cbw.FireSelector_Modes[cbw.FireSelectorModeIndex], new string[] { "ModeType", "BurstAmount" });
                    }

                    else if (Object.GetComponent <BreakActionWeapon>() != null)
                    {
                        BreakActionWeapon baw = Object.GetComponent <BreakActionWeapon>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], baw, new string[] { "m_isLatched", "UsesManuallyCockedHammers", "FireAllBarrels", "PopOutEmpties" });
                        for (int i = 0; i < baw.Barrels.Length; i++)
                        {
                            m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2], baw.Barrels[i].Chamber, new string[] { "RoundType", "ChamberVelocityMultiplier", "SpreadRangeModifier" });
                        }
                    }

                    else if (Object.GetComponent <TubeFedShotgun>() != null)
                    {
                        TubeFedShotgun tfs = Object.GetComponent <TubeFedShotgun>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, tfs, new string[] { "m_isHammerCocked", "UsesSlamFireTrigger", "CanModeSwitch" });
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, tfs.Bolt, new string[] { "Speed_Forward", "Speed_Rearward", "Speed_Held", "SpringStiffness", "HasLastRoundBoltHoldOpen" });
                        if (tfs.Handle != null)
                        {
                            m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2] + 1, tfs.Handle, new string[] { "Speed_Held", "m_isHandleLocked" });
                        }
                    }

                    else if (Object.GetComponent <Flaregun>() != null)
                    {
                        Flaregun flaregun = Object.GetComponent <Flaregun>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, flaregun, new string[] { "HingeAxis", "RotOut", "CanUnlatch", "IsHighPressureTolerant", "m_isHammerCocked", "m_isDestroyed", "CocksOnOpen" });
                    }

                    else if (Object.GetComponent <SimpleLauncher>() != null)
                    {
                        SimpleLauncher sl = Object.GetComponent <SimpleLauncher>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, sl, new string[] { "HasTrigger", "AlsoPlaysSuppressedSound", "DeletesCartridgeOnFire", "FireOnCol", "ColThresh" });
                    }

                    else if (Object.GetComponent <BoltActionRifle>() != null)
                    {
                        BoltActionRifle bar = Object.GetComponent <BoltActionRifle>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, bar, new string[] { "HasMagEjectionButton", "m_isHammerCocked", "EjectsMagazineOnEmpty", "HasMagEjectionButton" });
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, bar.BoltHandle, new string[] { "UsesQuickRelease", "BaseRotOffset", "MinRot", "MaxRot", "UnlockThreshold" });
                    }

                    else if (Object.GetComponent <Revolver>() != null)
                    {
                        Revolver revolver = Object.GetComponent <Revolver>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, revolver, new string[] { "CanManuallyCockHammer", "m_isHammerLocked", "m_isCylinderArmLocked", "CylinderRotRange", "IsCylinderArmZ", "GravityRotsCylinderPositive" });
                    }

                    else if (Object.GetComponent <LAPD2019>() != null)
                    {
                        LAPD2019 lapd = Object.GetComponent <LAPD2019>();
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1] + 1, lapd, new string[] { "m_isCylinderArmLocked", "CylinderRotRange", "GravityRotsCylinderPositive", "m_isAutoChargeEnabled", "m_hasBattery", "m_batteryCharge", "m_hasThermalClip", "m_heatThermalClip", "m_heatSystem", "m_barrelHeatDamage" });
                        m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2], lapd.BoltHandle, new string[] { "UsesQuickRelease", "BaseRotOffset", "MinRot", "MaxRot", "UnlockThreshold" });
                    }

                    m_curChamberIndex = 0;
                }

                else if (Object.GetComponent <FVRFireArmRound>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <FVRFireArmRound>(), new string[] { "RoundType", "RoundClass", "IsHighPressure", "NumProjectiles", "ProjectileSpread", "IsDestroyedAfterCounter", "m_isKillCounting", "isCookingOff", "isManuallyChamberable", "IsCaseless", "isMagazineLoadable", "isPalmable", "MaxPalmedAmount" });
                }

                else if (Object.GetComponent <FVRGrenade>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <FVRGrenade>(), new string[] { "DefaultFuse" });
                }

                else if (Object.GetComponent <MF2_Medigun>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <MF2_Medigun>(), new string[] { "EngageRange", "MaxRange", "TryEngageBeam", "EngageUber", "DisEngageBeam", "m_uberChargeUp", "m_uberChargeOut" });
                }

                else if (Object.GetComponent <SosigLink>() != null)
                {
                    SosigLink L = Object.GetComponent <SosigLink>();
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], L.S, new string[] { "ClearSosig", "", "BodyState", "CurrentOrder", "Mustard", "BleedDamageMult", "BleedRateMult", "Speed_Crawl", "Speed_Sneak", "Speed_Walk", "Speed_Run" });
                    m_columnStarts[2] = AddObjectControls(Columns[2], m_columnStarts[2], L, new string[] { "m_integrity", "StaggerMagnitude", "DamMult" });
                }

                else if (Object.GetComponent <SosigWeaponPlayerInterface>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <SosigWeaponPlayerInterface>().W, new string[] { "CycleSpeedForward", "CycleSpeedBackward", "ShotsPerLoad", "m_shotsLeft", "ProjectilesPerShot", "ProjectileSpread", "isFullAuto", "ReloadTime", "BurstLimit" });
                }

                else if (Object.GetComponent <RW_Powerup>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <RW_Powerup>(), new string[] { "PowerupType", "PowerupIntensity", "PowerupDuration", "PowerUpSpecial", "Cooked", "UpdateSymbols" });
                }

                else if (Object.GetComponent <ShatterablePhysicalObject>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <ShatterablePhysicalObject>(), new string[] { "currentToughness", "TransfersVelocityExplosively", "DamageReceivedMultiplier", "CollisionShatterThreshold" });
                }

                else if (Object.GetComponent <RotrwBangerJunk>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <RotrwBangerJunk>(), new string[] { "Type", "ContainerSize" });
                }

                else if (Object.GetComponent <Banger>() != null)
                {
                    Banger banger = Object.GetComponent <Banger>();
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], banger, new string[] { "BType", "BSize", "m_isArmed", "m_timeToPayload", "ProxRange", "m_timeSinceArmed", "m_shrapnelVel", "m_isSticky", "m_isSilent", "m_isHoming", "m_canbeshot", "SetToBouncy" });

                    if (banger.BDial != null)
                    {
                        m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], banger.BDial, new string[] { "DialTick", "m_isPrimed", "m_hasDinged" });
                    }
                }

                else if (Object.GetComponent <BangerDetonator>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <BangerDetonator>(), new string[] { "TriggerRange", "Detonate" });
                }

                else if (Object.GetComponent <GronchHatCase>() != null)
                {
                    m_columnStarts[1] = AddObjectControls(Columns[1], m_columnStarts[1], Object.GetComponent <GronchHatCase>(), new string[] { "m_isOpen", "Open", "HID" }, null, null, new bool[] { false, true, false }, new object[][] { null, new object[] { new GameObject("dummy").AddComponent <GronchHatCaseKey>() }, null });
                }
#endif
            }
        }