Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AutotestHelper.c
Go to the documentation of this file.
1
2
3
class
SCR_AutotestHelper
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
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
ResourceName
Definition
ResourceName.c:13
SCR_AutotestHarness
Definition
SCR_AutotestHarness.c:24
SCR_AutotestHelper
Definition
SCR_AutotestHelper.c:4
SCR_AutotestHelper::RequestScenarioChangeTransition
static bool RequestScenarioChangeTransition(ResourceName mapResource, ResourceName worldSystemsConfigResourceName)
Game specific way to transition to world for testing.
SCR_AutotestPrinter::Log
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.
Definition
SCR_AutotestPrinter.c:36
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
scripts
Autotest
Game
TestFramework
SCR_AutotestHelper.c
Generated by
1.17.0