* ogh

* i should save my work

* ogh

* hhcdfhjbghshbxdfhghshc
- lots of bugs in parsing still
- invocation is a stub

* expr parsing works

* awawa

* Saving work

* Improve APIs a bit all around, add shortcuts.

* awa

* awa

* AAAAAA

* save work

* Move shit to engine

* lord

* bql is kill

* forgot the fucking bike rack

* bql is kill for real

* pjb will kill me

* aughfhbdj

* adgddf

* gdsgvfvxshngfgh

* b

* hfsjhghj

* a

* tf you mean i have to document it

* follow C# standards

* Assorted cleanup and documentation pass, minor bugfix in ValueRefParser.

* Start porting old commands, remove that pesky prefix in favor of integrating with the shell.

* bw

* Fix valueref up a bit, improve autocomplete for it.

* awa

* fix tests

* git shut up

* Arithmetic commands.

* parse improvements

* Update engine.

---------

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
Moony
2023-08-02 16:09:08 -05:00
committed by GitHub
parent ad61c21c01
commit e2b22a4cd8
48 changed files with 1204 additions and 793 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Server.Administration.Commands;
using Content.Server.Administration.Logs;
using Content.Server.Administration.Managers;
@@ -31,6 +32,7 @@ using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Toolshed;
using Robust.Shared.Utility;
using static Content.Shared.Configurable.ConfigurationComponent;
@@ -55,6 +57,8 @@ namespace Content.Server.Administration.Systems
[Dependency] private readonly PrayerSystem _prayerSystem = default!;
[Dependency] private readonly EuiManager _eui = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly ToolshedManager _toolshed = default!;
[Dependency] private readonly RejuvenateSystem _rejuvenate = default!;
private readonly Dictionary<IPlayerSession, EditSolutionsEui> _openSolutionUis = new();
@@ -78,6 +82,14 @@ namespace Content.Server.Administration.Systems
if (_adminManager.IsAdmin(player))
{
Verb mark = new();
mark.Text = Loc.GetString("toolshed-verb-mark");
mark.Message = Loc.GetString("toolshed-verb-mark-description");
mark.Category = VerbCategory.Admin;
mark.Act = () => _toolshed.InvokeCommand(player, "=> $marked", Enumerable.Repeat(args.Target, 1), out _);
mark.Impact = LogImpact.Low;
args.Verbs.Add(mark);
if (TryComp(args.Target, out ActorComponent? targetActor))
{
// AdminHelp
@@ -188,8 +200,6 @@ namespace Content.Server.Administration.Systems
Category = VerbCategory.Admin,
Act = () =>
{
if (!TryComp<ActorComponent>(args.Target, out var actor)) return;
_console.ExecuteCommand(player, $"respawn {actor.PlayerSession.Name}");
},
ConfirmationPopup = true,
@@ -229,7 +239,7 @@ namespace Content.Server.Administration.Systems
Text = Loc.GetString("rejuvenate-verb-get-data-text"),
Category = VerbCategory.Debug,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")),
Act = () => RejuvenateCommand.PerformRejuvenate(args.Target),
Act = () => _rejuvenate.PerformRejuvenate(args.Target),
Impact = LogImpact.Medium
};
args.Verbs.Add(verb);
@@ -247,11 +257,11 @@ namespace Content.Server.Administration.Systems
Act = () =>
{
MakeSentientCommand.MakeSentient(args.Target, EntityManager);
var mind = player.ContentData()?.Mind;
if (mind == null)
return;
_mindSystem.TransferTo(mind, args.Target, ghostCheckOverride: true);
},
Impact = LogImpact.High,