Page 1 of 1

light source on nonenergy entities

Posted: Thu Mar 13, 2014 3:39 pm
by Dysoch
is it possible to add light sources to other entities then electric lamps or machines?

i tried this:

Code: Select all

type = "resource",
    name = "lava-1",
    icon = "__DyTech-Graphics__/graphics/fluid/lava-1.png",
    flags = {"placeable-neutral"},
    category = "lava",
    order="lava-1",
    infinite = true,
    minimum = 750,
    normal = 7500,
    minable =
    {
      hardness = 1,
      mining_time = 1,
      results =
      {
        {
          type = "fluid",
          name = "lava-1",
          amount_min = 1,
          amount_max = 1,
          probability = 1
        }
      }
    },
    collision_box = {{ -1.4, -1.4}, {1.4, 1.4}},
    selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
	light =
    {
      {
        type = "oriented",
        minimum_darkness = 0.0,
        picture =
        {
          filename = "__core__/graphics/light-small.png",
          priority = "medium",
          scale = 2,
          width = 150,
          height = 150
        },
        size = 2,
        intensity = 0.6
      },
      {
        type = "oriented",
        minimum_darkness = 0.3,
        picture =
        {
          filename = "__core__/graphics/light-medium.png",
          priority = "medium",
          scale = 2,
          width = 300,
          height = 300
        },
        size = 2,
        intensity = 0.6
      }
    },
it loads just fine, but no light. its kinda odd that lava doesnt give off light :P

also tried:

Code: Select all

light = {intensity = 0.9, size = 40},
still no light.

anyway we can do give light to resource types?

Re: light source on nonenergy entities

Posted: Thu Mar 13, 2014 3:51 pm
by ficolas
Dont think is possible, but you can make a lamp with no conpsumion and give it energy when created.