mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
More spelling fixes
This commit is contained in:
@@ -140,7 +140,7 @@ local function remove(tbl, handler)
|
||||
return
|
||||
end
|
||||
|
||||
-- the handler we are looking for is more likly to be at the back of the array.
|
||||
-- the handler we are looking for is more likely to be at the back of the array.
|
||||
for i = #tbl, 1, -1 do
|
||||
if tbl[i] == handler then
|
||||
table_remove(tbl, i)
|
||||
@@ -272,11 +272,11 @@ function Event.add_removable_function(event_name, func)
|
||||
)
|
||||
end
|
||||
|
||||
local funcs = function_handlers[event_name]
|
||||
if not funcs then
|
||||
local functions = function_handlers[event_name]
|
||||
if not functions then
|
||||
function_handlers[event_name] = {func}
|
||||
else
|
||||
funcs[#funcs + 1] = func
|
||||
functions[#functions + 1] = func
|
||||
end
|
||||
|
||||
if handlers_added then
|
||||
@@ -293,15 +293,15 @@ function Event.remove_removable_function(event_name, func)
|
||||
if _LIFECYCLE == stage_load then
|
||||
error('cannot call during on_load', 2)
|
||||
end
|
||||
local funcs = function_handlers[event_name]
|
||||
local functions = function_handlers[event_name]
|
||||
|
||||
if not funcs then
|
||||
if not functions then
|
||||
return
|
||||
end
|
||||
|
||||
local handlers = event_handlers[event_name]
|
||||
|
||||
remove(funcs, func)
|
||||
remove(functions, func)
|
||||
remove(handlers, func)
|
||||
|
||||
if #handlers == 0 then
|
||||
@@ -382,11 +382,11 @@ function Event.add_removable_nth_tick_function(tick, func)
|
||||
)
|
||||
end
|
||||
|
||||
local funcs = function_nth_tick_handlers[tick]
|
||||
if not funcs then
|
||||
local functions = function_nth_tick_handlers[tick]
|
||||
if not functions then
|
||||
function_nth_tick_handlers[tick] = {func}
|
||||
else
|
||||
funcs[#funcs + 1] = func
|
||||
functions[#functions + 1] = func
|
||||
end
|
||||
|
||||
if handlers_added then
|
||||
@@ -403,15 +403,15 @@ function Event.remove_removable_nth_tick_function(tick, func)
|
||||
if _LIFECYCLE == stage_load then
|
||||
error('cannot call during on_load', 2)
|
||||
end
|
||||
local funcs = function_nth_tick_handlers[tick]
|
||||
local functions = function_nth_tick_handlers[tick]
|
||||
|
||||
if not funcs then
|
||||
if not functions then
|
||||
return
|
||||
end
|
||||
|
||||
local handlers = on_nth_tick_event_handlers[tick]
|
||||
|
||||
remove(funcs, func)
|
||||
remove(functions, func)
|
||||
remove(handlers, func)
|
||||
|
||||
if #handlers == 0 then
|
||||
@@ -427,9 +427,9 @@ local function add_handlers()
|
||||
end
|
||||
end
|
||||
|
||||
for event_name, funcs in pairs(function_handlers) do
|
||||
for i = 1, #funcs do
|
||||
local handler = funcs[i]
|
||||
for event_name, functions in pairs(function_handlers) do
|
||||
for i = 1, #functions do
|
||||
local handler = functions[i]
|
||||
core_add(event_name, handler)
|
||||
end
|
||||
end
|
||||
@@ -441,9 +441,9 @@ local function add_handlers()
|
||||
end
|
||||
end
|
||||
|
||||
for tick, funcs in pairs(function_nth_tick_handlers) do
|
||||
for i = 1, #funcs do
|
||||
local handler = funcs[i]
|
||||
for tick, functions in pairs(function_nth_tick_handlers) do
|
||||
for i = 1, #functions do
|
||||
local handler = functions[i]
|
||||
core_on_nth_tick(tick, handler)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user