mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-03-11 06:07:44 +01:00
Add a setting to control Christmas decorations (#4809)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4809 Reviewed-by: kno10 <kno10@noreply.git.minetest.land> Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com> Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
parent
633b0432ef
commit
289816a7b4
2 changed files with 11 additions and 5 deletions
|
@ -642,13 +642,15 @@ function mcl_util.move_player_list(player, src_listname)
|
|||
player:get_look_dir(), false)
|
||||
end
|
||||
|
||||
local christmas_deco = minetest.settings:get("vl_christmas_decorations") or "Calendar"
|
||||
|
||||
function mcl_util.is_it_christmas()
|
||||
local date = os.date("*t")
|
||||
if date.month == 12 and date.day >= 24 or date.month == 1 and date.day <= 7 then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
local date_is_christmas = (date.month == 12 and date.day >= 24 or date.month == 1 and date.day <= 7)
|
||||
|
||||
return christmas_deco == "Always"
|
||||
or (christmas_deco == "Calendar" and date_is_christmas)
|
||||
or false
|
||||
end
|
||||
|
||||
function mcl_util.to_bool(val)
|
||||
|
|
|
@ -257,6 +257,10 @@ mcl_default_shadow_intensity (Default shadow intensity) float 0.33 0.0 1.0
|
|||
# Selecting liquid nodes on clients without a cross hair will not work correctly if this setting is disabled.
|
||||
mcl_buckets_use_select_box (Buckets use select box) bool false
|
||||
|
||||
# Changes when Christmas decorations (e.g. on chests) are enabled.
|
||||
# 'Calendar' means from December 24th to January 7th
|
||||
vl_christmas_decorations (Christmas decorations) enum Calendar Always,Calendar,Never
|
||||
|
||||
[Experimental]
|
||||
# Whether ice is translucent. If disabled, ice is fully opaque.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue