Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.5.1
Date: 05. 09. 2020
Bugfixes:
- Fix crash on selecting new blueprint book

---------------------------------------------------------------------------------------------------
Version: 0.5.0
Date: 31. 01. 2020
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BlueprintExtensions",
"version": "0.5.0",
"version": "0.5.1",
"title": "Blueprint Extensions",
"author": "Dewin",
"contact": "https://github.com/dewiniaid/BlueprintExtensions",
Expand Down
6 changes: 5 additions & 1 deletion util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ function Util.get_blueprint(bp)
return nil
end
if bp.is_blueprint_book and bp.active_index then
return Util.get_blueprint(bp.get_inventory(defines.inventory.item_main)[bp.active_index])
local inventory = bp.get_inventory(defines.inventory.item_main)
if inventory.get_item_count() == 0 then
return nil
end
return Util.get_blueprint(inventory[bp.active_index])
end
if bp.is_blueprint then
return bp
Expand Down