Page 1 of 1

Making electric furnace produce light

Posted: Sun May 04, 2014 9:49 am
by GotLag
As an exercise in learning how to mod, I made a variant of the stone furnace that runs on electricity. However, as it doesn't use a burner it doesn't emit any light. I tried using the light code from the research lab but it had no effect on a furnace:

Code: Select all

light = {intensity = 0.75, size = 8},
For reference here is the code for my furnace:

Code: Select all

  {
    type = "furnace",
    name = "electric-stone-furnace",
    icon = "__Electric-Stone-Furnace__/graphics/icons/electric-stone-furnace.png",
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    group = "production",
    minable = {mining_time = 1, result = "electric-stone-furnace"},
    max_health = 150,
    corpse = "medium-remnants",
    repair_sound = { filename = "__base__/sound/manual-repair-simple.wav" },
    mined_sound = { filename = "__base__/sound/deconstruct-bricks.wav" },
    resistances =
    {
      {
        type = "fire",
        percent = 80
      },
      {
        type = "explosion",
        percent = 30
      }
    },
    collision_box = {{-0.7, -0.7}, {0.7, 0.7}},
    selection_box = {{-0.8, -1}, {0.8, 1}},
    smelting_categories = {"smelting"},
    result_inventory_size = 1,
    smelting_energy_consumption = "180kW",
    smelting_speed = 1,
    source_inventory_size = 1,
    energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      emissions = 0.005
    },
    on_animation =
    {
      filename = "__Electric-Stone-Furnace__/graphics/entity/electric-stone-furnace/electric-stone-furnace.png",
      priority = "extra-high",
      x = 81,
      frame_width = 81,
      frame_height = 64,
      frame_count = 12,
      animation_speed = 0.5,
      shift = {0.5, 0.05 }
    },
    off_animation =
    {
      filename = "__Electric-Stone-Furnace__/graphics/entity/electric-stone-furnace/electric-stone-furnace.png",
      priority = "extra-high",
      frame_width = 81,
      frame_height = 64,
      frame_count = 1,
      animation_speed = 0.5,
      shift = {0.5, 0.05 }
    },
    fast_replaceable_group = "furnace"
  }
Is there a way to make my electric furnace produce light when operating?

Re: Making electric furnace produce light

Posted: Sun May 04, 2014 10:20 pm
by rk84
what if you make fire_animation with same data that is in on_animation. And copy/paste off_animation to on_animation?

Re: Making electric furnace produce light

Posted: Mon May 05, 2014 11:03 am
by GotLag
No joy, unfortunately, but thanks for the idea.