Page 1 of 1

Coloured Beds

Posted: Mon Apr 01, 2013 05:33
by thefamilygrog66
I was playing around with PilzAdam's beds mod last night/this evening, and have changed a few things in it:

1) prevented bed tops (i.e. pillow end) from destroying other nodes when the bed is placed - I think this is important, since it prevents not only accidental destruction, but also griefer destruction of locked chests, steel doors, etc.

2) changed the overall look of the bed, and added a 3D pillow

3) looped most of the code to create nine different coloured beds (roygbv + black, grey and white)

The recipe has changed to:
coloured wool coloured wool white wool
stick stick
Download: https://github.com/thefamilygrog66/beds ... master.zip
GitHub: https://github.com/thefamilygrog66/beds

Here's a screenshot:

Image

PilzAdam has now merged this into his beds mod.

Posted: Mon Apr 01, 2013 05:48
by kaeza
This is nice!
Please post download link :D

Posted: Mon Apr 01, 2013 05:55
by thefamilygrog66
kaeza wrote:This is nice!
Please post download link :D
Thanks! I put a link in the first post.

Posted: Mon Apr 01, 2013 11:14
by PilzAdam
Are you familiar with git/github? Id like to see this merged into my beds mod.

Posted: Mon Apr 01, 2013 15:28
by thefamilygrog66
PilzAdam wrote:Are you familiar with git/github? Id like to see this merged into my beds mod.
Hey PilzAdam: that would be great. I'm familiar with github, though I've never merged code on it before. The only problem I can see is that I've removed the default bed (i.e. there are only the beds defined by their colour), so if someone already has your bed mod installed, there will be a number of unknown nodes after updating. Let me know what you think, and also if you have any info on how to merge what I've done into your mod - thanks!

Edit: the unknown node issue can be solved using aliases:

minetest.register_alias("beds:bed_bottom", "colouredbeds:bed_bottom_blue")
minetest.register_alias("beds:bed_top", "colouredbeds:bed_top_blue")

Posted: Mon Apr 01, 2013 15:33
by Likwid H-Craft
No Black bed?

Posted: Mon Apr 01, 2013 15:50
by thefamilygrog66
Likwid H-Craft wrote:No Black bed?
I've now added black, grey and white.

Posted: Mon Apr 01, 2013 15:53
by PilzAdam
thefamilygrog66 wrote:
PilzAdam wrote:Are you familiar with git/github? Id like to see this merged into my beds mod.
Hey PilzAdam: that would be great. I'm familiar with github, though I've never merged code on it before. The only problem I can see is that I've removed the default bed (i.e. there are only the beds defined by their colour), so if someone already has your bed mod installed, there will be a number of unknown nodes after updating. Let me know what you think, and also if you have any info on how to merge what I've done into your mod - thanks!
You basically have to fork my beds repo on github (https://github.com/PilzAdam/beds), then set up a local repo on your computer and do the changes there. Then you can push to your fork on github and create a pull request against my repo.
And for the old beds, just add

Code: Select all

minetest.register_alias("beds:bed_bottom", "beds:bed_bottom_blue")
minetest.register_alias("beds:bed_top", "beds:bed_top_blue")
minetest.register_alias("beds:bed", "beds:bed_bottom_blue")
(and change the mod prefix to "beds:" in your code).

Posted: Mon Apr 01, 2013 16:02
by thefamilygrog66
PilzAdam wrote:You basically have to fork my beds repo on github (https://github.com/PilzAdam/beds), then set up a local repo on your computer and do the changes there. Then you can push to your fork on github and create a pull request against my repo.
And for the old beds, just add

Code: Select all

minetest.register_alias("beds:bed_bottom", "beds:bed_bottom_blue")
minetest.register_alias("beds:bed_top", "beds:bed_top_blue")
minetest.register_alias("beds:bed", "beds:bed_bottom_blue")
(and change the mod prefix to "beds:" in your code).

Ah, you beat me to it with the old beds solution. :)

I've pushed to my fork on github, and created a pull request - let me know if I need to do anything else.

Posted: Tue Apr 02, 2013 16:57
by PilzAdam
Merged.