Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MissionHeaderSequence.c
Go to the documentation of this file.
2{
3 [Attribute("", UIWidgets.ResourceNamePicker, "Which scenario (header) should be loaded after the current one has been finished.", "conf")]
4 ResourceName m_sNextScenario;
5
6 [Attribute("", desc: "Variable name in SCR_ScenarioSequenceProgress specific for this sequence.")]
7 string m_sProgressVariableName;
8
9 [Attribute("0", desc: "This scenario's index in the sequence. If the sequence progress is lower than this index, this scenario is locked.")]
10 int m_iScenarioIndex;
11
12 //------------------------------------------------------------------------------------------------
13 void UpdateProgress()
14 {
15 BaseContainer progressData = GetGame().GetGameUserSettings().GetModule("SCR_ScenarioSequenceProgress");
16
17 if (!progressData)
18 return;
19
20 int progress;
21 progressData.Get(m_sProgressVariableName, progress);
22
23 if (m_iScenarioIndex < progress)
24 return;
25
26 // If finishing this scenario furthers the progress, increase the saved index
27 progressData.Set(m_sProgressVariableName, m_iScenarioIndex + 1);
28 GetGame().UserSettingsChanged();
29 GetGame().SaveUserSettings();
30 }
31}
ArmaReforgerScripted GetGame()
Definition game.c:1398
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_FieldOfViewSettings Attribute