on_time_tick is not mandatory anymore (when a minigame keeps track of time)

master
Zughy 2020-12-19 14:04:43 +01:00
parent ec66b5ff4d
commit 997038089d
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ To customise your mod even more, there are a few empty callbacks you can use. Th
* `arena_lib.on_end(mod, function(arena, players))`
* `arena_lib.on_join(mod, function(p_name, arena))`: called when a player joins an ongoing match
* `arena_lib.on_death(mod, function(arena, p_name, reason))`: called when a player dies
* `arena_lib.on_time_tick(mod, function(arena))`: called every second if `time_mode` is different from 0. If it is, this callback must be declared
* `arena_lib.on_time_tick(mod, function(arena))`: called every second if `time_mode` is different from 0
* `arena_lib.on_timeout(mod, function(arena))`: called when the timer of an arena, if exists (`time_mode = 2`), reaches 0. Not declaring it will make the server crash when time runs out
* `arena_lib.on_eliminate(mod, function(arena, p_name))`: called when a player is eliminated (see `arena_lib.remove_player_from_arena(...)`)
* `arena_lib.on_kick(mod, function(arena, p_name))`: called when a player is kicked from a match (same as above)

View File

@ -2151,7 +2151,7 @@ function time_start(mod_ref, arena)
assert(mod_ref.on_timeout, "[ARENA_LIB] " .. S("[!] on_timeout callback must be declared to properly use a decreasing timer!"))
mod_ref.on_timeout(arena)
return
else
elseif mod_ref.on_time_tick then
mod_ref.on_time_tick(arena)
end