Skip to content

Commit

Permalink
Merge pull request CorsixTH#2606 from lewri/068_beta_prep
Browse files Browse the repository at this point in the history
0.68.0 Beta 1 - prep
  • Loading branch information
TheCycoONE authored Sep 2, 2024
2 parents 8f15509 + 2e7f43a commit 569a03c
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 13 deletions.
26 changes: 20 additions & 6 deletions CorsixTH/Lua/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local runDebugger = corsixth.require("run_debugger")
-- and add compatibility code in afterLoad functions
-- Recommended: Also replace/Update the summary comment

local SAVEGAME_VERSION = 190 -- Improve falling actions for debug purposes
local SAVEGAME_VERSION = 191 -- CorsixTH 0.68.0~beta1

class "App"

Expand Down Expand Up @@ -1638,8 +1638,13 @@ end
function App:getVersion(version)
local ver = version or self.savegame_version

if ver > 180 then
-- Versioning format is major.minor.revision (required) Patch (optional)
-- Old versions (<= 0.67) retain existing format
-- All patch versions should be retained in this table (due to be replaced, see PR2518)
if ver > 191 then
return "Trunk"
elseif ver > 180 then
return "v0.68.0 Beta 1"
elseif ver > 170 then
return "v0.67"
elseif ver > 156 then
Expand Down Expand Up @@ -1834,6 +1839,12 @@ function App:afterLoad()
self.world:afterLoad(old, new)
end

--! Runs a comparison between the current (installed) version and the reported
--! update table hosted by Github. If the update table is newer, it will generate
--! an update window.
--! As pre-releases are not announced on the update table, the checker also assumes
--! that any current version with a patch in its name (Beta, RC, etc) will be older
--! than the update table's version if their major, minor, and revision components match.
function App:checkForUpdates()
-- Only check for updates once per application launch
if not self.check_for_updates or not self.config.check_for_updates then return end
Expand Down Expand Up @@ -1863,19 +1874,22 @@ function App:checkForUpdates()
local new_version = update_table.major .. '.' .. update_table.minor .. '.' .. update_table.revision

-- Semantic version comparison of the current and update version numbers
-- A return value of true means the current version is newer
local function compare_versions()
local current_major, current_minor, current_revision = string.match(current_version, "(%d+)%.(%d+)%.?(%d*)")
local current_major, current_minor, current_revision, current_patch =
string.match(current_version, "(%d+)%.(%d+)%.?(%d*) ?(.*)")
current_major, current_minor = tonumber(current_major), tonumber(current_minor)
if current_major > update_table.major then return true
elseif current_major < update_table.major then return false
end
if current_minor > update_table.minor then return true
elseif current_minor < update_table.minor then return false
end

current_revision = tonumber(current_revision) or 0
if current_revision >= update_table.revision then return true
else return false
end
current_patch = string.len(current_patch) > 0 and current_patch
if current_patch then return current_revision > update_table.revision end
return current_revision >= update_table.revision
end
if compare_versions() then
print("You are running the latest version of CorsixTH.")
Expand Down
110 changes: 105 additions & 5 deletions CorsixTH/com.corsixth.corsixth.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,105 @@
</provides>
<launchable type="desktop-id">com.corsixth.corsixth.desktop</launchable>
<releases>
<release version="0.68.0~beta1" date="2024-09-01" type="development">
<description>
<p>New Features:</p>
<ul>
<li>In-game movies now play for users using TH Data directly from a .ISO
file</li>
<li>Custom campaign creators can now optionally use the original level
advance movie when progressing through the campaign</li>
<li>The Map Editor has received some love including new features, fixes,
and jukebox controls</li>
<li>You can now control the Jukebox from the Main Menu by going to Options
&gt; Jukebox</li>
<li>External (non-TH) XMI files are now supported by the Jukebox</li>
<li>The adviser now tells you the cost of replacing your machine if you
cannot currently afford it</li>
<li>More cheats!</li>
<li>[Experimental] Right mouse panning can now be used instead of using the
middle mouse button. Enable it in the configuration file</li>
<li>[Experimental] We&apos;re closer to fully implementing falling actions!
Get a sneak peek and get the chance to push people over by enabling it
in the configuration file/debug menu</li>
</ul>
<p>Changes:</p>
<ul>
<li>The demo movie will no longer play and cause jumpscares at the main menu
if the CorsixTH window is not in focus</li>
<li>Game speeds are now more closely aligned with the original game</li>
<li>Improvements to handling of win/lose conditions, and the progress
report</li>
<li>Staff tiredness levels are now taken from the level config file based on
difficulty level of the main campaign</li>
<li>You can no longer win a level if you still have outstanding loans</li>
<li>Emergencies will now be announced once patients actually begin arriving
instead of at the start</li>
<li>Errors with music playback will now attempt to provide more helpful
information in the console</li>
<li>Level briefings now show before the in-game tutorial</li>
<li>The first patient of a level will now arrive faster after opening the
hospital</li>
<li>The information dialog box is now more closely aligned with the original
game</li>
<li>The tip of the day window should no longer be obscured in the main
menu</li>
<li>The load/save windows now have better labelling</li>
<li>Unavailable languages are shown as disabled until you select a Unicode
font</li>
<li>Support is added to auto-detect a Theme Hospital install via GOG
Galaxy</li>
</ul>
<p>Translations:</p>
<ul>
<li>Dutch translation has been updated</li>
<li>Italian translation has been updated</li>
<li>Russian translation has been updated</li>
<li>Spanish translation has been updated</li>
<li>French translation has been updated</li>
<li>Some unused language strings have been cleaned up</li>
<li>Custom campaign and level creators can now optionally add translated
strings for campaign description, level briefing, and winning text</li>
</ul>
<p>Bug Fixes:</p>
<ul>
<li>Swing (double) doors will no longer crash your game if you built rooms
that used them while paused</li>
<li>Fixed a bug for NVIDIA users who didn&apos;t like graphical corruption
when playing fullscreen at non-native resolutions</li>
<li>Games should no longer crash irrecoverably because you have a 4k monitor
:) </li>
<li>The game will now exit to the main menu cleanly if a problem occurred
trying to load a new level or map</li>
<li>Staff who have left the hospital can no longer ask for a raise</li>
<li>Fixed a bug where some staff may have no initial before surname</li>
<li>Patients can no longer litter outdoors</li>
<li>Fixed a bug where an unreachable reception desk could cause a crash</li>
<li>The Computer and Atom Analyser now make button sounds as originally
intended</li>
<li>The mark for vaccination action now makes a sound as originally
intended</li>
<li>Fixed a rare bug where edges of map tiles for parcels could cause
unintended behaviour when purchasing plots</li>
<li>Active cheats will now persist across saves</li>
<li>Audio settings have better safeguards against no audio enabled/no
background music</li>
<li>Movies will no longer attempt to play audio when global audio is off</li>
<li>Config values using brackets (such as a custom music directory) will now
work properly</li>
<li>Custom campaigns menu now will use a scrollbar for long campaign
descriptions</li>
<li>Continue Game now properly targets files explicitly ending in the .sav
format</li>
<li>Fixed an instance where information boxes could load pink from older
savegames</li>
<li>Implemented a more permanent fix for the money bar being drawn
incorrectly in some CJK and Cyrllic languages</li>
<li>Fixed a crash on exit that could occur in some systems</li>
<li>Mouse panning behaviour has been made more responsive and accurate</li>
</ul>
</description>
</release>
<release version="0.67" date="2023-08-12" type="stable">
<description>
<p>New Features:</p>
Expand Down Expand Up @@ -359,14 +458,13 @@
</releases>
<screenshots>
<screenshot type="default">
<caption>Welcome dialog for first hospital</caption>
<image>https://corsixth.com/media/screenshots/1-medium.jpg</image>
</screenshot>
<screenshot>
<caption>First level in progress</caption>
<image>https://corsixth.com/media/screenshots/2-medium.jpg</image>
</screenshot>
<screenshot>
<image>https://camo.githubusercontent.com/1b82352e0f0eac03a6927af7e9d7bbad8c380f93/687474703a2f2f692e696d6775722e636f6d2f714856363055692e706e67</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">intense</content_attribute>
Expand Down Expand Up @@ -397,10 +495,12 @@
<content_attribute id="money-purchasing">none</content_attribute>
<content_attribute id="money-gambling">none</content_attribute>
</content_rating>
<developer_name>CorsixTH developers</developer_name>
<developer id="com.corsixth">
<name>CorsixTH developers</name>
</developer>
<url type="homepage">https://corsixth.com</url>
<url type="vcs-browser">https://github.com/CorsixTH/CorsixTH</url>
<url type="bugtracker">https://github.com/CorsixTH/CorsixTH/issues</url>
<url type="contact">https://webchat.freenode.net/?channels=corsix-th</url>
<url type="contact">https://discord.gg/Mxeztvh</url>
<url type="help">https://github.com/CorsixTH/CorsixTH/wiki</url>
</component>
2 changes: 1 addition & 1 deletion CorsixTH/corsix-th.6
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ Copyright CorsixTH contributors.
CorsixTH is available under the MIT license.
.Pp
For the full license text see:
.Lk https://raw.githubusercontent.com/CorsixTH/CorsixTH/v0.67/LICENSE.txt
.Lk https://raw.githubusercontent.com/CorsixTH/CorsixTH/v0.68.0-beta1/LICENSE.txt
2 changes: 1 addition & 1 deletion WindowsInstaller/Win32Script.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
;---------------------------------- Definitions for the game -----------------------------------

!define PRODUCT_NAME "CorsixTH"
!define PRODUCT_VERSION "0.67"
!define PRODUCT_VERSION "0.68.0-beta1"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
Expand Down

0 comments on commit 569a03c

Please sign in to comment.