Skip to content

Commit

Permalink
Merge pull request #12 from DerpyNewbie/chore/log-execute-global-exec…
Browse files Browse the repository at this point in the history
…utor

Add username logging for ExecuteGlobalCommand
  • Loading branch information
DerpyNewbie authored Nov 3, 2024
2 parents 038eb1f + 6c2782b commit 5a2128b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using DerpyNewbie.Logger;
using DerpyNewbie.Common;
using DerpyNewbie.Logger;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
Expand All @@ -14,7 +15,9 @@ public class ExecuteGlobalCommand : ActionCommandHandler

[UdonSynced]
private string _globalExecutionCommand;

private int _lastRequestVersion;

[UdonSynced]
private int _requestVersion;

Expand All @@ -33,7 +36,7 @@ private void _Execute()
{
_lastRequestVersion = _requestVersion;
_console.Println(
$"Globally executing command with request version of {_requestVersion}: \"{_globalExecutionCommand}\"");
$"{NewbieUtils.GetPlayerName(Networking.GetOwner(gameObject))} is globally executing a command with request version of {_requestVersion}: \"{_globalExecutionCommand}\"");
_console.Evaluate(_globalExecutionCommand);
}
}
Expand Down

0 comments on commit 5a2128b

Please sign in to comment.