Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
teleport_potion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
teleport_potion
Commits
b50b700e
Commit
b50b700e
authored
8 years ago
by
TenPlus1
Browse files
Options
Downloads
Patches
Plain Diff
Added pad facing direction after use
parent
475360b8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-0
1 addition, 0 deletions
README.md
init.lua
+29
-9
29 additions, 9 deletions
init.lua
textures/padd.png
+0
-0
0 additions, 0 deletions
textures/padd.png
with
30 additions
and
9 deletions
README.md
+
1
−
0
View file @
b50b700e
...
@@ -7,6 +7,7 @@ https://forum.minetest.net/viewtopic.php?f=9&t=9234
...
@@ -7,6 +7,7 @@ https://forum.minetest.net/viewtopic.php?f=9&t=9234
Change log:
Change log:
-
0.8 - Teleport pads now have arrows showing direction player will face after use
-
0.7 - Can now enter descriptions for teleport pads e.g. (0,12,0,Home)
-
0.7 - Can now enter descriptions for teleport pads e.g. (0,12,0,Home)
-
0.6 - Tweaked and tidied code, added map_generation_limit's
-
0.6 - Tweaked and tidied code, added map_generation_limit's
-
0.5 - Added throwable potions
-
0.5 - Added throwable potions
...
...
This diff is collapsed.
Click to expand it.
init.lua
+
29
−
9
View file @
b50b700e
--= Teleport Potion mod 0.
7
by TenPlus1
--= Teleport Potion mod 0.
8
by TenPlus1
-- Create teleport potion or pad, place then right-click to enter coords
-- Create teleport potion or pad, place then right-click to enter coords
-- and step onto pad or walk into the blue portal light, portal closes after
-- and step onto pad or walk into the blue portal light, portal closes after
...
@@ -206,10 +206,10 @@ minetest.register_craft({
...
@@ -206,10 +206,10 @@ minetest.register_craft({
-- teleport pad
-- teleport pad
minetest
.
register_node
(
"teleport_potion:pad"
,
{
minetest
.
register_node
(
"teleport_potion:pad"
,
{
tiles
=
{
"padd.png"
},
tiles
=
{
"padd.png"
,
"padd.png^[transformFY"
},
drawtype
=
'
nodebox
'
,
drawtype
=
"
nodebox
"
,
paramtype
=
"light"
,
paramtype
=
"light"
,
paramtype2
=
"
wallmounted
"
,
paramtype2
=
"
facedir
"
,
legacy_wallmounted
=
true
,
legacy_wallmounted
=
true
,
walkable
=
true
,
walkable
=
true
,
sunlight_propagates
=
true
,
sunlight_propagates
=
true
,
...
@@ -219,12 +219,13 @@ minetest.register_node("teleport_potion:pad", {
...
@@ -219,12 +219,13 @@ minetest.register_node("teleport_potion:pad", {
light_source
=
5
,
light_source
=
5
,
groups
=
{
snappy
=
3
},
groups
=
{
snappy
=
3
},
node_box
=
{
node_box
=
{
type
=
"wallmounted"
,
type
=
"fixed"
,
wall_top
=
{
-
0
.
5
,
0
.
4375
,
-
0
.
5
,
0
.
5
,
0
.
5
,
0
.
5
},
fixed
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
-
6
/
16
,
0
.
5
}
wall_bottom
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
-
0
.
4375
,
0
.
5
},
},
wall_side
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
-
0
.
4375
,
0
.
5
,
0
.
5
},
selection_box
=
{
type
=
"fixed"
,
fixed
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
-
6
/
16
,
0
.
5
}
},
},
selection_box
=
{
type
=
"wallmounted"
},
on_construct
=
function
(
pos
)
on_construct
=
function
(
pos
)
...
@@ -343,6 +344,25 @@ minetest.register_abm({
...
@@ -343,6 +344,25 @@ minetest.register_abm({
gain
=
1
.
0
,
gain
=
1
.
0
,
max_hear_distance
=
5
max_hear_distance
=
5
})
})
-- rotate player to look in pad placement direction
if
objs
[
n
]:
is_player
()
then
local
rot
=
node
.
param2
local
yaw
=
0
if
rot
==
0
or
rot
==
20
then
yaw
=
0
-- north
elseif
rot
==
2
or
rot
==
22
then
yaw
=
3
.
14
-- south
elseif
rot
==
1
or
rot
==
23
then
yaw
=
4
.
71
-- west
elseif
rot
==
3
or
rot
==
21
then
yaw
=
1
.
57
-- east
end
objs
[
n
]:
set_look_yaw
(
yaw
)
end
end
end
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
textures/padd.png
+
0
−
0
View replaced file @
475360b8
View file @
b50b700e
225 B
|
W:
|
H:
201 B
|
W:
|
H:
2-up
Swipe
Onion skin
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