Ejemplo n.º 1
0
        private static void TargetTakeDamage(ConCommandArgs args)
        {
            var localMaster = PlayerCharacterMasterController.instances[0].master;
            var component   = HasComponent(localMaster);

            if (component && component.HasBody())
            {
                var healthComponent = component.targetedBody.healthComponent;
                if (healthComponent)
                {
                    healthComponent.TakeDamage(new DamageInfo
                    {
                        damage     = args.GetArgInt(0),
                        crit       = args.GetArgBool(1),
                        rejected   = args.GetArgBool(2),
                        damageType = (DamageType)args.GetArgInt(3)
                    });
                }
            }
        }
        private static void CCPermissionEnable(ConCommandArgs args)
        {
            if (args.Count == 0)
            {
                IsEnabled.Value = !IsEnabled.Value;
            }
            else
            {
                IsEnabled.Value = args.GetArgBool(0);
            }

            var res = IsEnabled.Value ? "enabled" : "disabled";

            Log.MessageNetworked($"Permission System is {res}", args, Log.LogLevel.Info);
        }
Ejemplo n.º 3
0
        private static void CCPermissionEnable(ConCommandArgs args)
        {
            if (args.Count == 0)
            {
                IsEnabled.Value = !IsEnabled.Value;
            }
            else
            {
                IsEnabled.Value = args.GetArgBool(0);
            }

            var res = IsEnabled.Value ? "enabled. Saving and reloading the permission system" : "disabled";

            Log.MessageNetworked($"Permission System is {res}.", args, Log.LogLevel.Info);

            DebugToolkit.Configuration.Save();
            Init();
        }
Ejemplo n.º 4
0
 private static void CCClearChat(ConCommandArgs args)
 {
     DD2LobbySetupComponent.debug = args.GetArgBool(0);
     Debug.Log($"dd2lobby_debug_toggle set to {args.GetArgBool(0)}");
 }
Ejemplo n.º 5
0
 private static void DiscoverScene(ConCommandArgs args)
 {
     PrintSceneCollisions(args.GetArgBool(0));
 }