Diff

core/moduleapi.lua @ 5771:c4ed6680bf8d

moduleapi: module:get_host_type() now returns 'global' for * and 'local' for non-components
author Matthew Wild <mwild1@gmail.com>
date Tue, 06 Aug 2013 17:17:23 +0100
parent 5530:d83482fc4a81
child 5776:bd0ff8ae98a8
line wrap: on
line diff
--- a/core/moduleapi.lua	Tue Aug 06 14:35:03 2013 +0200
+++ b/core/moduleapi.lua	Tue Aug 06 17:17:23 2013 +0100
@@ -44,7 +44,7 @@
 end
 
 function api:get_host_type()
-	return self.host ~= "*" and hosts[self.host].type or nil;
+	return (self.host == "*" and "global") or hosts[self.host].type or "local";
 end
 
 function api:set_global()