ClientExclusive = true // opening VV window is client-side. Don't ask server to run this verb.
};
args.Verbs.Add(verb);
-
- // Inspect mind
- if (TryComp<MindContainerComponent>(args.Target, out var mindContainer)
- && mindContainer.HasMind)
- {
- Verb mindVerb = new()
- {
- Text = Loc.GetString("inspect-mind-verb-get-data-text"),
- Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
- Category = VerbCategory.Debug,
- Act = () => _clientConsoleHost.ExecuteCommand($"vv {GetNetEntity(mindContainer.Mind)}"),
- ClientExclusive = true
- };
- args.Verbs.Add(mindVerb);
- }
}
if (!_admin.IsAdmin(args.User))
});
}
- if (_mindSystem.TryGetMind(args.Target, out _, out var mind) && mind.UserId != null)
+ if (_mindSystem.TryGetMind(args.Target, out var mindId, out var mindComp) && mindComp.UserId != null)
{
// Erase
args.Verbs.Add(new Verb
new("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
Act = () =>
{
- _adminSystem.Erase(mind.UserId.Value);
+ _adminSystem.Erase(mindComp.UserId.Value);
},
Impact = LogImpact.Extreme,
ConfirmationPopup = true
Category = VerbCategory.Admin,
Act = () =>
{
- _console.ExecuteCommand(player, $"respawn \"{mind.UserId}\"");
+ _console.ExecuteCommand(player, $"respawn \"{mindComp.UserId}\"");
},
ConfirmationPopup = true,
// No logimpact as the command does it internally.
});
+
+ // Inspect mind
+ args.Verbs.Add(new Verb
+ {
+ Text = Loc.GetString("inspect-mind-verb-get-data-text"),
+ Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
+ Category = VerbCategory.Debug,
+ Act = () => _console.RemoteExecuteCommand(player, $"vv {GetNetEntity(mindId)}"),
+ });
}
// Freeze