fixed turnip/light positioning bug
[tabakrolletjie.git] / tabakrolletjie / lights.py
index cda60022a5d5aa227d7a9401ad119ca31ff2ba67..318aefca3ca2579a4c36cc0b373944c2a91b455a 100644 (file)
@@ -159,7 +159,7 @@ class BaseLight(object):
             self.colour_pos = colours.index(start_colour)
             self.colour = start_colour
         self.on = on
-        if not on and len(colours) > 1:
+        if not on:
             self.colour_pos = -1
         self.intensity = intensity
         self.body = pymunk.Body(0, 0, pymunk.body.Body.STATIC)
@@ -280,7 +280,7 @@ class BaseLight(object):
 
     def render_fitting(self, surface):
         rx, ry = self.ray_manager.pygame_position(surface)
-        surface.blit(self.fitting_image(), (rx - 24, ry - 24), None, 0)
+        surface.blit(self.fitting_image(), (rx - self.FITTING_RADIUS, ry - self.FITTING_RADIUS), None, 0)
 
     def power_usage(self):
         if not self.on:
@@ -294,6 +294,7 @@ class BaseLight(object):
 
     def off(self):
         self.on = False
+        self.colour_pos = -1
 
     def toggle(self):
         self.colour_pos += 1