PlanetsLib: Additional Orbit Graphics
Adds several new orbit graphics to smooth out the gaps in between the graphics included by default within PlanetsLib.
Description
*Proud member of the Foundry Discord, for (almost) all your planetary discussion needs*
Features
Extension mod for PlanetsLib, defining *five* additional orbit graphics to smooth out the gaps between 1.8, 2.65, and 3.95, by adding 2.05, 2.35, 2.95, 3.25, and 3.55 orbit graphics. This allows for more precisely defined orbit graphics, and reduces the amount of image stretching required for values in between the default distance values.
As of v1.0.2, there are now *three* additional orbit graphics placed after the 3.95 mark, adding in 4.8, 5.4, and 6.0 to define even larger orbits
How to Use
Most of this information can be found in the PlanetsLib documentation, but to re-iterate the important points; this functionality is intended for defining the *orbits of moons* around other planets.
- Add an optional or required dependency to PlanetsLib (hidden or otherwise), to ensure that its functionality is loaded before attempting to use.
- During data or data-updates (whenever the data for the moon is defined/updated), either use PlanetsLib:extend or PlanetsLib:update to define the orbit, with the parent, distance, and orientation values defined as usual.
- For the sprite, use `
PlanetsLib.get_orbit_sprite(radius)` instead of manually defining the orbit graphics.
Example
The Secretas orbit patch is defined similarly to the below example. Frozeta is the name of the moon, while Secretas is the parent planet that it revolves around.
PlanetsLib:update({
{
type = "planet",
name = "frozeta",
subgroup = "satellites", -- put it in the appropriate subgroup for the Factoriopedia
draw_orbit = false, -- prevent the game from drawing vanilla orbit around the sun
orbit = {
parent = { -- define the parent planet
type = "planet",
name ="secretas"
},
distance = 3.95, -- how far away the moon is from the parent planet
orientation = 0.45,
sprite = PlanetsLib.get_orbit_sprite(3.95) -- draw the moon orbit at the same distance
}
}
})
Final Notes
The full list of precisely defined distance values with matching orbit graphics becomes:
- 1.39
- 1.5
- 1.8
- 2.05
- 2.35
- 2.65
- 2.95
- 3.25
- 3.55
- 3.95
- 4.8
- 5.4
- 6.0
Ratings & reviews
Sign in to leave a rating or comment.