Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AutotestHelper.c
Go to the documentation of this file.
1
2
4{
5 //------------------------------------------------------------------------------------------------
6 static bool WorldOpenFile(ResourceName mapResource, ResourceName worldSystemsConfigResourceName)
7 {
8 if (!GetGame().InPlayMode())
9 {
10 bool result = false;
11#ifdef WORKBENCH
12 WorldEditor worldEditor = Workbench.GetModule(WorldEditor);
13 result = worldEditor.SetOpenedResource(mapResource);
14 worldEditor.SwitchToGameMode();
15#endif
16 return result;
17 }
18 else
19 {
20 SCR_AutotestHarness.GetLogger().Log(
21 string.Format("Requesting scenario change:\n\t%1\n\t%2", mapResource, worldSystemsConfigResourceName),
22 level: LogLevel.DEBUG,
23 forceFileWrite: true
24 );
25
26 return SCR_AutotestHelper.RequestScenarioChangeTransition(mapResource, worldSystemsConfigResourceName);
27 }
28 }
29
30 // OVERRIDE in game project
31
32 //------------------------------------------------------------------------------------------------
34 static ResourceName GetDefaultWorld();
35
36 //------------------------------------------------------------------------------------------------
38 static ResourceName GetDefaultSystemsConfig();
39
40 //------------------------------------------------------------------------------------------------
42 static string GetDefaultLaunchParams();
43
44 //------------------------------------------------------------------------------------------------
46 protected static bool RequestScenarioChangeTransition(ResourceName mapResource, ResourceName worldSystemsConfigResourceName);
47}
ArmaReforgerScripted GetGame()
Definition game.c:1398
static bool RequestScenarioChangeTransition(ResourceName mapResource, ResourceName worldSystemsConfigResourceName)
Game specific way to transition to world for testing.
void Log(string msg, LogLevel level=LogLevel.NORMAL, bool forceFileWrite=false, bool consoleLog=true)
Should be used in tests instead of global Print. Forwards test output to separate file.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14