mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Add "fake" crosshair when the player is wearing a pumpkin
This commit is contained in:
parent
dddaed42b6
commit
d5a2e5e514
1 changed files with 11 additions and 1 deletions
|
@ -129,6 +129,16 @@ if minetest.get_modpath("mcl_armor") then
|
||||||
position = {x = 0.5, y = 0.5},
|
position = {x = 0.5, y = 0.5},
|
||||||
scale = {x = -100, y = -100},
|
scale = {x = -100, y = -100},
|
||||||
text = "mcl_farming_pumpkin_hud.png",
|
text = "mcl_farming_pumpkin_hud.png",
|
||||||
|
z_index = -200
|
||||||
|
})
|
||||||
|
--this is a fake crosshair, because hotbar and crosshair doesn't support z_index
|
||||||
|
--TODO: remove this and add correct z_index values when this is fixed: https://github.com/minetest/minetest/issues/9270
|
||||||
|
player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
position = {x = 0.5, y = 0.5},
|
||||||
|
scale = {x = 1, y = 1},
|
||||||
|
text = "crosshair.png",
|
||||||
|
z_index = -100
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
local remove_pumpkin_hud = function(player)
|
local remove_pumpkin_hud = function(player)
|
||||||
|
|
Loading…
Reference in a new issue