Skip to content

Commit

Permalink
Merge branch 'release/0.12.2.1222'
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-code committed Nov 29, 2017
2 parents 2f1de59 + 86ea824 commit 7f7f9cf
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Version 0.12.2.1222 - 2017-11-29

## Fixes
- Fixed outdated save game versions crashing the game
- Fixed buttons not being set to inactive state correctly




# Version 0.12.1.1218 - 2017-11-29

## Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# On The Roadside

[![Version](https://img.shields.io/badge/Version-0.12.1.1218-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest)
[![Version](https://img.shields.io/badge/Version-0.12.2.1222-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)

Expand Down
7 changes: 6 additions & 1 deletion src/SaveHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ function SaveHandler.load( path )
end

function SaveHandler.loadVersion( path )
return Compressor.load( path .. '/' .. VERSION_FILE ).version
local result, error = Compressor.load( path .. '/' .. VERSION_FILE )
if not result then
Log.warn( error, 'SaveHandler' )
return '<undefined>'
end
return result.version
end

function SaveHandler.getSaveFolder()
Expand Down
4 changes: 2 additions & 2 deletions src/ui/elements/UIButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ end
-- Public Methods
-- ------------------------------------------------

function UIButton:initialize( px, py, x, y, w, h, callback, text, alignMode, active )
function UIButton:initialize( px, py, x, y, w, h, callback, text, alignMode )
UIElement.initialize( self, px, py, x, y, w, h )

self.callback = callback
self.text = text
self.alignMode = alignMode or 'center'
self.active = active or true
self.active = true
end

function UIButton:draw()
Expand Down
4 changes: 3 additions & 1 deletion src/ui/screens/SavegameScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ function SavegameScreen.new()
end
end

return UIButton( lx, ly, 0, 0, BUTTON_LIST_WIDTH, 1, callback, str, 'center', version == getVersion() )
local button = UIButton( lx, ly, 0, 0, BUTTON_LIST_WIDTH, 1, callback, str, 'center' )
button:setActive( version == getVersion() )
return button
end


Expand Down
7 changes: 7 additions & 0 deletions src/util/Compressor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ function Compressor.load( path )

-- Decompress and return the loaded lua file.
local rawstring = love.math.decompress( compressedData, 'lz4' )

-- Print a warning if it can't be loaded and return false.
local result, error = load( rawstring )
if not result then
return result, error
end

return load( rawstring )()
end

Expand Down
4 changes: 2 additions & 2 deletions version.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local version = {
major = 0,
minor = 12,
patch = 1,
build = 1218,
patch = 2,
build = 1222,
}

return string.format( "%d.%d.%d.%d", version.major, version.minor, version.patch, version.build );

0 comments on commit 7f7f9cf

Please sign in to comment.