1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 23:58:48 -05:00
minetest/builtin/game
Auke Kok 4e59fcf5c1 Add consistent monotonic day counter - get_day_count()
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.
2016-03-09 01:45:23 +01:00
..
auth.lua Faster insertion into table 2016-03-06 23:42:04 +00:00
chatcommands.lua Add consistent monotonic day counter - get_day_count() 2016-03-09 01:45:23 +01:00
constants.lua Improve LuaVoxelManip documentation 2015-11-07 11:59:24 -05:00
deprecated.lua Refactor logging 2015-10-14 01:03:54 -04:00
detached_inventory.lua SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
falling.lua Minor tweaks __builtin:falling_node 2015-09-01 19:14:08 +02:00
features.lua Add AreaStore custom ID API 2016-03-07 16:33:20 -05:00
forceloading.lua Fix crash reported here: https://forum.minetest.net/viewtopic.php?f=6&t=9726 2014-07-13 11:05:07 +02:00
init.lua Add callback parameter for core.emerge_area() 2015-11-02 18:43:09 -05:00
item_entity.lua Show infotext with description for item entities 2016-01-18 17:21:41 +00:00
item.lua Initialize facedir and wallmounted tables only once. 2016-02-11 04:23:17 +00:00
misc.lua Faster insertion into table 2016-03-06 23:42:04 +00:00
mod_profiling.lua Fix retval of entity.get_staticdata beeing lost while profiling is enabled 2014-08-24 01:56:27 +02:00
privileges.lua Use "core" namespace internally 2014-05-08 13:02:04 -04:00
register.lua Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
statbars.lua Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2015-02-08 12:47:45 -05:00
static_spawn.lua Log static_spawn error only once 2015-11-21 00:13:28 +01:00
voxelarea.lua Improved VoxelArea variable locality, thus performance 2014-11-14 00:10:09 +10:00