[Done] How to add Light to Small Electric Pole?

Place to get help with not working mods / modding interface.
dvalitov
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Jul 21, 2018 3:38 pm
Contact:

[Done] How to add Light to Small Electric Pole?

Post by dvalitov »

I tried to do this in data.lua in clear new mod_0.0.1.zip :

Code: Select all

data.raw["electric-pole"]["small-electric-pole"].light = {{
--  minimum_darkness = 0.3,
  intensity = 0.9,
  size = 60, 
  color = {r=0.0, g=1.0, b=0.0}, }}
data.raw["player"]["player"].light = {{
--  minimum_darkness = 0.3,
  intensity = 0.9,
  size = 60, 
  color = {r=1.0, g=0.0, b=0.0}, }}
It's working with "player", but not working with "small-electric-pole".

Or should i add a some entity like "hidden-lamp" and add it to every electric pole?
Like how it is done in https://mods.factorio.com/mod/LightedPolesPlus and some other mods.
I probably can do little copypaste and rewrite, but i dont realy wont.

Or maybe i can add some parameters to "small-electric-pole" to make it light?
Last edited by dvalitov on Mon Dec 17, 2018 8:38 pm, edited 1 time in total.
Sorry if my english is poor.
dvalitov
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Jul 21, 2018 3:38 pm
Contact:

Re: How to add Light to Small Electric Pole?

Post by dvalitov »

Or how can i create just a simple source of light which wil no need in any kind of fuel or energy?
Sorry if my english is poor.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: How to add Light to Small Electric Pole?

Post by darkfrei »

dvalitov wrote: Mon Dec 17, 2018 2:04 pm Or how can i create just a simple source of light which wil no need in any kind of fuel or energy?
1. Wait for 0.17
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: How to add Light to Small Electric Pole?

Post by Optera »

Doesn't LEP work for you or why would you try to reinvent the lighted pole?
dvalitov
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Jul 21, 2018 3:38 pm
Contact:

Re: How to add Light to Small Electric Pole?

Post by dvalitov »

Optera wrote: Mon Dec 17, 2018 4:30 pm Doesn't LEP work for you or why would you try to reinvent the lighted pole?
I want to add just a little tiny light to default electric poles. Like light = {intensity = 0.1, size = 20}. To not to bump into them by car at the night.
But if i use your hidden-lamp with energy_usage_per_tick = "0W" they works, but start to blink with red triangle.
Sorry if my english is poor.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: How to add Light to Small Electric Pole?

Post by darkfrei »

dvalitov wrote: Mon Dec 17, 2018 6:23 pm
Optera wrote: Mon Dec 17, 2018 4:30 pm Doesn't LEP work for you or why would you try to reinvent the lighted pole?
I want to add just a little tiny light to default electric poles. Like light = {intensity = 0.1, size = 20}. To not to bump into them by car at the night.
But if i use your hidden-lamp with energy_usage_per_tick = "0W" they works, but start to blink with red triangle.
In 0.17 you can make entities with any power source, nothing = don't need any power source.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: How to add Light to Small Electric Pole?

Post by Bilka »

dvalitov wrote: Mon Dec 17, 2018 6:23 pm But if i use your hidden-lamp with energy_usage_per_tick = "0W" they works, but start to blink with red triangle.
You can turn off the warning icon in the prototype: https://wiki.factorio.com/Types/EnergyS ... power_icon
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
dvalitov
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Jul 21, 2018 3:38 pm
Contact:

Re: How to add Light to Small Electric Pole?

Post by dvalitov »

Thank you guys! I think it look nice.
I use energy_usage_per_tick = "10W" and it dont cause red triangle.
I dont know am i need or can upload it, because it is basically Optera's LEP+ without new poles.
I do not know how to write it correctly in english.
q
Sorry if my english is poor.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Done] How to add Light to Small Electric Pole?

Post by Optera »

LEP+ is released under MIT license. You are free to change or fork as long as the original license remains in all copies or substantial portions of it.

It'd also be polite to reference the original mod in the mod description.
Post Reply

Return to “Modding help”