PlaceableAnimalLoadingTrigger
PlaceableAnimalLoadingTrigger
Description
Specialization for placeable animal loading triggers
Functions
- onDelete
- onLoad
- prerequisitesPresent
- registerEventListeners
- registerFunctions
- registerOverwrittenFunctions
- registerSavegameXMLPaths
- registerXMLPaths
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
| table | savegame | savegame |
|---|
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
| table | specializations | specializations |
|---|
Return Values
| table | hasPrerequisite | true if all prerequisite specializations are loaded |
|---|
Code
function PlaceableAnimalLoadingTrigger.prerequisitesPresent(specializations)
return true
end
registerEventListeners
Description
Definition
registerEventListeners()
Arguments
| any | placeableType |
|---|
Code
function PlaceableAnimalLoadingTrigger.registerEventListeners(placeableType)
SpecializationUtil.registerEventListener(placeableType, "onLoad" , PlaceableAnimalLoadingTrigger )
SpecializationUtil.registerEventListener(placeableType, "onDelete" , PlaceableAnimalLoadingTrigger )
end
registerFunctions
Description
Definition
registerFunctions()
Arguments
| any | placeableType |
|---|
Code
function PlaceableAnimalLoadingTrigger.registerFunctions(placeableType)
end
registerOverwrittenFunctions
Description
Definition
registerOverwrittenFunctions()
Arguments
| any | placeableType |
|---|
Code
function PlaceableAnimalLoadingTrigger.registerOverwrittenFunctions(placeableType)
end
registerSavegameXMLPaths
Description
Definition
registerSavegameXMLPaths()
Arguments
| any | schema |
|---|---|
| any | basePath |
Code
function PlaceableAnimalLoadingTrigger.registerSavegameXMLPaths(schema, basePath)
end
registerXMLPaths
Description
Definition
registerXMLPaths()
Arguments
| any | schema |
|---|---|
| any | basePath |
Code
function PlaceableAnimalLoadingTrigger.registerXMLPaths(schema, basePath)
schema:setXMLSpecializationType( "AnimalLoadingTrigger" )
AnimalLoadingTrigger.registerXMLPaths(schema, basePath .. ".animalLoadingTrigger" )
schema:setXMLSpecializationType()
end