Lights can be added to the world
[tabakrolletjie.git] / tabakrolletjie / lights.py
index e546b292851510f5b3452d68b1a1d63b7f7c9608..077cec033e1a61d9d22b41b6395507091eadf68c 100644 (file)
@@ -38,6 +38,11 @@ class LightManager(object):
         for light in self._lights:
             light.add(self._space)
 
+    def add_light(self, cfg):
+        light = BaseLight.load(cfg)
+        self._lights.append(light)
+        light.add(self._space)
+
     def toggle_nearest(self, *args, **kw):
         light = self.nearest(*args, **kw)
         if light: