[Mod] Beds [beds]

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Merged this: http://forum.minetest.net/viewtopic.php?id=5374
See first post for details.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Could you have the beds check for Twp or more players. If there are more than one then every player must be in a bed to change the time. Also we should move to the bed and stay in it for around 3 seconds
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

PilzAdam: I see that you've added a couple of lines (62 and 63) to remove the bottom of the bed if the player tries to place it too close to an object. The only problem with this is that the player loses the bed. Is it possible to have the bed added to the player's inventory when this happens?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

thefamilygrog66 wrote:PilzAdam: I see that you've added a couple of lines (62 and 63) to remove the bottom of the bed if the player tries to place it too close to an object. The only problem with this is that the player loses the bed. Is it possible to have the bed added to the player's inventory when this happens?
Fixed, thanks for reporting.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Update!
The player now really lays in the bed now and cant move away. You have to rightclick to get up.
Note: this requires latest dev version of Minetest, so dont update if you run 0.4.6 stable. It should work for everyone if 0.4.7 comes out.
Last edited by PilzAdam on Tue Apr 23, 2013 12:17, edited 1 time in total.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

Cool! :)

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

PilzAdam wrote:Update!
The player now really lays in the bed now and cant move away. You have to rightclick to get up.
Note: this requires latest dev version of Minetest, so dont update if you run 0.4.6 stable. It should work for everyone if 0.4.7 comes out.
Umm...really lays? I would like to quote you:
PilzAdam wrote:... is fake (you just change the pitch of the camera, if people move the camera they will notice that they still stand inside the bed).
(http://forum.minetest.net/viewtopic.php ... 955#p83955) :P

But nice to use set_physics_override() to stop moving.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

BlockMen wrote:
PilzAdam wrote:Update!
The player now really lays in the bed now and cant move away. You have to rightclick to get up.
Note: this requires latest dev version of Minetest, so dont update if you run 0.4.6 stable. It should work for everyone if 0.4.7 comes out.
Umm...really lays? I would like to quote you:
PilzAdam wrote:... is fake (you just change the pitch of the camera, if people move the camera they will notice that they still stand inside the bed).
(http://forum.minetest.net/viewtopic.php ... 955#p83955) :P

But nice to use set_physics_override() to stop moving.
Well, I really change the position of the camera and not just the pitch (in fact I dont change the pitch at all). I also disallow moving away, so it isnt real fake laying.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

How do you change the camera position?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Traxie21 wrote:How do you change the camera position?
Obviously with setpos().

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

PilzAdam wrote: Well, I really change the position of the camera and not just the pitch (in fact I dont change the pitch at all). I also disallow moving away, so it isnt real fake laying.
You change the position of the player (which sometimes falls down when using bed in second floor) So its also no real lying, its fake too, but maybe a better one. ;)

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Oh, I thought you actually set the camera position. As opposed to player position.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Traxie21 wrote:Oh, I thought you actually set the camera position. As opposed to player position.
Ehm.... I do set the camera position.
BlockMen wrote:
PilzAdam wrote: Well, I really change the position of the camera and not just the pitch (in fact I dont change the pitch at all). I also disallow moving away, so it isnt real fake laying.
You change the position of the player (which sometimes falls down when using bed in second floor) So its also no real lying, its fake too, but maybe a better one. ;)
I have no idea how the player can fall down when the gravity is set to 0. Maybe network latency :-/

kpo
Member
Posts: 38
Joined: Sun Mar 31, 2013 19:01

by kpo » Post

PilzAdam wrote:
Traxie21 wrote:Oh, I thought you actually set the camera position. As opposed to player position.
Ehm.... I do set the camera position.
BlockMen wrote:
PilzAdam wrote: Well, I really change the position of the camera and not just the pitch (in fact I dont change the pitch at all). I also disallow moving away, so it isnt real fake laying.
You change the position of the player (which sometimes falls down when using bed in second floor) So its also no real lying, its fake too, but maybe a better one. ;)
I have no idea how the player can fall down when the gravity is set to 0. Maybe network latency :-/
No it has nothing to do with network latency. I tried this placing a bed on the 2nd floor and I fell through the floor and then have to log out and in again to be able to move :-) Something is not quite right in the code. This is on latest git on local machine.
To me it really looks like the player is moved 1block or ½ a block down, then falls through the floor.

User avatar
onpon4
Member
Posts: 518
Joined: Thu Mar 21, 2013 01:54
GitHub: onpon4
In-game: diligentcircle
Contact:

by onpon4 » Post

Is there any way you could add a link to download the latest version that worked with 0.4.6 until 0.4.7 comes out? Would that be http://github.com/PilzAdam/beds/archive ... 1dbe9b.zip (4cf28c00dc)?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

onpon4 wrote:Is there any way you could add a link to download the latest version that worked with 0.4.6 until 0.4.7 comes out? Would that be http://github.com/PilzAdam/beds/archive ... 1dbe9b.zip (4cf28c00dc)?
Done.

CalumMc
Member
Posts: 58
Joined: Mon Dec 12, 2011 16:50
Location: England

by CalumMc » Post

I'm having some problems with this mod and I'm wondering if you could help. The first problem is that when lying in the bed, the camera is actually inside the bed itself. Also when leaving the bed, if there is a wall on the right hand side I get stuck in it. How can I have beds only accessible from the left? Thanks!

CrafterZ123
New member
Posts: 3
Joined: Sat Jun 29, 2013 12:47

by CrafterZ123 » Post

it does not work for me my minetest version is 0.4.7

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

CrafterZ123 wrote:it does not work for me my minetest version is 0.4.7
Try renaming the folder to 'beds'.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

mindbuster
New member
Posts: 5
Joined: Fri Jun 21, 2013 15:56

by mindbuster » Post

this mod work with 0.4.4 version? thank you

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

mindbuster wrote:this mod work with 0.4.4 version? thank you
Try it, but I dont think so.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

BUG: I slept in my bed a couple times. Now, whever the sun is about to set, even if I'm not in my bed, the time skips over the night and resets to morning. This is terrible!
Last edited by ak399g on Tue Aug 06, 2013 22:20, edited 1 time in total.
aka SAFR

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

ak399g wrote:BUG: I slept in my bed a couple times. Now, whever the sun is about to set, even if I'm not in my bed, the time skips over the night and resets to morning. This is terrible!
I had the same issue once.

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

ak399g wrote:BUG: I slept in my bed a couple times. Now, whever the sun is about to set, even if I'm not in my bed, the time skips over the night and resets to morning. This is terrible!
You can reset the beds if you go to the folder for your world (i.e. minetestpath\worlds\worldname\) and delete the file named:

beds_player_spawns

After that, you will spawn at spawn, as opposed to your bed, until you sleep in a bed at night time.

User avatar
Silent-Hunter
Member
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Post

kpo wrote:I tried this placing a bed on the 2nd floor and I fell through the floor and then have to log out and in again to be able to move :-) Something is not quite right in the code. This is on latest git on local machine. To me it really looks like the player is moved 1block or ½ a block down, then falls through the floor.
I have the same problem! I don't know LUA, but I might look over the code and see if I can fix it.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 18 guests