Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- AIConveyorBelt
- AIImplement
- AIVehicle
- AnimatedVehicle
- ArticulatedAxis
- Attachable
- AttacherJointControl
- AttacherJoints
- BaleGrab
- BaleLoader
- Baler
- BaleWrapper
- BaseMaterial
- BunkerSiloCompacter
- BunkerSiloInteractor
- BuyableBale
- CCTDrivable
- Combine
- ConnectionHoses
- ConveyorBelt
- Cover
- CrabSteering
- Crawlers
- Cultivator
- Cutter
- Cylindered
- CylinderedFoldable
- Dashboard
- Dischargeable
- Drivable
- DynamicallyLoadedParts
- DynamicMountAttacher
- Enterable
- FertilizingCultivator
- FertilizingSowingMachine
- FillTriggerVehicle
- FillUnit
- FillVolume
- Foldable
- FoliageBending
- ForageWagon
- FrontloaderAttacher
- FruitPreparer
- GroundAdjustedNodes
- GroundReference
- Honk
- HookLiftContainer
- HookLiftTrailer
- IKChains
- JigglingParts
- Leveler
- Lights
- LivestockTrailer
- Locomotive
- LogGrab
- ManureBarrel
- MixerWagon
- Motorized
- Mountable
- Mower
- Pickup
- Pipe
- Plow
- PowerConsumer
- PowerTakeOffs
- RandomlyMovingParts
- ReceivingHopper
- ReverseDriving
- Rideable
- RidgeMarker
- Roller
- Ropes
- SemiTrailerFront
- Shovel
- SlopeCompensation
- SmartAttach
- SowingMachine
- SpeedRotatingParts
- SplineVehicle
- Sprayer
- StrawBlower
- StumpCutter
- Suspensions
- Tedder
- TensionBeltObject
- TensionBelts
- TipOccluder
- Trailer
- TreePlanter
- TreeSaw
- TurnOnVehicle
- Washable
- WaterTrailer
- Wearable
- Weeder
- Wheels
- Windrower
- Wipers
- WoodCrusher
- WoodHarvester
- WorkArea
- WorkMode
- WorkParticles
- 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 |