Skip to content

Toolshed "delete" command has a problem with seemingly unrelated entities #6283

@hyphenationc

Description

@hyphenationc

What version did the issue occur in?

No response

Description

do "delete $ID" seems to have issues with entities that have... subordinate? entities, and will error out after the first deletion almost every time because a (presumably) subordinate entity gets its MetaDataComponent taken away or otherwise misplaced, which toolshed does not seem to like.

I will note I am making a great amount of estimation here. I'm not smart enough to figure out what is actually happening.

Reproduction

-2. (Control 1) spawn a group of entities that aren't... "complex" (for example, TableFancyOrange) and then do > entities prototyped TableFancyOrange do "delete $ID". This should go off without a problem.
Image

-1. (Control 2) use the command delete entityID on a "complex" entity directly. This should also occur without issue.
Image

  1. Spawn a group of entities that are more complex, such as a gun or a mob. These should all be the same entity. I recommend doing > entities prototyped Prototype and making note of the entity IDs that are returned.
Image
  1. Attempt to do > entities prototyped Prototype do "delete $ID". It will delete precisely one of these entities, seemingly picked at random, and then it will error out, citing an entity that was not listed in the earlier > entities prototyped Prototype return.
Image Image

(pardon the two screenshots for the same thing, I dunno how to increase the size of the console, if it can even be done, and would like to include the full stack)

Additional Context

This is a potential, albeit minor, problem for administration regarding entity spam (and the deletion thereof).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions