LUADOC - Farming Simulator 22

NoteManager

Description
This class handles creating and exporting note nodes at runtime
Parent
AbstractManager
Functions

initDataStructures

Description
Definition
initDataStructures()
Code
25function NoteManager:initDataStructures()
26 self.sessionDirectory = nil
27 self.sessionTimestamp = nil
28 self.mapTitle = nil
29 self.currentNoteIndex = 1
30
31 local colorWhite = {1,1,1,1}
32 self.colors = {}
33 table.insert(self.colors, {color=colorWhite})
34 for _, color in ipairs(DebugUtil.COLORS) do
35 table.insert(self.colors, {color={color[1], color[2], color[3], 1}})
36 end
37 self.lastColor = colorWhite
38
39 if not self.initialized then
40 addConsoleCommand("gsNoteExport", "Exports currently created note nodes as i3d file", "consoleCommandExportNotes", self)
41 addConsoleCommand("gsNoteList", "Lists currently created note nodes in console/log", "consoleCommandListNotes", self)
42 self.initialized = true
43 end
44end