Visible Planets in Space

by Nauviax

Render the local planet behind platforms when in orbit. Now with parallax, rotation, and mod support!

Tweaks
5 days ago
2.0
17.8K
Environment

g Automatically find sprites

a month ago
(updated a month ago)

why not find the sprite automatically directly from data.raw?

a month ago
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
a month ago

https://mods.factorio.com/mod/developer-assistant

in game GUI search sprite

you can see all sprite

a month ago

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.

a month ago

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

a month ago

awesome mod keep it up

This thread has been locked.