Making electric furnace produce light

Place to get help with not working mods / modding interface.
Post Reply
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Making electric furnace produce light

Post 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?

User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: Making electric furnace produce light

Post by rk84 »

what if you make fire_animation with same data that is in on_animation. And copy/paste off_animation to on_animation?
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Making electric furnace produce light

Post by GotLag »

No joy, unfortunately, but thanks for the idea.

Post Reply

Return to “Modding help”