+void
+Candle::expose(HSQUIRRELVM vm, SQInteger table_idx)
+{
+ if (name.empty()) return;
+ scripting::Candle* _this = new scripting::Candle(this);
+ expose_object(vm, table_idx, _this, name, true);
+}
+
+void
+Candle::unexpose(HSQUIRRELVM vm, SQInteger table_idx)
+{
+ if (name.empty()) return;
+ scripting::unexpose_object(vm, table_idx, name);
+}
+
+void
+Candle::puff_smoke()
+{
+ Vector ppos = bbox.get_middle();
+ Vector pspeed = Vector(0, -150);
+ Vector paccel = Vector(0,0);
+ Sector::current()->add_object(new SpriteParticle("images/objects/particles/smoke.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_BACKGROUNDTILES+2));
+}
+
+bool
+Candle::get_burning()
+{
+ return burning;
+}
+
+void
+Candle::set_burning(bool burning)
+{
+ if (this->burning == burning) return;
+ this->burning = burning;
+ if (burning) {
+ sprite->set_action("on");
+ } else {
+ sprite->set_action("off");
+ }
+ //puff smoke for flickering light sources only
+ if (flicker) puff_smoke();
+}
+
+/* EOF */