Skip to main content
Skip to main content

PlaceableAnimalLoadingTrigger

PlaceableAnimalLoadingTrigger

Description

Specialization for placeable animal loading triggers

Functions

onDelete

Description

Definition

onDelete()

Code

function PlaceableAnimalLoadingTrigger:onDelete()
local spec = self.spec_animalLoadingTrigger
if spec.animalLoadingTrigger ~ = nil then
spec.animalLoadingTrigger:delete()
spec.animalLoadingTrigger = nil
end
end

onLoad

Description

Called on loading

Definition

onLoad(table savegame)

Arguments

tablesavegamesavegame

Code

function PlaceableAnimalLoadingTrigger:onLoad(savegame)
local spec = self.spec_animalLoadingTrigger

spec.animalLoadingTrigger = AnimalLoadingTrigger.new( self.isServer, self.isClient)
if not spec.animalLoadingTrigger:loadFromXML( self.xmlFile, "placeable.animalLoadingTrigger" , self.components, self.i3dMappings) then
spec.animalLoadingTrigger:delete()
spec.animalLoadingTrigger = nil
end
end

prerequisitesPresent

Description

Checks if all prerequisite specializations are loaded

Definition

prerequisitesPresent(table specializations)

Arguments

tablespecializationsspecializations

Return Values

tablehasPrerequisitetrue if all prerequisite specializations are loaded

Code

function PlaceableAnimalLoadingTrigger.prerequisitesPresent(specializations)
return true
end

registerEventListeners

Description

Definition

registerEventListeners()

Arguments

anyplaceableType

Code

function PlaceableAnimalLoadingTrigger.registerEventListeners(placeableType)
SpecializationUtil.registerEventListener(placeableType, "onLoad" , PlaceableAnimalLoadingTrigger )
SpecializationUtil.registerEventListener(placeableType, "onDelete" , PlaceableAnimalLoadingTrigger )
end

registerFunctions

Description

Definition

registerFunctions()

Arguments

anyplaceableType

Code

function PlaceableAnimalLoadingTrigger.registerFunctions(placeableType)
end

registerOverwrittenFunctions

Description

Definition

registerOverwrittenFunctions()

Arguments

anyplaceableType

Code

function PlaceableAnimalLoadingTrigger.registerOverwrittenFunctions(placeableType)
end

registerSavegameXMLPaths

Description

Definition

registerSavegameXMLPaths()

Arguments

anyschema
anybasePath

Code

function PlaceableAnimalLoadingTrigger.registerSavegameXMLPaths(schema, basePath)
end

registerXMLPaths

Description

Definition

registerXMLPaths()

Arguments

anyschema
anybasePath

Code

function PlaceableAnimalLoadingTrigger.registerXMLPaths(schema, basePath)
schema:setXMLSpecializationType( "AnimalLoadingTrigger" )
AnimalLoadingTrigger.registerXMLPaths(schema, basePath .. ".animalLoadingTrigger" )
schema:setXMLSpecializationType()
end