Files
source/gamedir/Base/Scripts/Intro.lua
T
d683cdeb64 Run from gamedir (#686)
* prepare gamedir for running the game

* Stop telling installers to overwrite the vanilla game

The release no longer contains anything that lands on a vanilla file:
its base data lives in Base, so unpacking it over the game directory
and copying the game's Data into the release now amount to the same
installation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Give the mod's base data its own VFS profile

Its files ship in Base now, so that a vanilla Data directory can be
copied in whole without a single collision. Mount Base right above the
vanilla dirs in every profile stack — the slot where the installer's
overwrites used to end up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Mount Base in the language overlays' VFS configs too

Assembling a release copies a <Language>_Version directory over
gamedir, its own copies of the configs included, so without the same
Base profile every non-English release would mount nothing from Base.

Their libraries move along with the rest of the base data: each
language slf, and the Russian data.slf that shadows the vanilla
Data.slf by name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Ignore a vanilla Data directory dropped into gamedir

Running the game here needs one copied in, and it is an untouched copy
of somebody's retail install — nothing this repository should track.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Ignore only the player profile directory, not every Profiles

The unanchored pattern also swallowed Base/TableData/Profiles, the
mod's soldier profile XMLs, which are tracked and belong in a release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* move gamedir/Data to gamedir/Base

* move gamedir-languages' Data to Base

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 11:05:15 -03:00

155 lines
4.2 KiB
Lua

Video =
{
INTRO_NO_VIDEO = -1,
INTRO_REBEL_CRDT = 0,
INTRO_OMERTA = 1,
INTRO_PRAGUE_CRDT = 2,
INTRO_PRAGUE = 3,
-- There are no more videos shown for the begining
INTRO_END_END_SPEECH_MIGUEL = 4,
INTRO_END_END_SPEECH_NO_MIGUEL = 5,
INTRO_END_HELI_FLYBY = 6,
INTRO_END_SKYRIDER_HELICOPTER = 7,
INTRO_END_NOSKYRIDER_HELICOPTER = 8,
INTRO_SPLASH_SCREEN = 9,
INTRO_SPLASH_TALONSOFT = 10,
-- There are no more videos shown for the endgame
INTRO_LAST_END_GAME = 11,
INTRO_FIRST_VIDEO = 255,
}
IntroType =
{
INTRO_BEGINNING = 0, -- Set when viewing the intro at the begining of the game
INTRO_ENDING = 1, -- Set when viewing the end game video.
INTRO_SPLASH = 2,
}
ScreenTypes =
{
EDIT_SCREEN = 0,
SAVING_SCREEN = 1,
LOADING_SCREEN = 2,
ERROR_SCREEN = 3,
INIT_SCREEN = 4,
GAME_SCREEN = 5,
ANIEDIT_SCREEN = 6,
PALEDIT_SCREEN = 7,
DEBUG_SCREEN = 8,
MAP_SCREEN = 9,
LAPTOP_SCREEN = 10,
LOADSAVE_SCREEN = 11,
MAPUTILITY_SCREEN = 12,
FADE_SCREEN = 13,
MSG_BOX_SCREEN = 14,
MAINMENU_SCREEN = 15,
AUTORESOLVE_SCREEN = 16,
SAVE_LOAD_SCREEN = 17,
OPTIONS_SCREEN = 18,
SHOPKEEPER_SCREEN = 19,
SEX_SCREEN = 20,
GAME_INIT_OPTIONS_SCREEN = 21,
DEMO_EXIT_SCREEN = 22,
INTRO_SCREEN = 23,
CREDIT_SCREEN = 24,
}
function PrepareToExitIntroScreen()
if ( gbIntroScreenMode == IntroType.INTRO_BEGINNING ) then
SetIntroExitScreen ( ScreenTypes.INIT_SCREEN )
-- if its the intro at the begining of the game
elseif ( gbIntroScreenMode == IntroType.INTRO_SPLASH ) then
-- display a logo when exiting
DisplaySirtechSplashScreen()
SetDoneWithSplashScreen ( true )
SetIntroExitScreen ( ScreenTypes.INIT_SCREEN )
else
-- We want to reinitialize the game
ReStartingGame()
SetIntroExitScreen ( ScreenTypes.CREDIT_SCREEN )
end
SetIntroScreenExit (true)
end
function GetNextIntroVideo( uiCurrentVideo )
-- switch on whether it is the beginging or the end game video
if ( gbIntroScreenMode == IntroType.INTRO_BEGINNING ) then
-- the video at the begining of the game
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
SetVideo ( Video.INTRO_REBEL_CRDT )
elseif ( uiCurrentVideo == Video.INTRO_REBEL_CRDT ) then
SetVideo ( Video.INTRO_OMERTA )
elseif ( uiCurrentVideo == Video.INTRO_OMERTA ) then
SetVideo ( Video.INTRO_PRAGUE_CRDT )
elseif ( uiCurrentVideo == Video.INTRO_PRAGUE_CRDT ) then
SetVideo ( Video.INTRO_PRAGUE )
elseif ( uiCurrentVideo == Video.INTRO_PRAGUE ) then
SetVideo ( Video.INTRO_NO_VIDEO )
StopVideo()
end
-- end game
elseif ( gbIntroScreenMode == IntroType.INTRO_ENDING ) then
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
-- if Miguel is dead, play the flic with out him in it
if ( CheckMercIsDead(57) == true ) then -- MIGUEL
SetVideo ( Video.INTRO_END_END_SPEECH_NO_MIGUEL )
else
SetVideo ( Video.INTRO_END_END_SPEECH_MIGUEL )
end
elseif ( uiCurrentVideo == Video.INTRO_END_END_SPEECH_MIGUEL or uiCurrentVideo == Video.INTRO_END_END_SPEECH_NO_MIGUEL ) then
SetVideo ( Video.INTRO_END_HELI_FLYBY )
elseif ( uiCurrentVideo == Video.INTRO_END_HELI_FLYBY ) then
-- if SkyRider is dead, play the flic without him
if ( CheckMercIsDead(97) == true ) then --SKYRIDER
SetVideo ( Video.INTRO_END_NOSKYRIDER_HELICOPTER )
else
SetVideo ( Video.INTRO_END_SKYRIDER_HELICOPTER )
end
StopVideo()
end
elseif( gbIntroScreenMode == IntroType.INTRO_SPLASH ) then
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
SetVideo ( Video.INTRO_SPLASH_SCREEN )
elseif ( uiCurrentVideo == Video.INTRO_SPLASH_SCREEN ) then
SetVideo ( Video.INTRO_SPLASH_TALONSOFT )
StopVideo()
end
end
end
function SetIntroType( bIntroType )
if( bIntroType == IntroType.INTRO_BEGINNING ) then
SetIntroScreenMode ( IntroType.INTRO_BEGINNING )
elseif( bIntroType == IntroType.INTRO_ENDING ) then
SetIntroScreenMode ( IntroType.INTRO_ENDING )
elseif( bIntroType == IntroType.INTRO_SPLASH ) then
SetIntroScreenMode ( IntroType.INTRO_SPLASH )
end
end