Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
illuna
Commits
a244239a
Commit
a244239a
authored
7 years ago
by
Milan
Browse files
Options
Downloads
Patches
Plain Diff
override wiki:wiki node
parent
db86b410
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
depends.txt
+1
-0
1 addition, 0 deletions
depends.txt
nodes.lua
+57
-0
57 additions, 0 deletions
nodes.lua
with
58 additions
and
0 deletions
depends.txt
+
1
−
0
View file @
a244239a
...
...
@@ -13,3 +13,4 @@ mobs_animal ?
mobs_better_rat ?
mobs_slimes ?
mobs_sandworm ?
wiki
This diff is collapsed.
Click to expand it.
nodes.lua
+
57
−
0
View file @
a244239a
-- TODO: refactor / cleanup
--
function
illuna
.
wikiconstruct
(
pos
)
local
meta
=
minetest
.
get_meta
(
pos
)
minetest
.
add_entity
({
x
=
pos
.
x
,
y
=
pos
.
y
+
0
.
96
,
z
=
pos
.
z
},
"illuna:wikitop"
)
local
timer
=
minetest
.
get_node_timer
(
pos
)
timer
:
start
(
5
.
0
)
end
function
illuna
.
wikidestruct
(
pos
)
for
_
,
obj
in
pairs
(
minetest
.
get_objects_inside_radius
(
pos
,
0
.
9
))
do
if
obj
and
obj
:
get_luaentity
()
and
obj
:
get_luaentity
().
name
==
"illuna:wikitop"
then
obj
:
remove
()
break
end
end
end
minetest
.
override_item
(
"wiki:wiki"
,
{
tiles
=
{
"illuna_wiki_top.png"
,
"illuna_wiki_bottom.png"
,
"illuna_wiki_side.png"
,
"illuna_wiki_side.png"
,
"illuna_wiki_side.png"
,
"illuna_wiki_side.png"
,
},
on_construct
=
illuna
.
wikiconstruct
,
on_destruct
=
illuna
.
wikidestruct
})
minetest
.
register_entity
(
"illuna:wikitop"
,
{
visual
=
"wielditem"
,
visual_size
=
{
x
=
0
.
4
,
y
=
0
.
4
},
collisionbox
=
{
0
},
physical
=
false
,
automatic_rotate
=
math.pi
*
0
.
15
,
nametag
=
"Illuna Wiki"
,
nametag_color
=
"#6893c4"
,
textures
=
{
"illuna:wikitop"
},
on_activate
=
function
(
self
)
local
pos
=
self
.
object
:
getpos
()
local
pos_under
=
{
x
=
pos
.
x
,
y
=
pos
.
y
-
1
,
z
=
pos
.
z
}
if
minetest
.
get_node
(
pos_under
).
name
~=
"wiki:wiki"
then
self
.
object
:
remove
()
end
end
})
--
--
minetest
.
register_craftitem
(
"illuna:wikitop"
,
{
inventory_image
=
"illuna_wikitop.png"
,
})
minetest
.
register_node
(
"illuna:desert_gravel"
,
{
description
=
"Gravel"
,
tiles
=
{
"illuna_desertgravel.png"
},
...
...
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