Click or drag to resize

ConfigNodePatchUpgradeSectionRulesfieldRules Field

Defines the rules to apply to the node's fields if the action is Fix.

Namespace:  KSPDev.ConfigUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
[PersistentFieldAttribute("fieldRule", isCollection = true)]
public List<string> fieldRules
Request Example View Source

Field Value

Type: ListString
Remarks
The value is comma separated pairs of "name=value". The "name" designates the field name within the persisted module state, and "value" specifies a new value. Field name can have a special prefix symbol that defines a special case or how the new value should be applied:
  • No prefix. Tells to add a new value. The existing value(s) in the persisted state will not be affected. This can be used to add multiple values to a key.
  • "-". Tells to erase the value(s) or node(s) at the key. There are no checks done to verify if there is something to delete.
  • "%". Tells to assign a new value to an existing filed or create a new value if none exists.

The rules are applied in the order they are listed in the patch. It's important to consider it when applying multiple rules to the same key.

See Also