Skip to content

Commit

Permalink
Add everything
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rob committed Jan 7, 2018
1 parent 6de2d11 commit 723a9c9
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 0 deletions.
63 changes: 63 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
LICENSE FOR CODE:
=================


MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.




LICENSE FOR MEDIA:
==================


Licenses of media (textures, models and sounds)
-----------------------------------------------

Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.

ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.

No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.

Notices:

You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.

For more details:
http://creativecommons.org/licenses/by-sa/3.0/
1 change: 1 addition & 0 deletions depends.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
default
181 changes: 181 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
slats = {}

function slats.register_slat(subname, recipeitem, groups, image, description, sounds)
groups.slab = 1
minetest.register_node(":slats:slat_" .. subname, {
description = description,
drawtype = "nodebox",
tiles = {image},
inventory_image = image,
wield_image = image,
paramtype = "light",
paramtype2 = "wallmounted",
is_ground_content = false,
sunlight_propagates = true,
groups = groups,
sounds = sounds,
node_box = {
type = "wallmounted",
wall_top = {-0.5, 0.49, -0.5, 0.5, 0.49, 0.5},
wall_bottom = {-0.5, -0.49, -0.5, 0.5, -0.49, 0.5},
wall_side = {-0.49, -0.5, -0.5, -0.49, 0.5, 0.5},
},
})

if recipeitem then
minetest.register_craft({
type = "shapeless",
output = 'slats:slat_' .. subname .. ' 12',
recipe = {recipeitem, "default:paper"},
})

-- Fuel
local baseburntime = minetest.get_craft_result({
method = "fuel",
width = 1,
items = {recipeitem}
}).time
if baseburntime > 0 then
minetest.register_craft({
type = "fuel",
recipe = 'slats:slat_' .. subname,
burntime = math.floor(baseburntime * 0.5),
})
end
end
end

slats.register_slat(
"stone_block",
"default:stone_block",
{cracky = 2},
"default_stone_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Stone Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"desert_stone_block",
"default:desert_stone_block",
{cracky = 2},
"default_desert_stone_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Desert Stone Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"sandstone_block",
"default:sandstone_block",
{cracky = 2},
"default_sandstone_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Sandstone Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"desert_sandstone_block",
"default:desert_sandstone_block",
{cracky = 2},
"default_desert_sandstone_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Desert Sandstone Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"silver_sandstone_block",
"default:silver_sandstone_block",
{cracky = 2},
"default_silver_sandstone_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Silver Sandstone Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"obsidian_block",
"default:obsidian_block",
{cracky = 1, level = 2},
"default_obsidian_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Obsidian Block Slat",
default.node_sound_stone_defaults()
)

slats.register_slat(
"steelblock",
"default:steelblock",
{cracky = 1, level = 2},
"default_steel_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Steel Block Slat",
default.node_sound_metal_defaults()
)

slats.register_slat(
"copperblock",
"default:copperblock",
{cracky = 1, level = 2},
"default_copper_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Copper Block Slat",
default.node_sound_metal_defaults()
)

slats.register_slat(
"bronzeblock",
"default:bronzeblock",
{cracky = 1, level = 2},
"default_bronze_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Bronze Block Slat",
default.node_sound_metal_defaults()
)

slats.register_slat(
"goldblock",
"default:goldblock",
{cracky = 1},
"default_gold_block.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Gold Block Slat",
default.node_sound_metal_defaults()
)

slats.register_slat(
"wood",
"default:wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
"default_wood.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Wooden Slat",
default.node_sound_wood_defaults()
)

slats.register_slat(
"junglewood",
"default:junglewood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
"default_junglewood.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Jungle Wood Slat",
default.node_sound_wood_defaults()
)

slats.register_slat(
"pine_wood",
"default:pine_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
"default_pine_wood.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Pine Wood Slat",
default.node_sound_wood_defaults()
)

slats.register_slat(
"acacia_wood",
"default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
"default_acacia_wood.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Acacia Wood Slat",
default.node_sound_wood_defaults()
)

slats.register_slat(
"aspen_wood",
"default:aspen_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
"default_aspen_wood.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Aspen Wood Slat",
default.node_sound_wood_defaults()
)
Binary file added textures/slats_slat_overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 723a9c9

Please sign in to comment.