Toolshed part 2 (#18997)

* fixe

* Save work.

* Rune-aware parser.

* oogh

* pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests pass tests

* Publicizes a lot of common generic commands, so custom toolshed envs can include them.

* i think i might implode

* Tests.

* a

* b

* awa

---------

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
Moony
2023-08-23 16:03:41 -05:00
committed by GitHub
parent 852b66dee6
commit 3d3c9e3348
20 changed files with 349 additions and 162 deletions

View File

@@ -248,22 +248,22 @@ namespace Content.Server.Polymorph.Systems
/// </summary>
/// <param name="uid">The entityuid of the entity being reverted</param>
/// <param name="component"></param>
public void Revert(EntityUid uid, PolymorphedEntityComponent? component = null)
public EntityUid? Revert(EntityUid uid, PolymorphedEntityComponent? component = null)
{
if (Deleted(uid))
return;
return null;
if (!Resolve(uid, ref component))
return;
return null;
var parent = component.Parent;
if (Deleted(parent))
return;
return null;
if (!_proto.TryIndex(component.Prototype, out PolymorphPrototype? proto))
{
_sawmill.Error($"{nameof(PolymorphSystem)} encountered an improperly initialized polymorph component while reverting. Entity {ToPrettyString(uid)}. Prototype: {component.Prototype}");
return;
return null;
}
var uidXform = Transform(uid);
@@ -317,6 +317,8 @@ namespace Content.Server.Polymorph.Systems
("child", Identity.Entity(parent, EntityManager))),
parent);
QueueDel(uid);
return parent;
}
/// <summary>