Moon phases for Minetest
Go to file
Till Affeldt e2220440ec Implement classic texture style and allow users to choose 2020-04-12 01:45:37 +02:00
textures Implement classic texture style and allow users to choose 2020-04-12 01:45:37 +02:00
LICENSE.md Initialize repository 2020-04-11 04:00:56 +02:00
README.md Fix missing opt. dependency and offset cycle 2020-04-11 06:47:21 +02:00
commands.lua Implement classic texture style and allow users to choose 2020-04-12 01:45:37 +02:00
init.lua Implement classic texture style and allow users to choose 2020-04-12 01:45:37 +02:00
mod.conf Remove datastorage dependency, update mod.conf, adjust moon size 2020-04-12 00:35:36 +02:00
screenshot.png Initialize repository 2020-04-11 04:00:56 +02:00
settingtypes.txt Implement classic texture style and allow users to choose 2020-04-12 01:45:37 +02:00

README.md

Moon phases

Make your moon follow a realistic cycle

Important: This mod requires at least Minetest 5.2.0 for the game's new sky API. Make sure you have the latest version installed or update your game.

Dependencies

This mod has no hard dependencies whatsoever, so you can use it as you will. However, I do recommend using the skylayer mod. With the Minetest's new sky API it is likely for more mods to change the sky configuration, possibly resulting in conflict. This utility mod can help circumvent these issues if both mods use it.

Commands

This mod comes with two commands to print or change the current moon phase.

  • Use /moonphase to view the currently active phase.
  • Use /set_moonphase <phase> to change it. <phase> has to be a full number between 1 and 8.

In order to change the phase, you will need the corresponding privilege. Use /grant <player> moonphase to grant it.

Mod Integration

Just like the chat commands, this mod provides a LUA api for accessing the moon phase. It contains a method called moon_phases.get_phase() that will return a numeric value representing the current moon phase. You can also set the phase via moon_phases.set_phase(phase) where phase is an integer between 1 and 8.

Configuration

The mod provides the option to change the length of the moon cycle. By default, the moon texture will change every four (in-game) nights. This results in a total cycle of 32 days.

LICENSE

All source code is licensed under GNU LESSER GENERAL PUBLIC LICENSE version 3. You can find a copy of that license in the repository.

Media

All included moon textures are resized versions of graphics from NASA's Scientific Visualization Studio by Ernie Wright. These images are part of the Public Domain as CC-BY-SA 3.0. You can access the entire (high resolution) album on their website. See NASA's media guidelines for more information on licensing.