Example #1
0
        public static void Diorama(ConCommandArgs args)
        {
            var path    = "prefabs/stagedisplay/" + args.GetArgString(0) + "DioramaDisplay";
            var gay     = Resources.Load(path);
            var diorama = (GameObject)UnityEngine.Object.Instantiate(gay);

            diorama.transform.position = new Vector3(args.GetArgFloat(1), args.GetArgFloat(2), args.GetArgFloat(3));
        }
Example #2
0
        public static void CMD_SpawnPrefab(ConCommandArgs args)
        {
            var path    = args.GetArgString(0);
            var gay     = Resources.Load(path);
            var diorama = (GameObject)UnityEngine.Object.Instantiate(gay);

            diorama.transform.position = new Vector3(args.GetArgFloat(1), args.GetArgFloat(2), args.GetArgFloat(3));
        }
Example #3
0
 private static void CCUpdateDelay(ConCommandArgs args)
 {
     if (args.Count > 0)
     {
         var newValue = args.GetArgFloat(0);
         if (newValue < 0)
         {
             Debug.LogWarning("[BossDropRewardDelay] Can't set delay to less than 0!");
         }
         else
         {
             var maxValueWarning = 5f;
             if (newValue > maxValueWarning)
             {
                 Debug.LogWarning($"[BossDropRewardDelay] Warning: reward delay set to larger than {maxValueWarning} seconds ({newValue}), rewards may take a long time to complete!");
             }
             spawnDelay = newValue;
             foreach (var bossDropRewardDelayComponent in InstanceTracker.GetInstancesList <DelayedBossRewards>())
             {
                 if (bossDropRewardDelayComponent)
                 {
                     bossDropRewardDelayComponent.delay = spawnDelay;
                     bossDropRewardDelayComponent.age   = 0;
                 }
             }
         }
     }
     else
     {
         Debug.Log($"[BossDropRewardDelay] {spawnDelay} seconds.");
     }
 }
Example #4
0
        private static void DCTeleportObject(ConCommandArgs args)
        {
            var component = args.senderMasterObject.GetComponent <DesCloneCommandComponent>();

            if (component)
            {
                if (component.chosenObject)
                {
                    float[] array    = { args.GetArgFloat(0), args.GetArgFloat(1), args.GetArgFloat(2) };
                    var     position = new Vector3(array[0], array[1], array[2]);
                    component.chosenObject.transform.position = position;
                    Debug.Log(string.Format("Teleported {0} : {1} to {2}", component.chosenObject, component.chosenObject.name, position));
                }
                else
                {
                    Debug.Log("You haven't selected an object yet!");
                }
            }
        }
Example #5
0
        private static void TeleportPos(ConCommandArgs args)
        {
            var cb  = args.senderBody;
            var rbm = cb.GetComponent <RigidbodyMotor>();

            if (cb)
            {
                float[] array    = { args.GetArgFloat(0), args.GetArgFloat(1), args.GetArgFloat(2) };
                var     position = new Vector3(array[0], array[1], array[2]);
                if (cb.characterMotor)
                {
                    Debug.Log(string.Format("Teleported charactermotor to {0}", position));
                    cb.characterMotor.Motor.SetPositionAndRotation(position, Quaternion.identity, true);
                }
                else if (rbm)
                {
                    Debug.Log(string.Format("Teleported rigidbody to {0}", position));
                    rbm.rigid.position = position;
                }
            }
        }
Example #6
0
        private static void TeleportPos(ConCommandArgs args)
        {
            var localMaster = PlayerCharacterMasterController.instances[0].master;
            var body        = localMaster.bodyInstanceObject;
            var cb          = body.GetComponent <CharacterBody>();
            var rbm         = body.GetComponent <RigidbodyMotor>();
            var position    = new Vector3(args.GetArgFloat(0), args.GetArgFloat(1), args.GetArgFloat(2));

            if (cb)
            {
                if (cb.characterMotor)
                {
                    Debug.Log("Teleported charactermotor");
                    cb.characterMotor.Motor.SetPositionAndRotation(position, Quaternion.identity, true);
                }
                else if (rbm)
                {
                    Debug.Log("Teleported rigidbody");
                    rbm.rigid.position = position;
                }
            }
        }
Example #7
0
        private static void AnimatorSpeed(ConCommandArgs args)
        {
            var cb = args.senderBody;

            if (cb)
            {
                var value    = args.GetArgFloat(0);
                var animator = GetModelAnimator(cb);
                if (animator)
                {
                    if (!animator.enabled)
                    {
                        Debug.Log("Animator is not enabled.");
                    }
                    animator.speed = (float)value;
                }
            }
        }
Example #8
0
 private static void C(ConCommandArgs args)
 {
     StompMain.bounceForce.Value = args.GetArgFloat(0);
 }
Example #9
0
 private static void B(ConCommandArgs args)
 {
     StompMain.minFallSpeed.Value = args.GetArgFloat(0);
 }
Example #10
0
 private static void A(ConCommandArgs args)
 {
     StompMain.maxDistance.Value = args.GetArgFloat(0);
 }
Example #11
0
        private static void RELATIVEBITCH(ConCommandArgs args)
        {
            var minecraft = args.senderBody.gameObject.GetComponent <Minecraft>();

            if (minecraft)
            {
                if (minecraft.currentSelectedObject)
                {
                    minecraft.currentSelectedObject.transform.position += new Vector3(args.GetArgFloat(0), args.GetArgFloat(1), args.GetArgFloat(2));
                }
            }
        }