Skip to content

Commit 8701be8

Browse files
committed
Access modifiers
1 parent 598cbe3 commit 8701be8

3 files changed

Lines changed: 261 additions & 0 deletions

File tree

Source/FactoryGame/Public/FGTutorialIntroManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class FACTORYGAME_API AFGTutorialIntroManager : public AFGSubsystem, public IFGS
8282
UFUNCTION( BlueprintPure, Category = "Tutorial" )
8383
FORCEINLINE bool GetIsTutorialCompleted() const { return mHasCompletedIntroTutorial; }
8484

85+
public:
8586
/** Gets the current step we are at */
8687
UFUNCTION( BlueprintPure, Category = "Tutorial" )
8788
FORCEINLINE EIntroTutorialSteps GetCurrentTutorialStep() const { return mCurrentLocalTutorial; }
@@ -168,6 +169,7 @@ class FACTORYGAME_API AFGTutorialIntroManager : public AFGSubsystem, public IFGS
168169
UFUNCTION()
169170
void OnItemPickuped( AFGPlayerState* playerState, const FItemAmount& totalAmountPickuped );
170171

172+
public:
171173
/** Updates progress in the tutorial to next step specified */
172174
UFUNCTION( BlueprintCallable, Category = "Tutorial" )
173175
void UpdateTutorial( EIntroTutorialSteps nextTutorialStep );

Splitter-LKG.asl

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
state("FactoryGame-Win64-Shipping") {}
2+
3+
startup {
4+
vars.logPath = Environment.ExpandEnvironmentVariables("%LOCALAPPDATA%\\FactoryGame\\Saved\\Logs\\FactoryGame.log");
5+
try { // Wipe the log file to clear out messages from last time
6+
FileStream fs = new FileStream(vars.logPath, FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
7+
fs.SetLength(0);
8+
fs.Close();
9+
} catch {} // May fail if file doesn't exist.
10+
vars.SplitTriggers = new Dictionary<string, string>()
11+
{
12+
// HUB Upgrades (Tier 0)
13+
{ "HUB Upgrade 1".ToLower(), "Schematic_Tutorial1_C" },
14+
{ "HUB Upgrade 2".ToLower(), "Schematic_Tutorial1_5_C" },
15+
{ "HUB Upgrade 3".ToLower(), "Schematic_Tutorial2_C" },
16+
{ "HUB Upgrade 4".ToLower(), "Schematic_Tutorial3_C" },
17+
{ "HUB Upgrade 5".ToLower(), "Schematic_Tutorial4_C" },
18+
{ "HUB Upgrade 6".ToLower(), "Schematic_Tutorial5_C" },
19+
20+
// Tier 1
21+
{ "Base Building".ToLower(), "Schematic_1-1_C" },
22+
{ "Logistics".ToLower(), "Schematic_1-2_C" },
23+
{ "Field Research".ToLower(), "Schematic_1-3_C" },
24+
25+
// Tier 2
26+
{ "Part Assembly".ToLower(), "Schematic_2-1_C" },
27+
{ "Obstacle Clearing".ToLower(), "Schematic_2-2_C" },
28+
{ "Jump Pads".ToLower(), "Schematic_2-3_C" },
29+
{ "Resource Sink Bonus Program".ToLower(), "Schematic_2-5_C" },
30+
31+
// Tier 3
32+
{ "Coal Power".ToLower(), "Schematic_3-1_C" },
33+
{ "Logistics Mk.2".ToLower(), "Schematic_3-2_C" },
34+
{ "Vehicular Transport".ToLower(), "Schematic_3-3_C" },
35+
{ "Basic Steel Production".ToLower(), "Schematic_3-4_C" },
36+
37+
// Tier 4
38+
{ "Advanced Steel Production".ToLower(), "Schematic_4-1_C" },
39+
{ "Improved Melee Combat".ToLower(), "Schematic_4-2_C" },
40+
{ "Hypertubes".ToLower(), "Schematic_4-4_C" },
41+
{ "FICSIT Blueprints".ToLower(), "Schematic_4-5_C" },
42+
43+
// Tier 5
44+
{ "Oil Processing".ToLower(), "Schematic_5-1_C" },
45+
{ "Oil Processing 2".ToLower(), "Schematic_5-1-1_C" },
46+
{ "Industrial Manufacturing".ToLower(), "Schematic_5-2_C" },
47+
{ "Logistics Mk.3".ToLower(), "Schematic_5-3_C" },
48+
{ "Alternative Fluid Transport".ToLower(), "Schematic_5-4_C" },
49+
{ "Alternative Fluid Transport 2".ToLower(),"Schematic_5-4-1_C" },
50+
51+
// Tier 6
52+
{ "Expanded Power Infrastructure".ToLower(),"Schematic_6-1_C" },
53+
{ "Jetpack".ToLower(), "Schematic_6-2_C" },
54+
{ "Monorail Train Technology".ToLower(), "Schematic_6-3_C" },
55+
{ "Gas Mask".ToLower(), "Schematic_6-4_C" },
56+
{ "Pipeline Engineering Mk.2".ToLower(), "Schematic_6-5_C" },
57+
58+
// Tier 7
59+
{ "Bauxite Refinement".ToLower(), "Schematic_7-1_C" },
60+
{ "Bauxite Refinement 2".ToLower(), "Schematic_7-1-1_C" },
61+
{ "Logistics Mk.5".ToLower(), "Schematic_7-2_C" },
62+
{ "Hazmat Suit".ToLower(), "Schematic_7-3_C" },
63+
{ "Aeronautical Engineering".ToLower(), "Schematic_7-4_C" },
64+
{ "Aeronautical Engineering 2".ToLower(), "Schematic_7-4-1_C" },
65+
66+
// Tier 8
67+
{ "Nuclear Power".ToLower(), "Schematic_8-1_C" },
68+
{ "Advanced Aluminum Production".ToLower(), "Schematic_8-2_C" },
69+
{ "Advanced Aluminum Production 2".ToLower(), "Schematic_8-2-1_C" },
70+
{ "Hover Pack".ToLower(), "Schematic_8-3_C" },
71+
{ "Leading-edge Production".ToLower(), "Schematic_8-4_C" },
72+
{ "Particle Enrichment".ToLower(), "Schematic_8-5_C" },
73+
{ "Particle Enrichment 2".ToLower(), "Schematic_8-5-1_C" },
74+
75+
// Space Elevator
76+
{ "Send Package 1".ToLower(), "SetGamePhase: 1" },
77+
{ "Send Package 2".ToLower(), "SetGamePhase: 2" },
78+
{ "Send Package 3".ToLower(), "SetGamePhase: 3" },
79+
{ "Send Package 4".ToLower(), "SetGamePhase: 4" },
80+
{ "Send Package 5".ToLower(), "SetGamePhase: 5" },
81+
82+
// Other
83+
{ "Send Package".ToLower(), "SetGamePhase: " }, // Catches all packages
84+
{ "Overclocking".ToLower(), "Research_PowerSlugs_2_C" }, // Overclocking in the MAM
85+
};
86+
87+
// Aliases
88+
vars.SplitTriggers["HUB Upgrade 4/5".ToLower()] = vars.SplitTriggers["HUB Upgrade 5".ToLower()];
89+
vars.SplitTriggers["Awesome Sink".ToLower()] = vars.SplitTriggers["Resource Sink Bonus Program".ToLower()];
90+
vars.SplitTriggers["Launch".ToLower()] = vars.SplitTriggers["Send Package".ToLower()];
91+
vars.SplitTriggers["Space Elevator".ToLower()] = vars.SplitTriggers["Send Package".ToLower()];
92+
vars.SplitTriggers["Package".ToLower()] = vars.SplitTriggers["Send Package".ToLower()];
93+
94+
// Settings
95+
settings.Add("reset_on_exit", true, "Reset timer when exiting game");
96+
settings.Add("ignore_warnings", false, "Ignore split name warnings");
97+
98+
// Check split names
99+
// Removed due to duplicate notifications
100+
/*
101+
if (timer.Run == null) {
102+
if (MessageBox.Show(
103+
"No run information available, can't inspect split names. Please reach out to me by clicking Yes",
104+
"AutoSplit Error",
105+
MessageBoxButtons.YesNo,
106+
MessageBoxIcon.Error
107+
) == DialogResult.Yes) {
108+
Process.Start("https://github.com/Epiphane/AutoSplitHelper/blob/master/FAQ.md");
109+
}
110+
}
111+
else {
112+
foreach (var split in timer.Run) {
113+
if (!vars.SplitTriggers.ContainsKey(split.Name.ToLower())) {
114+
if (MessageBox.Show(
115+
"Split name not recognized: '" + split.Name + "'.\nYou will have to manually split for '" + split.Name + "'\n\nPress YES to open the FAQ page",
116+
"AutoSplit Error",
117+
MessageBoxButtons.YesNo,
118+
MessageBoxIcon.Error
119+
) == DialogResult.Yes) {
120+
Process.Start("https://github.com/Epiphane/AutoSplitHelper/blob/master/FAQ.md");
121+
}
122+
}
123+
}
124+
}
125+
*/
126+
}
127+
128+
init {
129+
try { // Wipe the log file to clear out messages from last time
130+
FileStream fs = new FileStream(vars.logPath, FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
131+
fs.SetLength(0);
132+
fs.Close();
133+
} catch {} // May fail if file doesn't exist.
134+
135+
vars.reader = new StreamReader(new FileStream(vars.logPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
136+
vars.line = null;
137+
vars.trigger = null;
138+
vars.modActive = false;
139+
140+
do {
141+
vars.line = vars.reader.ReadLine();
142+
} while (vars.reader != null && vars.line != null);
143+
144+
if (!settings["ignore_warnings"]) {
145+
if (timer.Run == null) {
146+
if (MessageBox.Show(
147+
"No run information available, can't inspect split names. Please reach out to me by clicking Yes",
148+
"AutoSplit Error",
149+
MessageBoxButtons.YesNo,
150+
MessageBoxIcon.Error
151+
) == DialogResult.Yes) {
152+
Process.Start("https://github.com/Epiphane/AutoSplitHelper/blob/master/FAQ.md");
153+
}
154+
}
155+
else {
156+
foreach (var split in timer.Run) {
157+
if (!vars.SplitTriggers.ContainsKey(split.Name.ToLower())) {
158+
if (MessageBox.Show(
159+
"Split name not recognized: '" + split.Name + "'.\nYou will have to manually split for '" + split.Name + "'\n\nPress YES to open the FAQ page",
160+
"AutoSplit Error",
161+
MessageBoxButtons.YesNo,
162+
MessageBoxIcon.Error
163+
) == DialogResult.Yes) {
164+
Process.Start("https://github.com/Epiphane/AutoSplitHelper/blob/master/FAQ.md");
165+
}
166+
}
167+
}
168+
}
169+
}
170+
}
171+
172+
update {
173+
if (timer != null) {
174+
if (timer.CurrentSplit != null && vars.SplitTriggers.ContainsKey(timer.CurrentSplit.Name.ToLower())) {
175+
vars.trigger = vars.SplitTriggers[timer.CurrentSplit.Name.ToLower()];
176+
}
177+
else {
178+
vars.trigger = null;
179+
}
180+
}
181+
182+
while (vars.reader != null) {
183+
vars.line = vars.reader.ReadLine();
184+
// If nothing was read, don't run any other blocks.
185+
if (vars.line == null) {
186+
return false;
187+
}
188+
189+
int index;
190+
if (!vars.modActive) {
191+
index = vars.line.IndexOf("AutoSplitHelper");
192+
if (index >= 0) {
193+
print("AutoSplitHelper mod detected");
194+
vars.modActive = true;
195+
}
196+
197+
index = vars.line.IndexOf("Starting Game");
198+
if (index >= 0) {
199+
if (!settings["ignore_warnings"]) {
200+
if (MessageBox.Show(
201+
"Satisfactory AutoSplitHelper mod not detected, splits will not be recorded automatically. Make sure you have mods enabled!\n\nTo install AutoSplitHelper, click Yes",
202+
"AutoSplit Error",
203+
MessageBoxButtons.YesNo,
204+
MessageBoxIcon.Error
205+
) == DialogResult.Yes) {
206+
Process.Start("https://github.com/Epiphane/AutoSplitHelper/blob/master/README.md#game-mod");
207+
}
208+
}
209+
210+
return false;
211+
}
212+
}
213+
214+
// We only care about AutoSplitHelper logs
215+
index = vars.line.IndexOf("LogAutoSplitHelper: ");
216+
if (index < 0) {
217+
continue;
218+
}
219+
220+
vars.line = vars.line.Substring(index + 20);
221+
break;
222+
}
223+
}
224+
225+
start {
226+
if (vars.line == null) return false; // If there is no logfile, don't run this block.
227+
if (vars.line.IndexOf("Intro Done") >= 0) {
228+
return true;
229+
}
230+
231+
return false;
232+
}
233+
234+
split {
235+
if (vars.line == null) return false; // If there is no logfile, don't run this block.
236+
if (vars.trigger == null) return false; // If there is no trigger, don't run this block.
237+
238+
if (vars.line.IndexOf(vars.trigger) < 0) {
239+
return false;
240+
}
241+
242+
return true;
243+
}
244+
245+
reset {
246+
if (!settings["reset_on_exit"]) {
247+
// Never reset if the setting is disabled
248+
return false;
249+
}
250+
251+
if (vars.line == null) return false; // If there is no logfile, don't run this block.
252+
if (vars.line.IndexOf("Game session ending") >= 0) {
253+
print("RESETTING");
254+
return true;
255+
}
256+
257+
return false;
258+
}

Splitter.asl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
state("FactoryGameSteam-Win64-Shipping") {}
2+
state("FactoryGameEGS") {}
23

34
startup {
45
vars.logPath = Environment.ExpandEnvironmentVariables("%LOCALAPPDATA%\\FactoryGame\\Saved\\Logs\\FactoryGame.log");

0 commit comments

Comments
 (0)