@@ -78,28 +78,28 @@ function TooltipClass:CheckForUpdate(...)
7878end
7979
8080function TooltipClass :AddLine (size , text , font )
81- if text then
82- local fontToUse
83- if main .showFlavourText then
84- fontToUse = font or " VAR"
85- else
86- fontToUse = " VAR"
87- end
88- for line in s_gmatch (text .. " \n " , " ([^\n ]*)\n " ) do
89- if line :match (" ^.*(Equipping)" ) == " Equipping" or line :match (" ^.*(Removing)" ) == " Removing" then
90- t_insert (self .blocks , { height = size + 2 })
91- else
92- self .blocks [# self .blocks ].height = self .blocks [# self .blocks ].height + size + 2
93- end
94- if self .maxWidth then
95- for _ , line in ipairs (main :WrapString (line , size , self .maxWidth - H_PAD )) do
96- t_insert (self .lines , { size = size , text = line , block = # self .blocks , font = fontToUse })
97- end
98- else
99- t_insert (self .lines , { size = size , text = line , block = # self .blocks , font = fontToUse })
100- end
101- end
102- end
81+ if text then
82+ local fontToUse
83+ if main .showFlavourText then
84+ fontToUse = font or " VAR"
85+ else
86+ fontToUse = " VAR"
87+ end
88+ for line in s_gmatch (text .. " \n " , " ([^\n ]*)\n " ) do
89+ if line :match (" ^.*(Equipping)" ) == " Equipping" or line :match (" ^.*(Removing)" ) == " Removing" then
90+ t_insert (self .blocks , { height = size + 2 })
91+ else
92+ self .blocks [# self .blocks ].height = self .blocks [# self .blocks ].height + size + 2
93+ end
94+ if self .maxWidth then
95+ for _ , line in ipairs (main :WrapString (line , size , self .maxWidth - H_PAD )) do
96+ t_insert (self .lines , { size = size , text = line , block = # self .blocks , font = fontToUse })
97+ end
98+ else
99+ t_insert (self .lines , { size = size , text = line , block = # self .blocks , font = fontToUse })
100+ end
101+ end
102+ end
103103end
104104
105105function TooltipClass :SetRecipe (recipe )
0 commit comments