Diff

util/timer.lua @ 6777:5de6b93d0190

util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author Kim Alvefur <zash@zash.se>
date Sat, 21 Feb 2015 10:36:37 +0100
parent 5776:bd0ff8ae98a8
child 6791:e813e8cf6046
child 7988:dc758422d896
line wrap: on
line diff
--- a/util/timer.lua	Mon Aug 10 22:16:05 2015 +0200
+++ b/util/timer.lua	Sat Feb 21 10:36:37 2015 +0100
@@ -17,7 +17,7 @@
 local data = {};
 local new_data = {};
 
-module "timer"
+local _ENV = nil;
 
 local _add_task;
 if not server.event then
@@ -78,6 +78,6 @@
 	end
 end
 
-add_task = _add_task;
-
-return _M;
+return {
+	add_task = _add_task;
+};