LUADOC - Farming Simulator 22

AIParameterLooping

Parent
AIParameter
Functions

getIsLooping

Description
Definition
getIsLooping()
Code
58function AIParameterLooping:getIsLooping()
59 return self.isLooping
60end

getString

Description
Definition
getString()
Code
64function AIParameterLooping:getString()
65 if self.isLooping then
66 return g_i18n:getText("ai_parameterValueLooping")
67 else
68 return g_i18n:getText("ai_parameterValueNoLooping")
69 end
70end

loadFromXMLFile

Description
Definition
loadFromXMLFile()
Code
34function AIParameterLooping:loadFromXMLFile(xmlFile, key)
35 self.isLooping = xmlFile:getBool(key .. "#isLooping", self.isLooping)
36end

new

Description
Definition
new()
Code
16function AIParameterLooping.new(customMt)
17 local self = AIParameter.new(customMt or AIParameterLooping_mt)
18
19 self.type = AIParameterType.SELECTOR
20
21 self.isLooping = false
22
23 return self
24end

readStream

Description
Definition
readStream()
Code
40function AIParameterLooping:readStream(streamId, connection)
41 self:setIsLooping(streamReadBool(streamId))
42end

saveToXMLFile

Description
Definition
saveToXMLFile()
Code
28function AIParameterLooping:saveToXMLFile(xmlFile, key, usedModNames)
29 xmlFile:setBool(key .. "#isLooping", self.isLooping)
30end

setIsLooping

Description
Definition
setIsLooping()
Code
52function AIParameterLooping:setIsLooping(isLooping)
53 self.isLooping = isLooping
54end

setNextItem

Description
Definition
setNextItem()
Code
74function AIParameterLooping:setNextItem()
75 self.isLooping = not self.isLooping
76end

setPreviousItem

Description
Definition
setPreviousItem()
Code
80function AIParameterLooping:setPreviousItem()
81 self.isLooping = not self.isLooping
82end

writeStream

Description
Definition
writeStream()
Code
46function AIParameterLooping:writeStream(streamId, connection)
47 streamWriteBool(streamId, self.isLooping)
48end