Merge pull request #2009 from lewri/Hotfix_trophies

[RDY] Backport Trophy Fix (0.65)
This commit is contained in:
Stephen E. Baker
2021-07-17 10:07:18 -04:00
committed by GitHub
4 changed files with 40 additions and 1 deletions

View File

@@ -1485,7 +1485,7 @@ function App:getVersion(version)
if ver > 156 then
return "Trunk"
elseif ver > 138 then
return "v0.65"
return "v0.65.1"
elseif ver > 134 then
return "v0.64"
elseif ver > 127 then

View File

@@ -43,6 +43,7 @@ function Map:Map(app)
-- Difficulty of the level (string) "easy", "full", "hard".
-- Use map:getDifficulty() to query the value.
self.difficulty = nil
self.hotfix1 = true
end
local flag_cache = {}
@@ -738,6 +739,24 @@ function Map:getParcelTileCount(parcel)
return self.parcelTileCounts[parcel] or 0
end
--! Apply a hotfix to this save..
--! Note this is only temporary as a backport for 0.65
--!param num (int) the hotfix number
--!param issue (num) the issue number
function Map:applyHotfix(num, issue)
assert((num and issue), "Hotfix parameters given are undefined!")
if num == 1 then
self.level_config.awards_trophies.TrophyAllCuredBonus = 20000
self.level_config.awards_trophies.AllCuresBonus = 5000
self.hotfix1 = true
local string = "Game successfully patched with hotfix " .. num .. " (Issue #" .. issue .. ")"
self.app.world:gameLog(string)
else
local string = "Hotfix " .. num .. " not found. The game may result in unexpected behavior."
self.app.world:gameLog(string)
end
end
function Map:afterLoad(old, new)
if old < 6 then
self.parcelTileCounts = {}
@@ -802,4 +821,8 @@ function Map:afterLoad(old, new)
self:setCellFlags(58, 72, {passable = false})
end
end
-- 0.65 has a hotfix, make sure we patch any affected games
if not self.hotfix1 then
self:applyHotfix(1, 2004)
end
end

View File

@@ -26,6 +26,15 @@
</provides>
<launchable type="desktop-id">com.corsixth.corsixth.desktop</launchable>
<releases>
<release version="0.65.1" date="2021-07-17" type="stable">
<description>
<p>This is a hotfix release of 0.65 and replaces the June 2021 release</p>
<ul>
<li>Fixes a bug where the game would crash if you got the All Cured trophy at the
end of year awards, when loading a save from 0.64 or earlier</li>
</ul>
</description>
</release>
<release version="0.65" date="2021-06-19" type="stable">
<description>
<p>New Features:</p>

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------------------
Version 0.65.1 - released July 2021
-------------------------------------------------------------------------------
# This is a hotfix release of 0.65 and replaces the June 2021 release
* Fixes a bug where the game would crash if you got the All Cured trophy at the
end of year awards, when loading a save from 0.64 or earlier
-------------------------------------------------------------------------------
Version 0.65 - released June 2021
-------------------------------------------------------------------------------