From 49d67d6808e7e206e30a4cc60e9b4f7965cac7d2 Mon Sep 17 00:00:00 2001 From: adrianna Date: Fri, 9 Sep 2016 22:32:34 +0200 Subject: [PATCH] made the lamp a lamp --- data/stations/station-alpha.json | 2 +- tabakrolletjie/lights.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/data/stations/station-alpha.json b/data/stations/station-alpha.json index 7eadc6e..f14f82e 100644 --- a/data/stations/station-alpha.json +++ b/data/stations/station-alpha.json @@ -37,7 +37,7 @@ "intensity": 0.8 }, { - "type": "spotlight", + "type": "lamp", "colour": "yellow", "position": [500, 500], "direction": -90.0, diff --git a/tabakrolletjie/lights.py b/tabakrolletjie/lights.py index 9f0005d..136f10f 100644 --- a/tabakrolletjie/lights.py +++ b/tabakrolletjie/lights.py @@ -216,9 +216,18 @@ class BaseLight(object): pass +class Lamp(BaseLight): + FITTING_IMG = "lamp.png" + + def __init__(self, **kw): + kw.pop("direction", None) + kw.pop("spread", None) + super(Lamp, self).__init__(**kw) + + class SpotLight(BaseLight): FITTING_IMG = "spotlight.png" - + def __init__(self, **kw): kw.pop("direction", None) kw.pop("spread", None) -- 2.34.1