Skip to content

Commit

Permalink
stairs
Browse files Browse the repository at this point in the history
  • Loading branch information
arpruss committed Oct 1, 2015
1 parent f07339b commit 78a6691
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions raspberryjammod/block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ block.MOSS_STONE = block.Block(48)
block.OBSIDIAN = block.Block(49)
block.TORCH = block.Block(50)
block.FIRE = block.Block(51)
block.stair_WOOD = block.Block(53)
block.STAIR_WOOD = block.Block(53)
block.CHEST = block.Block(54)
block.DIAMOND_ORE = block.Block(56)
block.DIAMOND_BLOCK = block.Block(57)
Expand All @@ -57,7 +57,7 @@ block.FURNACE_INACTIVE = block.Block(61)
block.FURNACE_ACTIVE = block.Block(62)
block.DOOR_WOOD = block.Block(64)
block.LADDER = block.Block(65)
block.stair_COBBLESTONE = block.Block(67)
block.STAIR_COBBLESTONE = block.Block(67)
block.DOOR_IRON = block.Block(71)
block.REDSTONE_ORE = block.Block(73)
block.STONE_BUTTON = block.Block(77)
Expand Down Expand Up @@ -211,7 +211,7 @@ block.BLOCK[block.SANDSTONE]={name="default:sandstone"}
-- block.BLOCK[block.COBWEB]={name="default:"}
block.BLOCK[block.GRASS_TALL]={name="default:junglegrass"}
block.BLOCK[block.WOOL]={name="wool:white"}
block.BLOCK[block.WATERLILY]={name="flowers:dandelion_yellow"} --fix
block.BLOCK[block.WATERLILY]={name="flowers:dandelion_white"} --fix
block.BLOCK[block.FLOWER_YELLOW]={name="flowers:dandelion_yellow"}
block.BLOCK[block.FLOWER_CYAN]={name="flowers:geranium"}
block.BLOCK[block.MUSHROOM_BROWN]={name="flowers:mushroom_brown"}
Expand All @@ -226,7 +226,6 @@ block.BLOCK[block.MOSS_STONE]={name="default:mossycobble"}
block.BLOCK[block.OBSIDIAN]={name="default:obsidian"}
block.BLOCK[block.TORCH]={name="default:torch"}
block.BLOCK[block.FIRE]={name="fire:basic_flame"}
block.BLOCK[block.stair_WOOD]={name="stairs:stair_wood"} -- FIX orientation
block.BLOCK[block.CHEST]={name="default:chest"}
block.BLOCK[block.DIAMOND_ORE]={name="default:stone_with_diamond"}
block.BLOCK[block.DIAMOND_BLOCK]={name="default:diamondblock"}
Expand All @@ -235,7 +234,6 @@ block.BLOCK[block.FARMLAND]={name="farming:soil"}
block.BLOCK[block.FURNACE_INACTIVE]={name="default:furnace"}
block.BLOCK[block.FURNACE_ACTIVE]={name="default:furnace_active"}
block.BLOCK[block.LADDER]={name="default:ladder"}
block.BLOCK[block.stair_COBBLESTONE]={name="stairs:stair_cobble"}
block.BLOCK[block.REDSTONE_ORE]={name="wool:red"} -- fix
--block.BLOCK[block.STONE_BUTTON]={name="default:"}
block.BLOCK[block.SNOW]={name="default:snow"}
Expand Down Expand Up @@ -419,8 +417,38 @@ end
defineDoor(block.DOOR_WOOD, "doors:door_wood")
defineDoor(block.DOOR_IRON, "doors:door_steel")

block.BLOCK[block.DOOR_WOOD]={name="doors:door_wood"}
block.BLOCK[block.DOOR_IRON]={name="doors:door_steel"}
local function defineStair(base_num,base_name)
block.BLOCK[block.Block(base_num,0)] = {name=base_name, param2=1}
block.BLOCK[block.Block(base_num,1)] = {name=base_name, param2=3}
block.BLOCK[block.Block(base_num,2)] = {name=base_name, param2=2}
block.BLOCK[block.Block(base_num,3)] = {name=base_name, param2=0}

block.BLOCK[block.Block(base_num,4)] = {name=base_name, param2=17}
block.BLOCK[block.Block(base_num,5)] = {name=base_name, param2=21}
block.BLOCK[block.Block(base_num,6)] = {name=base_name, param2=22}
block.BLOCK[block.Block(base_num,7)] = {name=base_name, param2=20}
end

defineStair(block.STAIR_WOOD, "stairs:stair_wood")
defineStair(block.STAIR_COBBLESTONE, "stairs:stair_cobble")
defineStair(108, "stairs:stair_brick")
defineStair(109, "stairs:stair_stonebrick")
defineStair(114, "stairs:stair_desert_stonebrick") -- fix: nether brick
defineStair(128, "stairs:stair_sandstone")
defineStair(134, "stairs:stair_pine_wood")
defineStair(135, "stairs:stair_wood") -- fix: birch
defineStair(136, "stairs:stair_junglewood")
defineStair(156, "stairs:stair_desert_stone") -- fix: quartz
defineStair(163, "stairs:stair_acacia_wood")
defineStair(164, "stairs:stair_wood") -- fix: dark oak
defineStair(180, "stairs:stair_sandstone") -- fix: red sandstone
defineStair(203, "stairs:stair_wood") -- fix: purpur

minetest.log("info", "Checking for missing blocks")
for id,entry in pairs(block.BLOCK) do
if not minetest.registered_nodes[entry.name] then
minetest.log("error", "Missing block "..entry.name)
end
end

return block

0 comments on commit 78a6691

Please sign in to comment.