added tooltips for all the other tools
[tabakrolletjie.git] / tabakrolletjie / lights.py
index 00f4c85b6e6f767fa761f920afc31ba2db6e5fb3..ac6f08e38c279ec39d2847e2b181ca43b5a5eb6a 100644 (file)
@@ -148,6 +148,12 @@ def light_info(light_config):
     return cls.get_info(light_config)
 
 
+def light_name(light_config):
+    """Find formatted light name. """
+    cls = BaseLight.find_cls(light_config["type"])
+    return cls.NAME
+
+
 class BaseLight(object):
     """ Common light functionality. """
 
@@ -156,6 +162,7 @@ class BaseLight(object):
     FITTING_IMG = None
     FITTING_RADIUS = 24.0
     BASE_COST = 0
+    NAME = "light"
 
     # cached surfaces
     _surface_cache = {}
@@ -335,6 +342,7 @@ class Lamp(BaseLight):
 
     FITTING_IMG = "lamp.png"
     BASE_COST = 1
+    NAME = "lamp"
 
 
 class PulsatingLamp(BaseLight):
@@ -345,6 +353,7 @@ class PulsatingLamp(BaseLight):
     DEFAULT_INTENSITY_RANGE = (0.0, 0.9)
     DEFAULT_INTENSITY_VELOCITY = 0.1
     BASE_COST = 3
+    NAME = "pulsating lamp"
 
     def __init__(self, **kw):
         self.pulse_range = kw.pop("pulse_range", self.DEFAULT_PULSE_RANGE)
@@ -407,6 +416,7 @@ class SpotLight(BaseLight):
 
     FITTING_IMG = "spotlight.png"
     BASE_COST = 5
+    NAME = "spotlight"
 
     def __init__(self, **kw):
         self.angular_velocity = kw.pop("angular_velocity", None)