Picker Extended Reborn

by Kryzeth

It's Back! An attempt to recover most Picker Extended functionality. Includes Planner Menu, Planner Zapper, Held Item Count, Belt Reverser, Auto Ghost Reviver, Auto Inventory Sort, Player Searchlight, Quality Item Scrolling, and more!

Utilities
2 days ago
2.0
2.02K
Blueprints

b [Fixed] Auto Ghost Revive isn't enabled when adding the mod to an existing save

3 days ago

When you start a brand new save, the shortcut button is lit up and Auto Ghost Revive is enabled and working.

When you load a save which didn't have Picker on it before, the shortcut button is lit up, but Auto Ghost is disabled and doesn't work. Clicking the shortcut once makes the button lit up (no change), enables Auto Ghost and causes it to work.

I don't know if you intend for Auto Ghost to initialise as Enabled. I had the same problem for a button that I wanted to start as Disabled, so I used this code:

script.on_init(function()
    -- Visually turn off the shortcut button the first time the game
    -- is loaded
    for _, player in pairs(game.players) do
        player.set_shortcut_toggled("my-event", false)
    end
end)

script.on_event(defines.events.on_player_created, function(e)
    -- Turn shortcut off for multiplayer when a player joins
    game.players[e.player_index].set_shortcut_toggled("my-event", false)
end)
3 days ago

Thanks for the report, I'll admit I hadn't tested much with adding the mod to an existing save, but I can understand the issue. Thanks for the code excerpt as well, I'll see about adapting it to ensure the revival feature works properly on existing saves.

3 days ago

Hopefully should be fixed in v1.0.10

2 days ago
(updated 2 days ago)

I'll admit I hadn't tested much with adding the mod to an existing save

Really? How do you test on_init()? I always load from a vanilla test-world save.

It looks like you fixed the bug, but you left a game.print() in there.

New response