- Found in:
- Workshop Framework
WSFWIdentifier:PowerGridStatisticsfunctionCheckAndFixPowerGridWithFilter(ObjectReferenceworkshop_ref, intfixerrors, int[]gridFilter)NativeGlobal
Description
Documentation Comment
Checks and optionally fixes errors of settlement power grids. Takes an array of power grid indices as a filter parameter. Returns statistics data in PowerGridStatistics struct. Logs results.
fixerrors = 0 - check settlement for power grid errors, but don't fix anything
fixerrors = 1 - check settlement for power grid errors, and fix errors by removing bad power grids entirely (not recommended legacy feature)
fixerrors = 2 - check settlement for power grid errors, and fix errors by cleaning bad power grids by removing invalid power nodes only (recommended)
Parameters
ObjectReferenceworkshop_ref
intfixerrors
int[]gridFilter
Examples
Auto-Generated Example
ObjectReference myObjectReference__workshop_ref
int myInt__fixerrors
int[] myIntArray__gridFilter
WSFWIdentifier:PowerGridStatistics returnedValue = WSFWIdentifier.CheckAndFixPowerGridWithFilter(myObjectReference__workshop_ref, myInt__fixerrors, myIntArray__gridFilter)