Day Night Image Switch-out

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1455
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Day Night Image Switch-out

Post by TheSAguy »

Hi,

I'd like to switch-out the image of my custom building, depending it it's day or night.
The only code I found was for the rocket-silo:

Code: Select all

    base_day_sprite =
    {
      filename = "__base__/graphics/entity/rocket-silo/06-silo-base/06-silo-base-day.png",
      width = 352,
      height = 384,
      shift = {0, 0}
    },
    base_night_sprite =
    {
      filename = "__base__/graphics/entity/rocket-silo/06-silo-base/06-silo-base-night.png",
      width = 352,
      height = 384,
      shift = {0, 0}
    },
Is that how I'd do it for my mod? Replace "animation" with above?
The goal is to have the building be illuminated / glow at night.

Is there a way to do it via code?
I was thinking the light code:

Code: Select all

    light = {intensity = 0.9, size = 80},
Thanks.
Post Reply

Return to “Modding help”