Hello,
First of all, thanks for releasing this nifty little mod, it is really nice to have all the quick bar slots at a fingertip in this manner :)
You might already be aware of this, but unfortunately swapping the positions of blueprints does not work, and either leaves "bogus" blueprints in the quick bar slots (in case of inventory blueprints), or removes them completely from the quick bar altogether (in case of player/game library blueprints).
After fiddling around a bit with the code, I do have a patch that could fix it, but the caveat is that it is impossible to currently detect whether some slot contains a blueprint from the library, so the patch tries to "work-around" this issue by simply refusing to swap anything that might be an empty field or a blueprint.
Would you be interested into incorporating such a patch? If interested, I could also try to implement this as one or two mod options and make the behaviour configurable.
diff --git a/control.lua b/control.lua
index 76ec555..7081118 100644
--- a/control.lua
+++ b/control.lua
@@ -22,7 +22,15 @@ end
--copy 5 filters from start location to target.
function Copy(quick_bar_copy, set_quick_bar_slot, start, target)
+ local source_slot
+ local target_slot
+
for i = 0, 4 do
- set_quick_bar_slot(target + i, quick_bar_copy[start + i])
+ source_slot = quick_bar_copy[start+i]
+ target_slot = quick_bar_copy[target+i]
+
+ if source_slot ~= nil and source_slot.name ~= "blueprint" and target_slot ~= nil and target_slot.name ~= "blueprint" then
+ set_quick_bar_slot(target + i, quick_bar_copy[start + i])
+ end
end
-end
\ No newline at end of file
+end
Best regards,
Branko
P.S.
As a side-note, would you be interested in setting-up project on some Git repository hosting forge for eventual future pull requests?