Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
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
minetest_game
Commits
07dcae72
Commit
07dcae72
authored
10 years ago
by
Craig Davison
Committed by
Novatux
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add fancy inventory for bones
parent
d546a5a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/bones/init.lua
+13
-3
13 additions, 3 deletions
mods/bones/init.lua
with
13 additions
and
3 deletions
mods/bones/init.lua
+
13
−
3
View file @
07dcae72
-- Minetest 0.4 mod: bones
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
-- See README.txt for licensing and other information.
bones
=
{}
local
function
is_owner
(
pos
,
name
)
local
function
is_owner
(
pos
,
name
)
local
owner
=
minetest
.
get_meta
(
pos
):
get_string
(
"owner"
)
local
owner
=
minetest
.
get_meta
(
pos
):
get_string
(
"owner"
)
if
owner
==
""
or
owner
==
name
then
if
owner
==
""
or
owner
==
name
then
...
@@ -9,6 +11,16 @@ local function is_owner(pos, name)
...
@@ -9,6 +11,16 @@ local function is_owner(pos, name)
return
false
return
false
end
end
bones
.
bones_formspec
=
"size[8,9]"
..
default
.
gui_bg
..
default
.
gui_bg_img
..
default
.
gui_slots
..
"list[current_name;main;0,0.3;8,4;]"
..
"list[current_player;main;0,4.85;8,1;]"
..
"list[current_player;main;0,6.08;8,3;8]"
..
default
.
get_hotbar_bg
(
0
,
4
.
85
)
minetest
.
register_node
(
"bones:bones"
,
{
minetest
.
register_node
(
"bones:bones"
,
{
description
=
"Bones"
,
description
=
"Bones"
,
tiles
=
{
tiles
=
{
...
@@ -158,9 +170,7 @@ minetest.register_on_dieplayer(function(player)
...
@@ -158,9 +170,7 @@ minetest.register_on_dieplayer(function(player)
player_inv
:
set_list
(
"main"
,
{})
player_inv
:
set_list
(
"main"
,
{})
player_inv
:
set_list
(
"craft"
,
{})
player_inv
:
set_list
(
"craft"
,
{})
meta
:
set_string
(
"formspec"
,
"size[8,9;]"
..
meta
:
set_string
(
"formspec"
,
bones
.
bones_formspec
)
"list[current_name;main;0,0;8,4;]"
..
"list[current_player;main;0,5;8,4;]"
)
meta
:
set_string
(
"infotext"
,
player_name
..
"'s fresh bones"
)
meta
:
set_string
(
"infotext"
,
player_name
..
"'s fresh bones"
)
meta
:
set_string
(
"owner"
,
player_name
)
meta
:
set_string
(
"owner"
,
player_name
)
meta
:
set_int
(
"time"
,
0
)
meta
:
set_int
(
"time"
,
0
)
...
...
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