Page 1 of 1

Make maximum_wire_distance readable from inside lua

Posted: Wed Feb 24, 2016 3:23 pm
by Choumiko
It would be great if the wiring distance of electric poles could be readable from the game.entity_prototypes.
This would allow FARL to use modded poles without having to resort to scanning the entities in data.lua and creating a fake recipe with the distance in it.

Re: Make maximum_wire_distance readable from inside lua

Posted: Sun Jul 31, 2016 6:47 pm
by Choumiko
*bump*

Re: Make maximum_wire_distance readable from inside lua

Posted: Sun Jul 31, 2016 9:27 pm
by aubergine18
can't you use data.raw to access those prototypes? https://wiki.factorio.com/index.php?title=Data.raw

Re: Make maximum_wire_distance readable from inside lua

Posted: Sun Jul 31, 2016 10:15 pm
by Choumiko
data.raw isn't accessible from within control.lua, only things provided through http://lua-api.factorio.com/latest/LuaG ... prototypes
Which leads to this ugly piece of code: https://github.com/Choumiko/FARL/blob/m ... -fixes.lua (useless recipe with poles as ingredients and wire distance*10 as ingredient amount :lol: )

Re: Make maximum_wire_distance readable from inside lua

Posted: Sun Jul 31, 2016 11:44 pm
by Rseding91
I thought I added this... :) oops.. I guess not. I'll add it tomorrow if I don't forget again.