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_LocEditedTextPlugin.c
Go to the documentation of this file.
1
#ifdef WORKBENCH
2
[
WorkbenchPluginAttribute
(name:
"Move edited text to source"
, wbModules: {
"LocalizationEditor"
})]
3
class
SCR_LocEditedTextPlugin : LocalizationEditorPlugin
4
{
5
//------------------------------------------------------------------------------------------------
6
override
void
Run
()
7
{
8
LocalizationEditor locEditor = Workbench.GetModule(LocalizationEditor);
9
BaseContainer
table = locEditor.GetTable();
10
if
(!table)
11
return
;
12
13
BaseContainerList
items = table.GetObjectArray(
"Items"
);
14
15
array<int> selected = {};
16
locEditor.GetSelectedRows(selected);
17
18
locEditor.BeginModify(
"LocEditedTextPlugin"
);
19
BaseContainer
item;
20
string
edited;
21
foreach
(
int
index
: selected)
22
{
23
item = items.Get(
index
);
24
item.Get(
"Target_en_us_edited"
, edited);
25
if
(!edited.IsEmpty())
26
{
27
locEditor.ModifyProperty(item, item.GetVarIndex(
"Target_en_us"
), edited);
28
locEditor.ModifyProperty(item, item.GetVarIndex(
"Target_en_us_edited"
),
string
.Empty);
29
}
30
}
31
locEditor.EndModify();
32
}
33
}
34
#endif
// WORKBENCH
WorkbenchPluginAttribute
GenerateFlowMaps WorkbenchPlugin WorkbenchPluginAttribute("Regenerate river flow-maps", "Generate and save/overwrite river flow-maps", "", "", {"WorldEditor"}, "", 0xf773)
Definition
FlowmapTool.c:59
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition
SCR_DestructionSynchronizationComponent.c:17
Run
override void Run()
Definition
SCR_ImageSetGenerator.c:297
BaseContainer
Definition
BaseContainer.c:13
BaseContainerList
Definition
BaseContainerList.c:13
scripts
WorkbenchGame
LocalizationEditor
SCR_LocEditedTextPlugin.c
Generated by
1.17.0