More spelling fixes

This commit is contained in:
bbassie
2019-07-03 16:16:39 +02:00
parent 786525f58f
commit 36aae4fd12
42 changed files with 312 additions and 312 deletions

View File

@@ -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