Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hudbars
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
hudbars
Commits
89fba7a8
Commit
89fba7a8
authored
8 years ago
by
TenPlus1
Browse files
Options
Downloads
Patches
Plain Diff
checks
parent
5b28ce44
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hbhunger/hunger.lua
+6
-2
6 additions, 2 deletions
hbhunger/hunger.lua
hudbars/init.lua
+8
-7
8 additions, 7 deletions
hudbars/init.lua
with
14 additions
and
9 deletions
hbhunger/hunger.lua
+
6
−
2
View file @
89fba7a8
...
...
@@ -399,6 +399,7 @@ if minetest.get_modpath("xanadu") then
overwrite
(
"xanadu:iced_coffee"
,
3
,
"vessels:drinking_glass"
)
overwrite
(
"xanadu:pizza_slice"
,
3
)
overwrite
(
"xanadu:cupcake"
,
4
)
overwrite
(
"xanadu:cupcake_chocolate"
,
4
)
overwrite
(
"xanadu:juice_apple"
,
4
,
"vessels:drinking_glass"
)
overwrite
(
"xanadu:juice_coconut"
,
4
,
"vessels:drinking_glass"
)
overwrite
(
"xanadu:juice_orange"
,
4
,
"vessels:drinking_glass"
)
...
...
@@ -409,7 +410,10 @@ if minetest.get_modpath("xanadu") then
overwrite
(
"xanadu:bacon"
,
4
)
overwrite
(
"xanadu:burger"
,
7
)
overwrite
(
"xanadu:fries"
,
6
)
overwrite
(
"xanadu:glass_wine"
,
2
)
overwrite
(
"wine:glass_wine"
,
2
)
overwrite
(
"wine:glass_beer"
,
2
)
overwrite
(
"wine:glass_mead"
,
2
)
overwrite
(
"wine:glass_cider"
,
2
)
overwrite
(
"xanadu:potato_salad"
,
8
,
"ethereal:bowl"
,
nil
,
2
)
overwrite
(
"xanadu:gingerbread_man"
,
2
)
overwrite
(
"xanadu:taco"
,
4
)
...
...
@@ -446,5 +450,5 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
hbhunger
.
exhaustion
[
name
]
=
exhaus
end
minetest
.
register_on_placenode
(
hbhunger
.
handle_node_actions
)
--
minetest.register_on_placenode(hbhunger.handle_node_actions)
minetest
.
register_on_dignode
(
hbhunger
.
handle_node_actions
)
This diff is collapsed.
Click to expand it.
hudbars/init.lua
+
8
−
7
View file @
89fba7a8
...
...
@@ -28,9 +28,9 @@ function hb.load_setting(sname, stype, defaultval, valid_values)
end
end
if
not
valid
then
minetest
.
log
(
"error"
,
"[hudbars] Invalid value for "
..
sname
..
"! Using default value ("
..
tostring
(
defaultval
)
..
")."
)
--
minetest.log("error", "[hudbars] Invalid value for "
--
..sname.."! Using default value ("
--
..tostring(defaultval)..").")
return
defaultval
else
return
sval
...
...
@@ -294,7 +294,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
local
main_error_text
=
"[hudbars] Bad initial values of HUD bar identifier “"
..
tostring
(
identifier
)
..
"” for player "
..
name
..
". "
--[[
if start_max < start_value then
minetest.log("error", main_error_text.."start_max ("
..start_max..") is smaller than start_value ("..start_value..")!")
...
...
@@ -307,7 +307,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
minetest.log("error", main_error_text.."start_value ("
..start_value..") is smaller than 0!")
end
]]
hb
.
hudtables
[
identifier
].
hudids
[
name
]
=
ids
hb
.
hudtables
[
identifier
].
hudstate
[
name
]
=
state
end
...
...
@@ -348,7 +348,7 @@ end
-- ADDED THIS TOO
if
not
hudtable
.
hudstate
[
name
]
then
print
(
"line 350 hudtab
k
e.hudstate[
name]
nil"
)
print
(
"
Warning: [hudbars init.lua]
line 350 hudtab
l
e.hudstate[
"
..
name
..
"] is
nil"
)
return
end
...
...
@@ -372,6 +372,7 @@ end
local
main_error_text
=
"[hudbars] Bad call to hb.change_hudbar, identifier: “"
..
tostring
(
identifier
)
..
"”, player name: “"
..
name
..
"”. "
--[[
if new_max_value < new_value then
minetest.log("error", main_error_text.."new_max_value ("
..new_max_value..") is smaller than new_value ("..new_value..")!")
...
...
@@ -384,7 +385,7 @@ end
minetest.log("error", main_error_text.."new_value ("
..new_value..") is smaller than 0!")
end
]]
if
hudtable
.
hudstate
[
name
].
hidden
==
false
then
if
max_changed
and
hb
.
settings
.
bar_type
==
"progress_bar"
then
if
hudtable
.
hudstate
[
name
].
max
==
0
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment