Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
ShoreTool.c
Go to the documentation of this file.
1
[
WorkbenchPluginAttribute
(
"Build shore map"
,
""
)]
2
class
BuildShoreMap
: WorkbenchPlugin
3
{
4
override
void
RunCommandline
()
5
{
6
string
path
;
7
WorldEditor we = Workbench.GetModule(WorldEditor);
8
bool
exitAfter;
9
if
(we.GetApi())
10
{
11
// plugged into WorldEditor module
12
we.GetCmdLine(
"-world"
,
path
);
13
string
dummy;
14
exitAfter = we.GetCmdLine(
"-exitAfter"
, dummy);
15
}
16
else
17
{
18
// plugged into RM module
19
ResourceManager rm = Workbench.GetModule(ResourceManager);
20
rm.GetCmdLine(
"-world"
,
path
);
21
Workbench.OpenModule(WorldEditor);
22
exitAfter =
true
;
23
}
24
25
bool
hasLoadedWorld =
false
;
26
if
(
path
.IsEmpty())
27
{
28
if
(we.GetApi())
29
{
30
we.GetApi().GetWorldPath(
path
);
31
hasLoadedWorld = !
path
.IsEmpty();
32
}
33
}
34
else
35
{
36
hasLoadedWorld = we.SetOpenedResource(
path
);
37
}
38
39
if
(!hasLoadedWorld)
40
{
41
Print
(
"BuildShoreMap Plugin: Unable to load a world or no world file specified. Terminating."
,
LogLevel
.ERROR);
42
Workbench.Exit(-1);
43
}
44
else
if
(exitAfter)
45
{
46
we.GetApi().BuildShoreMap();
47
Print
(
"BuildShoreMap Plugin: Done. Exiting Workbench."
);
48
Workbench.Exit(0);
49
}
50
else
51
{
52
we.GetApi().BuildShoreMap();
53
Print
(
"BuildShoreMap Plugin: Done."
);
54
}
55
}
56
}
57
58
[
WorkbenchPluginAttribute
(
"Build shore map"
,
"Generate and save/overwrite shore map"
,
""
,
""
, {
"WorldEditor"
},
""
,0xf7a2)]
59
class
BuildShoreMapWEPlugin: WorkbenchPlugin
60
{
61
// WE entry points
62
override
void
Run
()
63
{
64
WorldEditor we = Workbench.GetModule(WorldEditor);
65
WorldEditorAPI
api = we.GetApi();
66
api.BuildShoreMap();
67
}
68
}
path
string path
Definition
AddonBuildInfoTool.c:249
Run
override void Run()
Definition
SCR_ImageSetGenerator.c:297
RunCommandline
override void RunCommandline()
Definition
ShoreTool.c:59
WorkbenchPluginAttribute
BuildShoreMap WorkbenchPlugin WorkbenchPluginAttribute("Build shore map", "Generate and save/overwrite shore map", "", "", {"WorldEditor"}, "", 0xf7a2)
Definition
ShoreTool.c:58
BuildShoreMap
Definition
ShoreTool.c:3
WorldEditorAPI
Definition
WorldEditorAPI.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
scripts
WorkbenchCommon
ShoreTool.c
Generated by
1.17.0