Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xdecor
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
xdecor
Commits
77821b23
Commit
77821b23
authored
9 years ago
by
kilbith
Browse files
Options
Downloads
Patches
Plain Diff
Work Table : use pixel nodeboxes
parent
8c59b1bf
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
handlers/nodeboxes.lua
+16
-0
16 additions, 0 deletions
handlers/nodeboxes.lua
worktable.lua
+22
-14
22 additions, 14 deletions
worktable.lua
with
38 additions
and
14 deletions
handlers/nodeboxes.lua
+
16
−
0
View file @
77821b23
...
...
@@ -18,6 +18,22 @@ xdecor.nodebox = {
null
=
{
type
=
"fixed"
,
fixed
=
{
0
,
0
,
0
,
0
,
0
,
0
}
}
}
xdecor
.
pixelnodebox
=
function
(
size
,
boxes
)
local
fixed
=
{}
for
_
,
box
in
pairs
(
boxes
)
do
local
x
,
y
,
z
,
w
,
h
,
l
=
unpack
(
box
)
fixed
[
#
fixed
+
1
]
=
{
(
x
/
size
)
-
0
.
5
,
(
y
/
size
)
-
0
.
5
,
(
z
/
size
)
-
0
.
5
,
(
w
/
size
)
-
0
.
5
,
(
h
/
size
)
-
0
.
5
,
(
l
/
size
)
-
0
.
5
}
end
return
{
type
=
"fixed"
,
fixed
=
fixed
}
end
local
mt
=
{}
mt
.
__index
=
function
(
table
,
key
)
local
ref
=
xdecor
.
box
[
key
]
...
...
This diff is collapsed.
Click to expand it.
worktable.lua
+
22
−
14
View file @
77821b23
...
...
@@ -26,19 +26,27 @@ local nodes = { -- Nodes allowed to be cut. Registration format: [mod name] = [[
]]
,
}
local
defs
=
{
-- Nodebox name, yield, definition.
{
"nanoslab"
,
16
,
{
-
.
5
,
-
.
5
,
-
.
5
,
0
,
-
.
4375
,
0
}},
{
"micropanel"
,
16
,
{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
-
.
4375
,
0
}},
{
"microslab"
,
8
,
{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
-
.
4375
,.
5
}},
{
"thinstair"
,
8
,
{{
-
.
5
,
-
.
0625
,
-
.
5
,.
5
,
0
,
0
},{
-
.
5
,.
4375
,
0
,.
5
,.
5
,.
5
}}},
{
"cube"
,
4
,
{
-
.
5
,
-
.
5
,
0
,
0
,
0
,.
5
}},
{
"panel"
,
4
,
{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,
0
}},
{
"slab"
,
2
,
{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,.
5
}},
{
"doublepanel"
,
2
,
{{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,
0
},{
-
.
5
,
0
,
0
,.
5
,.
5
,.
5
}}},
{
"halfstair"
,
2
,
{{
-
.
5
,
-
.
5
,
-
.
5
,
0
,
0
,.
5
},{
-
.
5
,
0
,
0
,
0
,.
5
,.
5
}}},
{
"outerstair"
,
1
,
{{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,.
5
},{
-
.
5
,
0
,
0
,
0
,.
5
,.
5
}}},
{
"stair"
,
1
,
{{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,.
5
},{
-
.
5
,
0
,
0
,.
5
,.
5
,.
5
}}},
{
"innerstair"
,
1
,
{{
-
.
5
,
-
.
5
,
-
.
5
,.
5
,
0
,.
5
},{
-
.
5
,
0
,
0
,.
5
,.
5
,.
5
},{
-
.
5
,
0
,
-
.
5
,
0
,.
5
,
0
}}}
local
defs
=
{
-- Name Yield X Y Z W H L
{
"nanoslab"
,
16
,
{{
0
,
0
,
0
,
8
,
1
,
8
}}},
{
"micropanel"
,
16
,
{{
0
,
0
,
0
,
16
,
1
,
8
}}},
{
"microslab"
,
8
,
{{
0
,
0
,
0
,
16
,
1
,
16
}}},
{
"thinstair"
,
8
,
{{
0
,
7
,
0
,
16
,
8
,
8
},{
0
,
15
,
8
,
16
,
16
,
16
}}},
{
"cube"
,
4
,
{{
0
,
0
,
8
,
8
,
8
,
16
}}},
{
"panel"
,
4
,
{{
0
,
0
,
0
,
16
,
8
,
8
}}},
{
"slab"
,
2
,
{{
0
,
0
,
0
,
16
,
8
,
16
}}},
{
"doublepanel"
,
2
,
{{
0
,
0
,
0
,
16
,
8
,
8
},{
0
,
8
,
8
,
16
,
16
,
16
}}},
{
"halfstair"
,
2
,
{{
0
,
0
,
0
,
8
,
8
,
16
},{
0
,
8
,
8
,
8
,
16
,
16
}}},
{
"outerstair"
,
1
,
{{
0
,
0
,
0
,
16
,
8
,
16
},{
0
,
8
,
8
,
8
,
16
,
16
}}},
{
"stair"
,
1
,
{{
0
,
0
,
0
,
16
,
8
,
16
},{
0
,
8
,
8
,
16
,
16
,
16
}}},
{
"innerstair"
,
1
,
{{
0
,
0
,
0
,
16
,
8
,
16
},{
0
,
8
,
8
,
16
,
16
,
16
},{
0
,
8
,
0
,
8
,
16
,
8
}}}
}
function
worktable
.
get_recipe
(
item
)
...
...
@@ -415,7 +423,7 @@ for name in n:gmatch("[%w_]+") do
sounds
=
ndef
.
sounds
,
tiles
=
tiles
,
groups
=
groups
,
node_box
=
{
type
=
"fixed"
,
fixed
=
d
[
3
]
}
,
node_box
=
xdecor
.
pixelnodebox
(
16
,
d
[
3
]
)
,
sunlight_propagates
=
true
,
on_place
=
minetest
.
rotate_node
})
...
...
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