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
2a6050e5
Commit
2a6050e5
authored
10 years ago
by
BlockMen
Browse files
Options
Downloads
Patches
Plain Diff
Add option to disable bed respawn, better recipe for fancy bed
parent
e604d8d7
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
mods/beds/README.txt
+2
-18
2 additions, 18 deletions
mods/beds/README.txt
mods/beds/beds.lua
+2
-1
2 additions, 1 deletion
mods/beds/beds.lua
mods/beds/functions.lua
+5
-0
5 additions, 0 deletions
mods/beds/functions.lua
with
9 additions
and
19 deletions
mods/beds/README.txt
+
2
−
18
View file @
2a6050e5
...
@@ -12,32 +12,16 @@ players are in bed too. If all players are sleeping the night gets skipped aswel
...
@@ -12,32 +12,16 @@ players are in bed too. If all players are sleeping the night gets skipped aswel
if more than 50% of the players are lying in bed and use this option.
if more than 50% of the players are lying in bed and use this option.
Another feature is a controled respawning. If you have slept in bed (not just lying in it) your respawn point
Another feature is a controled respawning. If you have slept in bed (not just lying in it) your respawn point
is set to the beds location. If dying you will respawn there.
is set to the beds location and you will respawn there after death.
You can disable the respawn at beds by setting "enable_bed_respawn = false" in minetest.conf
You can craft two types of beds:
Simple shaped bed:
wool wool wool
wood wood wood
Fancy shaped bed:
wool wool stick
wood wood wood
Notice: You can use any color of wood or wool, mixing different is also possible.
License of source code, textures: WTFPL
License of source code, textures: WTFPL
---------------------------------------
---------------------------------------
(c) Copyright BlockMen (2014-2015)
(c) Copyright BlockMen (2014-2015)
This program is free software. It comes without any warranty, to
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
and/or modify it under the terms of the Do What The Fuck You Want
...
...
This diff is collapsed.
Click to expand it.
mods/beds/beds.lua
+
2
−
1
View file @
2a6050e5
...
@@ -42,7 +42,8 @@ beds.register_bed("beds:fancy_bed", {
...
@@ -42,7 +42,8 @@ beds.register_bed("beds:fancy_bed", {
},
},
selectionbox
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
0
.
06
,
1
.
5
},
selectionbox
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
0
.
06
,
1
.
5
},
recipe
=
{
recipe
=
{
{
"wool:red"
,
"wool:white"
,
"group:stick"
},
{
""
,
""
,
"group:stick"
},
{
"wool:red"
,
"wool:red"
,
"wool:white"
},
{
"group:wood"
,
"group:wood"
,
"group:wood"
},
{
"group:wood"
,
"group:wood"
,
"group:wood"
},
},
},
})
})
...
...
This diff is collapsed.
Click to expand it.
mods/beds/functions.lua
+
5
−
0
View file @
2a6050e5
local
player_in_bed
=
0
local
player_in_bed
=
0
local
is_sp
=
minetest
.
is_singleplayer
()
local
is_sp
=
minetest
.
is_singleplayer
()
local
enable_respawn
=
minetest
.
setting_getbool
(
"enable_bed_respawn"
)
or
true
-- helper functions
-- helper functions
...
@@ -166,7 +167,11 @@ minetest.register_on_joinplayer(function(player)
...
@@ -166,7 +167,11 @@ minetest.register_on_joinplayer(function(player)
beds
.
read_spawns
()
beds
.
read_spawns
()
end
)
end
)
-- respawn player at bed if enabled and valid position is found
minetest
.
register_on_respawnplayer
(
function
(
player
)
minetest
.
register_on_respawnplayer
(
function
(
player
)
if
not
enable_respawn
then
return
false
end
local
name
=
player
:
get_player_name
()
local
name
=
player
:
get_player_name
()
local
pos
=
beds
.
spawn
[
name
]
or
nil
local
pos
=
beds
.
spawn
[
name
]
or
nil
if
pos
then
if
pos
then
...
...
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