local planets = data.raw["planet"]
for k, planet in pairs(planets) do
local name = planet.name
local icon = planet.icon
local icon_size = planet.icon_size
--planet. starmap_icon
--planet. starmap_icon_size
end
local planets = data.raw["space-location"]
for k, planet in pairs(planets) do
local name = planet.name
local icon = planet.icon
local icon_size = planet.icon_size
--planet. starmap_icon
--planet. starmap_icon_size
end
I actually didn't think to look at the SpaceLocationPrototype docs to see if the starmap icon was available. This is a much nicer solution.
I'll try and implement the first pull request, then look into layers / planet.starmap_icons from the second pull request later when I have more time.
For my case, I think that instead of making special case, we can generalize by checking if starmap_icon or starmap_icons is set, if not, it means that there is no planet to be rendered