Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory_plus
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
inventory_plus
Commits
cffddd1e
Commit
cffddd1e
authored
12 years ago
by
Brett O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
added support for workbenches (2x2 craft grid)
parent
ee7c6382
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_plus/init.lua
+12
-1
12 additions, 1 deletion
inventory_plus/init.lua
with
12 additions
and
1 deletion
inventory_plus/init.lua
+
12
−
1
View file @
cffddd1e
...
...
@@ -47,8 +47,12 @@ inventory_plus.get_formspec = function(player,page)
if
page
==
"craft"
then
formspec
=
formspec
..
"button[0,0;2,0.5;main;Back]"
..
"list[current_player;craft;3,0;3,3;]"
..
"list[current_player;craftpreview;7,1;1,1;]"
if
minetest
.
setting_getbool
(
"inventory_craft_small"
)
then
formspec
=
formspec
..
"list[current_player;craft;3,0;2,2;]"
else
formspec
=
formspec
..
"list[current_player;craft;3,0;3,3;]"
end
end
-- creative page
...
...
@@ -111,6 +115,13 @@ inventory_plus.refill:set_size("main", 1)
-- register_on_joinplayer
minetest
.
register_on_joinplayer
(
function
(
player
)
if
minetest
.
setting_getbool
(
"inventory_craft_small"
)
then
player
:
get_inventory
():
set_width
(
"craft"
,
2
)
player
:
get_inventory
():
set_size
(
"craft"
,
2
*
2
)
else
player
:
get_inventory
():
set_width
(
"craft"
,
3
)
player
:
get_inventory
():
set_size
(
"craft"
,
3
*
3
)
end
inventory_plus
.
register_button
(
player
,
"craft"
,
"Craft"
)
if
minetest
.
setting_getbool
(
"creative_mode"
)
then
inventory_plus
.
register_button
(
player
,
"creative_prev"
,
"Creative"
)
...
...
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