forked from Mirrorlandia_minetest/minetest
4e59fcf5c1
I've written several experimental bits of code that revolve around the need for a consistent calendar, but implementing one is extremely hard in mods due to time changes and mods overriding core.get_timeofday(), which will conflict. The second part of the problem is that doing this from a mod requires constant maintenance of a settings file. An implementation in core is trivial, however, and solves all of these problems at virtually no cost: No extra branches in server steps, and a single branch when minetest.set_time_of_day(), which is entirely reasonable. We store the day_count value in env_meta.txt. The use case is obvious: This change allows mods to create an actual virtual calendar, or properly account for seasonal changes, etc.. We add a "/days" chatcommand that displays the current day count. No permissions are needed. It can only retrieve the day count, not modify it. |
||
---|---|---|
.. | ||
auth.lua | ||
chatcommands.lua | ||
constants.lua | ||
deprecated.lua | ||
detached_inventory.lua | ||
falling.lua | ||
features.lua | ||
forceloading.lua | ||
init.lua | ||
item_entity.lua | ||
item.lua | ||
misc.lua | ||
mod_profiling.lua | ||
privileges.lua | ||
register.lua | ||
statbars.lua | ||
static_spawn.lua | ||
voxelarea.lua |