forked from Reload/techage_modpack
built on 06/08/2022 15:31:01
This commit is contained in:
parent
09584b8a2d
commit
5a7d7cdcf9
@ -1,4 +0,0 @@
|
||||
tubelib2
|
||||
default
|
||||
worldedit?
|
||||
techage?
|
@ -1 +0,0 @@
|
||||
Hyperloop Mod, the fast and modern way of traveling.
|
@ -1,3 +1,4 @@
|
||||
name = hyperloop
|
||||
depends = default, tubelib2
|
||||
optional_depends = techage, worldedit, intllib
|
||||
description = Hyperloop Mod, the fast and modern way of traveling.
|
||||
|
@ -1,3 +0,0 @@
|
||||
default
|
||||
3d_armor?
|
||||
player_monoids?
|
@ -1 +0,0 @@
|
||||
Adds stamina and hunger effects.
|
@ -66,10 +66,11 @@ end
|
||||
|
||||
local function set_player_attribute(player, key, value)
|
||||
if player.get_meta then
|
||||
if value == nil then
|
||||
player:get_meta():set_string(key, "")
|
||||
else
|
||||
player:get_meta():set_string(key, tostring(value))
|
||||
local meta = player:get_meta()
|
||||
if meta and value == nil then
|
||||
meta:set_string(key, "")
|
||||
elseif meta then
|
||||
meta:set_string(key, tostring(value))
|
||||
end
|
||||
else
|
||||
player:set_attribute(key, value)
|
||||
@ -78,7 +79,8 @@ end
|
||||
|
||||
local function get_player_attribute(player, key)
|
||||
if player.get_meta then
|
||||
return player:get_meta():get_string(key)
|
||||
local meta = player:get_meta()
|
||||
return meta and meta:get_string(key) or ""
|
||||
else
|
||||
return player:get_attribute(key)
|
||||
end
|
||||
@ -520,12 +522,14 @@ minetest.register_on_joinplayer(function(player)
|
||||
size = {x = 24, y = 24},
|
||||
text = "stamina_hud_fg.png",
|
||||
number = level,
|
||||
text2 = "stamina_hud_bg.png",
|
||||
item = settings.visual_max,
|
||||
alignment = {x = -1, y = -1},
|
||||
offset = {x = -266, y = -110},
|
||||
max = 0,
|
||||
})
|
||||
stamina.set_saturation(player, level)
|
||||
set_hud_id(player, id)
|
||||
stamina.set_saturation(player, level)
|
||||
-- reset poisoned
|
||||
stamina.set_poisoned(player, false)
|
||||
-- remove legacy hud_id from player metadata
|
||||
|
@ -1 +1,4 @@
|
||||
name = stamina
|
||||
depends = default
|
||||
optional_depends = 3d_armor,player_monoids
|
||||
description = Adds stamina and hunger effects.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 81 B |
Loading…
Reference in New Issue
Block a user