LUADOC - Farming Simulator 22

Script v1_7_1_0

Engine v1_7_1_0

Foundation Reference

VehicleSetIsReconfiguratingEvent

Description
Event for set isRegonfigurating on vehicles
Parent
Event
Functions

emptyNew

Description
Create instance of Event class
Definition
emptyNew()
Return Values
tableselfinstance of class event
Code
13function VehicleSetIsReconfiguratingEvent.emptyNew()
14 local self = Event.new(VehicleSetIsReconfiguratingEvent_mt)
15 return self
16end

new

Description
Create new instance of event
Definition
new(table object, integer state)
Arguments
tableobjectobject
integerstatestate
Code
22function VehicleSetIsReconfiguratingEvent.new(object)
23 local self = VehicleSetIsReconfiguratingEvent.emptyNew()
24 self.object = object
25 return self
26end

readStream

Description
Called on client side on join
Definition
readStream(integer streamId, integer connection)
Arguments
integerstreamIdstreamId
integerconnectionconnection
Code
32function VehicleSetIsReconfiguratingEvent:readStream(streamId, connection)
33 self.object = NetworkUtil.readNodeObject(streamId)
34 if self.object ~= nil and self.object:getIsSynchronized() then
35 self.object.isReconfigurating = true
36 end
37end

writeStream

Description
Called on server side on join
Definition
writeStream(integer streamId, integer connection)
Arguments
integerstreamIdstreamId
integerconnectionconnection
Code
43function VehicleSetIsReconfiguratingEvent:writeStream(streamId, connection)
44 NetworkUtil.writeNodeObject(streamId, self.object)
45end