- Found in:
- Workshop Framework
WSFWIdentifier:PowerGridStatisticsfunctionCheckAndFixPowerGrid(ObjectReferenceworkshop_ref, intfixerrors)Global
Description
Documentation Comment
Checks and optionally fixes errors of settlement power grids. 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
Examples
Auto-Generated Example
ObjectReference myObjectReference__workshop_ref
int myInt__fixerrors
WSFWIdentifier:PowerGridStatistics returnedValue = WSFWIdentifier.CheckAndFixPowerGrid(myObjectReference__workshop_ref, myInt__fixerrors)