2017-07-25 01:38:08 +02:00
|
|
|
--
|
|
|
|
-- Vignette mod
|
|
|
|
-- By KaadmY, for Pixture
|
|
|
|
--
|
|
|
|
|
2017-07-25 18:38:26 +02:00
|
|
|
local enable_vignette = minetest.settings:get_bool("vignette_enable")
|
2017-07-25 01:38:08 +02:00
|
|
|
|
2017-07-25 18:38:26 +02:00
|
|
|
if enable_vignette then
|
|
|
|
local vignette_definition = {
|
|
|
|
hud_elem_type = "image",
|
|
|
|
position = {x = 0.5, y = 0.5},
|
|
|
|
scale = {x = -100, y = -100},
|
|
|
|
alignment = 0,
|
|
|
|
text = "vignette_vignette.png",
|
2020-04-07 14:39:05 +02:00
|
|
|
z_index = -40,
|
2017-07-25 18:38:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
local function on_joinplayer(player)
|
|
|
|
if not player:is_player() then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
player:hud_add(vignette_definition)
|
2017-07-25 01:38:08 +02:00
|
|
|
end
|
|
|
|
|
2017-07-25 18:38:26 +02:00
|
|
|
minetest.register_on_joinplayer(on_joinplayer)
|
2017-07-25 01:38:08 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
default.log("mod:vignette", "loaded")
|