Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
BunkerSiloInteractor
DescriptionSpecialization for connecting bunker silo callbacks with vehiclesFunctions
- notifiyBunkerSilo
- onLoad
- prerequisitesPresent
- registerEventListeners
- registerFunctions
- setBunkerSiloInteractorCallback
notifiyBunkerSilo
DescriptionDefinitionnotifiyBunkerSilo()Code
55 | function BunkerSiloInteractor:notifiyBunkerSilo(changedFillLevel, fillType) |
56 | local spec = self.spec_bunkerSiloInteractor |
57 | if spec.callback ~= nil then |
58 | spec.callback(spec.callbackTarget, self, changedFillLevel, fillType) |
59 | end |
60 | end |
onLoad
DescriptionDefinitiononLoad()Code
36 | function BunkerSiloInteractor:onLoad(savegame) |
37 | local spec = self.spec_bunkerSiloInteractor |
38 | |
39 | spec.callback = nil |
40 | spec.callbackTarget = nil |
41 | end |
prerequisitesPresent
DescriptionChecks if all prerequisite specializations are loadedDefinition
prerequisitesPresent(table specializations)Arguments
table | specializations | specializations |
boolean | hasPrerequisite | true if all prerequisite specializations are loaded |
17 | function BunkerSiloInteractor.prerequisitesPresent(specializations) |
18 | return true |
19 | end |
registerEventListeners
DescriptionDefinitionregisterEventListeners()Code
30 | function BunkerSiloInteractor.registerEventListeners(vehicleType) |
31 | SpecializationUtil.registerEventListener(vehicleType, "onLoad", BunkerSiloInteractor) |
32 | end |
registerFunctions
DescriptionDefinitionregisterFunctions()Code
23 | function BunkerSiloInteractor.registerFunctions(vehicleType) |
24 | SpecializationUtil.registerFunction(vehicleType, "setBunkerSiloInteractorCallback", BunkerSiloInteractor.setBunkerSiloInteractorCallback) |
25 | SpecializationUtil.registerFunction(vehicleType, "notifiyBunkerSilo", BunkerSiloInteractor.notifiyBunkerSilo) |
26 | end |
setBunkerSiloInteractorCallback
DescriptionSet fill level changed callback (e.g. by bunker silo)Definition
setBunkerSiloInteractorCallback(function callback, table callbackTarget)Arguments
function | callback | callback |
table | callbackTarget | callback target |
47 | function BunkerSiloInteractor:setBunkerSiloInteractorCallback(callback, callbackTarget) |
48 | local spec = self.spec_bunkerSiloInteractor |
49 | spec.callback = callback |
50 | spec.callbackTarget = callbackTarget |
51 | end |