Skip to main content
Skip to main content

PlaceableConfigurationDataObjectChange

PlaceableConfigurationDataObjectChange

Description

Adds object change functionality to all configurations

Functions

loadConfigItem

Description

Definition

loadConfigItem()

Arguments

anyconfigItem
anyxmlFile
anybaseKey
anyconfigKey
anybaseDirectory
anycustomEnvironment

Code

function PlaceableConfigurationDataObjectChange.loadConfigItem(configItem, xmlFile, baseKey, configKey, baseDirectory, customEnvironment)
configItem.postLoadObjectChange = xmlFile:getValue(baseKey .. "#postLoadObjectChange" , false )
end

onLoad

Description

Definition

onLoad()

Arguments

anyplaceable
anyconfigItem
anyconfigId

Code

function PlaceableConfigurationDataObjectChange.onLoad(placeable, configItem, configId)
if not configItem.postLoadObjectChange then
local configurationDesc = g_placeableConfigurationManager:getConfigurationDescByName(configItem.configName)
ObjectChangeUtil.updateObjectChanges(placeable.xmlFile, configurationDesc.configurationKey, configId, placeable.components, placeable)
end
end

onPostLoad

Description

Definition

onPostLoad()

Arguments

anyplaceable
anyconfigItem
anyconfigId

Code

function PlaceableConfigurationDataObjectChange.onPostLoad(placeable, configItem, configId)
if configItem.postLoadObjectChange then
local configurationDesc = g_placeableConfigurationManager:getConfigurationDescByName(configItem.configName)
ObjectChangeUtil.updateObjectChanges(placeable.xmlFile, configurationDesc.configurationKey, configId, placeable.components, placeable)
end
end

registerXMLPaths

Description

Definition

registerXMLPaths()

Arguments

anyschema
anyrootPath
anyconfigPath

Code

function PlaceableConfigurationDataObjectChange.registerXMLPaths(schema, rootPath, configPath)
schema:register(XMLValueType.BOOL, rootPath .. "#postLoadObjectChange" , "Defines if the object changes are applied before or after post load" , false )
ObjectChangeUtil.registerObjectChangeXMLPaths(schema, configPath)
end