Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
puppetmaster
Minetest
Commits
e83d8cc1
Commit
e83d8cc1
authored
Feb 17, 2022
by
puppetmaster
Browse files
add timer mod
parent
dc291218
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
atrapa/mods/timer/depends.txt
atrapa/mods/timer/depends.txt
+2
-0
atrapa/mods/timer/init.lua
atrapa/mods/timer/init.lua
+22
-0
atrapa/mods/timer/mod.conf
atrapa/mods/timer/mod.conf
+1
-0
No files found.
atrapa/mods/timer/depends.txt
0 → 100644
View file @
e83d8cc1
mobs
default
atrapa/mods/timer/init.lua
0 → 100644
View file @
e83d8cc1
cuentaAtras
=
100
minetest
.
register_on_joinplayer
(
function
(
player
)
local
my_hub3
=
player
:
hud_add
({
hud_elem_type
=
"text"
,
position
=
{
x
=
0
.
5
,
y
=
0
.
5
},
offset
=
{
x
=
-
120
,
y
=
-
25
},
text
=
"Tiempo "
..
cuentaAtras
,
alignment
=
{
x
=
0
,
y
=
0
},
-- center aligned
scale
=
{
x
=
100
,
y
=
100
},
-- covered later
number
=
0xFF0000
,
})
function
change_hud
()
if
cuentaAtras
>
0
then
cuentaAtras
=
cuentaAtras
-
1
player
:
hud_change
(
my_hub3
,
"text"
,
"Tiempo "
..
cuentaAtras
)
end
minetest
.
after
(
5
,
change_hud
)
end
minetest
.
after
(
5
,
change_hud
)
end
)
atrapa/mods/timer/mod.conf
0 → 100644
View file @
e83d8cc1
name
=
timer
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment