diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f7f05c..f65b02f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Version 0.8.2.976 - 2017-04-14 + +## Fixes +- Fixed crash when trying to drag an item stack in the inventory screen +- Fixed highlighting of equipment slots not being removed correctly + + + + # Version 0.8.1.949 - 2017-04-09 ## Fixes diff --git a/README.md b/README.md index 90a55308..4c1bd241 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # On The Roadside -[![Version](https://img.shields.io/badge/Version-0.8.1.949-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) +[![Version](https://img.shields.io/badge/Version-0.8.2.976-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) [![LOVE](https://img.shields.io/badge/L%C3%96VE-0.10.2-EA316E.svg)](http://love2d.org/) [![Build Status](https://travis-ci.com/rm-code/On-The-Roadside.svg?token=q3rLXeyGTBN9VB2zsWMr&branch=develop)](https://travis-ci.com/rm-code/On-The-Roadside) diff --git a/src/inventory/ItemStack.lua b/src/inventory/ItemStack.lua index 51becaa7..fff96161 100644 --- a/src/inventory/ItemStack.lua +++ b/src/inventory/ItemStack.lua @@ -65,6 +65,10 @@ function ItemStack.new( id ) return t; end + function self:isSameType( itemType, subType ) + return items[#items]:isSameType( itemType, subType ) + end + function self:getItem() return items[#items]; end diff --git a/src/ui/inventory/UIEquipmentItem.lua b/src/ui/inventory/UIEquipmentItem.lua index 367d7909..3e7a42f4 100644 --- a/src/ui/inventory/UIEquipmentItem.lua +++ b/src/ui/inventory/UIEquipmentItem.lua @@ -52,9 +52,7 @@ function UIEquipmentItem.new( id, x, y, width, height, slot ) end function self:highlight( nitem ) - if nitem then - highlight = nitem:isSameType( slot:getItemType(), slot:getSubType() ); - end + highlight = nitem and nitem:isSameType( slot:getItemType(), slot:getSubType() ) or false end function self:getSlot() diff --git a/version.lua b/version.lua index 2b58901e..ea5ec516 100644 --- a/version.lua +++ b/version.lua @@ -1,8 +1,8 @@ local version = { major = 0, minor = 8, - patch = 1, - build = 949, + patch = 2, + build = 976, } return string.format( "%d.%d.%d.%d", version.major, version.minor, version.patch, version.build );