void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        VariableViewer.ProcessTile(Location);
    }
Ejemplo n.º 2
0
    void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        VariableViewer.RequestSendBook(BookID, SentByPlayer.GameObject);
    }
Ejemplo n.º 3
0
    void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        VariableViewer.RequestSendBookshelf(BookshelfID, IsNewBookshelf);
    }
Ejemplo n.º 4
0
    void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        VariableViewer.RequestOpenPageValue(PageID, SentenceID, ISSentence, iskey, SentByPlayer.GameObject);
    }
    void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        VariableViewer.RequestChangeVariable(PageID, newValue, SendToClient, SentByPlayer.GameObject, AdminId);

        Logger.Log($"Admin {admin.name} changed variable {PageID} (in VV) with a new value of: {newValue} ",
                   Category.Admin);
    }
Ejemplo n.º 6
0
    void ValidateAdmin()
    {
        var admin = PlayerList.Instance.GetAdmin(AdminId, AdminToken);

        if (admin == null)
        {
            return;
        }
        if (TheObjectToView != 0)
        {
            LoadNetworkObject(TheObjectToView);
            if (NetworkObject != null)
            {
                VariableViewer.ProcessTransform(NetworkObject.transform, SentByPlayer.GameObject);
            }
        }
        else
        {
            VariableViewer.RequestSendBookshelf(BookshelfID, IsNewBookshelf, SentByPlayer.GameObject);
        }
    }
Ejemplo n.º 7
0
 public override IEnumerator Process()
 {
     VariableViewer.RequestChangeVariable(PageID, newValue);
     yield return(null);
 }
Ejemplo n.º 8
0
 public override IEnumerator Process()
 {
     VariableViewer.RequestSendBookshelf(BookshelfID, IsNewBookshelf);
     yield return(null);
 }
 public override IEnumerator Process()
 {
     VariableViewer.ProcessTile(Location);
     yield return(null);
 }
Ejemplo n.º 10
0
 public override IEnumerator Process()
 {
     //var livingHealthBehaviour = SentByPlayer.Script.GetComponent<LivingHealthBehaviour>();
     VariableViewer.RequestOpenPageValue(PageID, SentenceID, ISSentence, iskey);
     yield return(null);
 }
Ejemplo n.º 11
0
 public override IEnumerator Process()
 {
     //var livingHealthBehaviour = SentByPlayer.Script.GetComponent<LivingHealthBehaviour>();
     VariableViewer.RequestSendBook(BookID);
     yield return(null);
 }
Ejemplo n.º 12
0
        public bool Process(InfoReader instance, CommandParser parser)
        {
            if (_viewer is null)
            {
                _viewer = new VariableViewer(instance.GetOrtdp());
            }

            if (parser.MainCommand == "var")
            {
                if (parser.Arguments[0] == "gui")
                {
                    if (!_msgLoopStarted)
                    {
                        if (instance.Setting.DebugMode.ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
                        {
                            IO.CurrentIO.Write($"Message loop on window VariableViewer started.");
                        }

                        Thread th = new Thread(() =>
                        {
                            System.Windows.Forms.Application.Run(_viewer);
                        });
                        th.Start();
                        if (th.ThreadState == ThreadState.Running)
                        {
                            _msgLoopStarted = true;
                        }
                        return(true);
                    }
                    if (instance.Setting.DebugMode.ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
                    {
                        IO.CurrentIO.Write($"Message loop on VariableViewer is running. Showing window...");
                    }
                    _viewer.Show();
                    return(true);
                }
                int      match             = 0;
                var      s                 = parser.Arguments[0];
                Type     t                 = instance.GetOrtdp().GetType();
                var      ps                = t.GetProperties();
                string[] gets              = s.Split('.');
                object   currentObject     = instance.GetOrtdp();
                var      currentProperties = ps;
                foreach (var name in gets)
                {
                    foreach (var property in currentProperties)
                    {
                        if (property.Name == name)
                        {
                            currentObject     = property.GetValue(currentObject);
                            currentProperties = currentObject.GetType().GetProperties();
                            match++;
                        }
                    }
                }

                IO.CurrentIO.Write(match == gets.Length
                    ? $"{s}:{currentObject}"
                    : NI18n.GetLanguageElement("LANG_ERR_VARNOTFOUND"));
                return(true);
            }


            return(true);
        }