mirror of
https://github.com/appgurueu/hud_timers.git
synced 2024-08-18 20:04:06 +02:00
Remove mostly useless logging
This commit is contained in:
parent
0bba9c4e0c
commit
6a444dfb6b
22
main.lua
22
main.lua
@ -1,13 +1,5 @@
|
|||||||
---
|
|
||||||
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
|
||||||
--- Created by lars.
|
|
||||||
--- DateTime: 12.03.19 16:26
|
|
||||||
---
|
|
||||||
|
|
||||||
timers = {}
|
timers = {}
|
||||||
|
|
||||||
modlib.log.create_channel("hud_timers") -- Create log channel
|
|
||||||
|
|
||||||
local config =
|
local config =
|
||||||
modlib.conf.import(
|
modlib.conf.import(
|
||||||
"hud_timers",
|
"hud_timers",
|
||||||
@ -121,13 +113,6 @@ function add_timer(playername, timer_definition)
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
modlib.log.write(
|
|
||||||
"hud_timers",
|
|
||||||
"Timer " ..
|
|
||||||
timer_definition.name ..
|
|
||||||
" with duration of " .. timer_definition.duration .. " added to the HUD of player " .. playername
|
|
||||||
)
|
|
||||||
|
|
||||||
local timer = {
|
local timer = {
|
||||||
name = timer_definition.name or "Unnamed Timer",
|
name = timer_definition.name or "Unnamed Timer",
|
||||||
time_left = timer_definition.duration,
|
time_left = timer_definition.duration,
|
||||||
@ -168,13 +153,6 @@ function maintain_timers(timers, dtime, player)
|
|||||||
player:hud_remove(timer.ids.bg)
|
player:hud_remove(timer.ids.bg)
|
||||||
player:hud_remove(timer.ids.bar)
|
player:hud_remove(timer.ids.bar)
|
||||||
player:hud_remove(timer.ids.label)
|
player:hud_remove(timer.ids.label)
|
||||||
modlib.log.write(
|
|
||||||
"hud_timers",
|
|
||||||
"Timer " ..
|
|
||||||
timer.name ..
|
|
||||||
" with duration of " ..
|
|
||||||
timer.duration .. " removed from the HUD of player " .. player:get_player_name()
|
|
||||||
)
|
|
||||||
table.remove(timers, i)
|
table.remove(timers, i)
|
||||||
if timer.time_left > 0 then
|
if timer.time_left > 0 then
|
||||||
timer.on_complete(player:get_player_name(), timer)
|
timer.on_complete(player:get_player_name(), timer)
|
||||||
|
Loading…
Reference in New Issue
Block a user