Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable demo movie #2340

Merged
merged 1 commit into from May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CorsixTH/Lua/app.lua
Expand Up @@ -1209,7 +1209,7 @@ end
--! Function for handling idle time in the main menu, which leads to playing the
--! demo gameplay trailer if left long enough
function App:idle()
if not self.config.play_intro then return end
if not self.config.play_demo then return end
-- Check if we are in a proper 'idle' state and solely on the main menu
if not self.ui:getWindow(UIMainMenu) or self.ui:getWindow(UIUpdate)
or self.ui:getWindow(UIConfirmDialog) then
Expand Down
5 changes: 5 additions & 0 deletions CorsixTH/Lua/config_finder.lua
Expand Up @@ -114,6 +114,7 @@ local config_defaults = {
grant_wage_increase = false,
movies = true,
play_intro = true,
play_demo = true,
allow_user_actions_while_paused = false,
volume_opens_casebook = false,
alien_dna_only_by_emergency = true,
Expand Down Expand Up @@ -338,6 +339,10 @@ local string_01 = [=[
--]=] .. '\n' ..
'play_intro = ' .. tostring(config_values.play_intro) .. '\n' .. [=[

-- Demo movie (played on idle at main menu): Enabled by default
--]=] .. '\n' ..
'play_demo = ' .. tostring(config_values.play_demo) .. '\n' .. [=[

-------------------------------------------------------------------------------
-- Allow user actions while game is paused
-- In Theme Hospital the player would only be allowed to use the top menu if
Expand Down
4 changes: 4 additions & 0 deletions WindowsInstaller/config_template.txt
Expand Up @@ -146,6 +146,10 @@ movies = true
--
play_intro = true

-- Demo movie (played on idle at main menu): Enabled by default
--
play_demo = true

-------------------------------------------------------------------------------
-- Allow user actions while game is paused
-- In Theme Hospital the player would only be allowed to use the top menu if
Expand Down