Initial commit.

This commit is contained in:
David G 2020-01-30 09:51:25 -07:00
commit 59a9249db1
9 changed files with 124 additions and 0 deletions

48
README.md Normal file

@ -0,0 +1,48 @@
Sleeping Mat [sleeping_mat]
-------------------------
A simple sleeping mat made out of grass.
By David G (kestral246)
![Sleeping Mat Screenshot](screenshot.png "sleeping_mat")
I was getting tired of having to go through the process of getting wool to make a bed, so I made a simpler to craft sleeping mat.
Note that sleeping on this mat will overwrite an existing bed respawn point, which will then get reset after destroying—i.e. picking up the sleeping mat (as of Jan 26, 2020 commit to mtg).
How to craft
------------
For crafting this sleeping mat, three grass nodes are required from three different types of grass—nine total grass nodes using any order (shapeless recipes).
Supported types are: grass, dry\_grass, jungle\_grass, and marram\_grass).
This means that players have to travel to several different biomes before they can build a sleeping mat.
Prior art
---------
After making this mod I discovered two alternatives.
- Napiophelios's campfire mod includes a sleeping mat (really a sleeping bag), but it requires wool—just what I was trying to avoid.
- Duane's fun_tools mod includes a nest, but it's too easy to make—just four leaves or needles of the same type.
Licenses
--------
Source code
> The MIT License (MIT)
Media (textures)
> Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

73
init.lua Normal file

@ -0,0 +1,73 @@
-- Sleeping Mat
-- by David G (kestral246@gmail.com)
-- 2020-01-29
beds.register_bed("sleeping_mat:mat", {
description = ("Grass Sleeping Mat"),
inventory_image = "sleeping_mat_roll.png",
wield_image = "sleeping_mat_roll.png",
tiles = {
bottom = {
"sleeping_mat_top1.png",
"sleeping_mat_top1_side.png",
},
top = {
"sleeping_mat_top2.png",
"sleeping_mat_top2_side.png",
},
},
nodebox = {
bottom = {
{-1/2, -1/2, -1/2, 1/2, -7/16, 1/2}
},
top = {
{-1/2, -1/2, -1/2, 1/2, -7/16, 1/2}
},
},
selectionbox = {-1/2, -1/2, -1/2, 1/2, -7/16, 3/2},
recipe = { -- dummy recipe, subset of first shapeless recipe below
{"group:grass", "group:dry_grass", "default:junglegrass"},
{"group:grass", "group:dry_grass", "default:junglegrass"},
{"group:grass", "group:dry_grass", "default:junglegrass"},
},
})
minetest.register_craft({ -- without marram_grass
output = "sleeping_mat:mat",
type = "shapeless",
recipe = {
"group:grass", "group:grass", "group:grass",
"group:dry_grass", "group:dry_grass", "group:dry_grass",
"default:junglegrass", "default:junglegrass", "default:junglegrass"
},
})
minetest.register_craft({ -- without junglegrass
output = "sleeping_mat:mat",
type = "shapeless",
recipe = {
"group:grass", "group:grass", "group:grass",
"group:dry_grass", "group:dry_grass", "group:dry_grass",
"default:marram_grass_1", "default:marram_grass_1", "default:marram_grass_1"
},
})
minetest.register_craft({ -- without dry_grass
output = "sleeping_mat:mat",
type = "shapeless",
recipe = {
"group:grass", "group:grass", "group:grass",
"default:junglegrass", "default:junglegrass", "default:junglegrass",
"default:marram_grass_1", "default:marram_grass_1", "default:marram_grass_1"
},
})
minetest.register_craft({ -- without grass
output = "sleeping_mat:mat",
type = "shapeless",
recipe = {
"group:dry_grass", "group:dry_grass", "group:dry_grass",
"default:junglegrass", "default:junglegrass", "default:junglegrass",
"default:marram_grass_1", "default:marram_grass_1", "default:marram_grass_1"
},
})

3
mod.conf Normal file

@ -0,0 +1,3 @@
name = sleeping_mat
description = Simple sleeping mat made out of grass.
depends = default, beds

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB