RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

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

Open hyphenationc opened this issue 2 months ago • 2 comments

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

  2. 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).

hyphenationc avatar Oct 31 '25 13:10 hyphenationc

Also happens with entities prototyped TableFancyOrange delete without using the do "delete $ID"

slarticodefast avatar Oct 31 '25 20:10 slarticodefast

This has nothing to do with the delete command, its just an issue with the prototyped command doesn't handle nonexistent / deleted entities.

ElectroJr avatar Nov 01 '25 23:11 ElectroJr