3class SCR_VerifyItemsPlugin : WorkbenchPlugin
10 WorldEditor worldEditor = Workbench.GetModule(WorldEditor);
13 WBProgressDialog progress =
new WBProgressDialog(
"Verifying items...", worldEditor);
14 progress.SetProgress(0.0);
17 filter.rootPath = RootPath;
18 filter.fileExtensions = {
"et" };
19 filter.recursive =
true;
21 ref array<ResourceName> resources = {};
25 float prevProgress, currProgress;
27 for (
int i = 0, count = resources.Count(); i < count; ++i)
30 if (!resource.IsValid())
33 IEntitySource entitySource = resource.GetResource().ToEntitySource();
38 if (!inventoryCompSource)
44 inventoryCompSource.Get(
"Enabled", enabled);
48 if (entitySource.GetAncestor() && entitySource.GetAncestor().ToEntitySource())
51 if (ancestorInventoryCompSource && ancestorInventoryCompSource == inventoryCompSource)
59 rplCompSource.Get(
"Enabled", enabled);
63 bool parentNodeFromParentEntity;
64 rplCompSource.Get(
"Parent Node From Parent Entity", parentNodeFromParentEntity);
66 if (parentNodeFromParentEntity)
68 PrintFormat(
"%1 \"Parent Node From Parent Entity\" property on RplComponent of the item is set to true", resources[i], level:
LogLevel.WARNING);
71 currProgress = i / count;
72 if (currProgress - prevProgress >= 0.01)
74 progress.SetProgress(currProgress);
75 prevProgress = currProgress;
79 Print(
string.Format(
"Verify Items: End, %1 items processed", n),
LogLevel.DEBUG);
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Object holding reference to resource. In destructor release the resource.
Object used for holding filtering params for ResourceDatabase.SearchResources() method.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute