Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- AdditionalFieldBuyInfoEve...
- AIConveyorBeltSetAngleEve...
- AIFieldWorkerStateEvent
- AIJobSkipTaskEvent
- AIJobStartEvent
- AIJobStartRequestEvent
- AIJobStopEvent
- AIJobVehicleStateEvent
- AITaskStartEvent
- AITaskStopEvent
- AIVehicleIsBlockedEvent
- AnimalCleanEvent
- AnimalHusbandryNoMorePall...
- AnimalNameEvent
- AnimalRidingEvent
- AnimatedVehicleStartEvent
- AnimatedVehicleStopEvent
- BaleLoaderStateEvent
- BaleOpenEvent
- BalerAutomaticDropEvent
- BalerBaleTypeEvent
- BalerCreateBaleEvent
- BalerDropFromPlatformEven...
- BalerSetBaleTimeEvent
- BalerSetIsUnloadingBaleEv...
- BaleUnpackEvent
- BaleWrapperAutomaticDropE...
- BaleWrapperStateEvent
- BunkerSiloCloseEvent
- BunkerSiloOpenEvent
- ChainsawCutEvent
- ChainsawDelimbEvent
- ChainsawStateEvent
- CombineStrawEnableEvent
- CropSensorStateEvent
- DogFetchItemEvent
- DogFollowEvent
- DogPetEvent
- DrivableToggleLowerAllEve...
- EnvironmentalScoreEvent
- ExtendedSowingMachineRate...
- ExtendedSprayerAmountEven...
- ExtendedSprayerDefaultFru...
- FarmlandStatisticsEvent
- FarmlandStatisticsResetEv...
- FillUnitUnloadEvent
- FoldableSetFoldDirectionE...
- HonkEvent
- HPWLanceStateEvent
- InlineBaleOpenEvent
- InlineWrapperPushOffEvent
- JumpEvent
- LocomotiveStateEvent
- MixerWagonBaleNotAccepted...
- MotorGearShiftEvent
- MowerToggleWindrowDropEve...
- PickupSetStateEvent
- PlaceableFenceAddGateEven...
- PlaceableFenceAddSegmentE...
- PlaceableFenceRemoveSegme...
- PlaceableHighPressureWash...
- PlaceableLightsStateEvent
- PlaceableTrainSystemRentE...
- PlaceableTrainSystemSellE...
- PlantLimitToFieldEvent
- PlayerPermissionsEvent
- PlayerPickUpObjectEvent
- PlayerRequestStyleEvent
- PlayerSetFarmAnswerEvent
- PlayerSetFarmEvent
- PlayerSetHandToolEvent
- PlayerSetNicknameEvent
- PlayerSetStyleEvent
- PlayerSwitchedFarmEvent
- PlayerTeleportEvent
- PlayerThrowObjectEvent
- PlayerToggleLightEvent
- PlowLimitToFieldEvent
- PlowPackerStateEvent
- PlowRotationEvent
- ProductionPointOutputMode...
- ProductionPointProduction...
- ProductionPointProduction...
- PurchaseSoilMapsEvent
- ReceivingHopperSetCreateB...
- RequestEnvironmentalScore...
- RequestFarmlandStatistics...
- RequestFieldBuyInfoEvent
- ResetYieldMapEvent
- ReverseDrivingSetStateEve...
- RideableStableNotificatio...
- RidgeMarkerSetStateEvent
- SetCoverStateEvent
- SetCrabSteeringEvent
- SetCruiseControlSpeedEven...
- SetCruiseControlStateEven...
- SetDischargeStateEvent
- SetFillUnitCapacityEvent
- SetFillUnitIsFillingEvent
- SetMotorTurnedOnEvent
- SetPipeDischargeToGroundE...
- SetPipeStateEvent
- SetSeedIndexEvent
- SetTurnedOnEvent
- SetWorkModeEvent
- SoilSamplerSendEvent
- SoilSamplerStartEvent
- SprayerDoubledAmountEvent
- TensionBeltsEvent
- TensionBeltsRefreshEvent
- TrailerToggleManualDoorEv...
- TrailerToggleManualTipEve...
- TrailerToggleTipSideEvent
- TreePlanterLoadPalletEven...
- VariableWorkWidthStateEve...
- VehicleAttachEvent
- VehicleAttachRequestEvent
- VehicleBrokenEvent
- VehicleBundleAttachEvent
- VehicleDetachEvent
- VehicleEnterRequestEvent
- VehicleEnterResponseEvent
- VehicleLeaveEvent
- VehicleLowerImplementEven...
- VehiclePlayerStyleChanged...
- VehicleSetBeaconLightEven...
- VehicleSetIsReconfigurati...
- VehicleSetLightEvent
- VehicleSettingsChangeEven...
- VehicleSetTurnLightEvent
- WaterTrailerSetIsFillingE...
- WearableRepaintEvent
- WearableRepairEvent
- WoodHarvesterCutTreeEvent
- WoodHarvesterOnCutTreeEve...
- WoodHarvesterOnDelimbTree...
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
FarmlandStatisticsEvent
DescriptionEvent for syncing the farmland stats to the playerParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function FarmlandStatisticsEvent:emptyNew() |
14 | local self = Event.new(FarmlandStatisticsEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table object)Arguments
table | object | object |
21 | function FarmlandStatisticsEvent.new(farmlandId) |
22 | local self = FarmlandStatisticsEvent:emptyNew() |
23 | self.farmlandId = farmlandId |
24 | return self |
25 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
31 | function FarmlandStatisticsEvent:readStream(streamId, connection) |
32 | self.farmlandId = streamReadUIntN(streamId, 8) |
33 | |
34 | local pfModule = g_precisionFarming |
35 | if pfModule ~= nil then |
36 | if pfModule.farmlandStatistics ~= nil then |
37 | pfModule.farmlandStatistics:readStatisticFromStream(self.farmlandId, streamId, connection) |
38 | end |
39 | end |
40 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
46 | function FarmlandStatisticsEvent:writeStream(streamId, connection) |
47 | streamWriteUIntN(streamId, self.farmlandId, 8) |
48 | |
49 | local pfModule = g_precisionFarming |
50 | if pfModule ~= nil then |
51 | if pfModule.farmlandStatistics ~= nil then |
52 | pfModule.farmlandStatistics:writeStatisticToStream(self.farmlandId, streamId, connection) |
53 | end |
54 | end |
55 | end |