@@ -6,17 +6,17 @@ local LIB = StreamRadioLib.Hook
66table .Empty (LIB )
77
88local g_namePrefixMain = " 3DStreamRadio_mainHook_"
9- local g_nameprefixCustom = " 3DStreamRadio_"
9+ local g_namePrefixCustom = " 3DStreamRadio_"
1010local g_hooks = {}
1111local g_orderCounter = 0
1212
13- function LIB . GetMainHookIdentifier (eventName )
13+ local function getMainHookIdentifier (eventName )
1414 local identifier = g_namePrefixMain .. tostring (eventName or " " )
1515 return identifier
1616end
1717
18- function LIB . GetCostomHookIdentifier (eventName )
19- local identifier = g_nameprefixCustom .. tostring (eventName or " " )
18+ local function getCustomHookIdentifier (eventName )
19+ local identifier = g_namePrefixCustom .. tostring (eventName or " " )
2020 return identifier
2121end
2222
@@ -140,7 +140,7 @@ function LIB.Add(eventName, identifier, func, order)
140140 BuildOrder (hookData )
141141
142142 if not hookData .hasHook then
143- local hookIdentifier = LIB . GetMainHookIdentifier (eventName )
143+ local hookIdentifier = getMainHookIdentifier (eventName )
144144
145145 hook .Remove (eventName , hookIdentifier )
146146 hook .Add (eventName , hookIdentifier , function (...)
@@ -170,7 +170,7 @@ function LIB.Remove(eventName, identifier)
170170 BuildOrder (hookData )
171171
172172 if table .IsEmpty (byName ) then
173- local hookIdentifier = LIB . GetMainHookIdentifier (eventName )
173+ local hookIdentifier = getMainHookIdentifier (eventName )
174174
175175 hook .Remove (eventName , hookIdentifier )
176176 hookData .hasHook = nil
@@ -183,17 +183,17 @@ function LIB.Run(eventName, ...)
183183end
184184
185185function LIB .AddCustom (eventName , ...)
186- local eventName = LIB . GetMainHookIdentifier (eventName )
186+ local eventName = getCustomHookIdentifier (eventName )
187187 return LIB .Add (eventName , ... )
188188end
189189
190190function LIB .RemoveCustom (eventName , ...)
191- local eventName = LIB . GetMainHookIdentifier (eventName )
191+ local eventName = getCustomHookIdentifier (eventName )
192192 return LIB .Remove (eventName , ... )
193193end
194194
195195function LIB .RunCustom (eventName , ...)
196- local eventName = LIB . GetMainHookIdentifier (eventName )
196+ local eventName = getCustomHookIdentifier (eventName )
197197 return LIB .Run (eventName , ... )
198198end
199199
0 commit comments