Page 1 of 1

[Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction

Posted: Fri Oct 25, 2024 1:25 pm
by azaghal
Description
Using deconstruction planner from player's library to deconstruct an area via player.cursor_record.deconstruct_area invocation has no effect.
Reproduction steps
  1. Start a new game, and place some belts and belt ghosts in vicinity of the shipwreck.
  2. Create a deconstruction planner with a single whitelist filter for the belts.
  3. Place deconstruction planner into player's library.
  4. Pick the deconstruction planner from the library, and run the following snippet via console:

    Code: Select all

    /c game.player.cursor_record.deconstruct_area{surface=game.player.surface, force = game.player.force, by_player = game.player, area = {{-50, -50}, {50, 50}}}
    
Expected results
  • In step (4), the deconstruction planner removes the belt ghosts.
  • In step (4), the deconstruction planner orders deconstruction of constructed belts.
Actual results
  • In step (4), belt ghosts are unaffected and remain on the surface.
  • In step (4), constructed belts are unaffected, and are not marked for deconstruction.
Additional information
If the same deconstruction planner is put into player's inventory and the deconstruct_area is invoked via player.cursor_stack instead, everything works as expected. Presence/absence of filters in deconstruction planner does not seem to make any difference. Tested against plain vanilla (just the base game mod enabled) as well.

Re: [Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction

Posted: Sun Oct 27, 2024 8:49 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.

Re: [Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction

Posted: Sun Oct 27, 2024 9:31 pm
by azaghal
Thank you for fixing it this quickly :)