-
Notifications
You must be signed in to change notification settings - Fork 1
/
castle_covers.lua
126 lines (111 loc) · 4.34 KB
/
castle_covers.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
local castle_cover = {}
castle_cover.types = {
{"stonewall","StoneWall","castle_stonewall.png","castle:stonewall"},
{"dungeon","DungeonWall","castle_dungeon_stone.png","castle:dungeonwall"},
{"cornerwall","CornerWall","castle_cornwall.png","castle:cornerwall"},
{"bookshelf","Bookshelf","default_bookshelf.png","default:bookshelf"},
{"dirt","Dirt","default_dirt.png","default:dirt"},
{"stone","Stone","default_stone.png","default:stone"},
{"cobble","Cobble","default_cobble.png","default:cobble"},
{"sand","Sand","default_sand.png","default:sand"},
{"desert_sand","Desert Sand","default_desert_sand.png","default:desert_sand"},
{"desert_stone","Desert Stone","default_desert_stone.png","default:desert-stone"},
{"brick","Brick","default_brick.png","default:brick"},
{"coloredbrick","Colored Brick","color_brick.png","castle:colored_brick"},
{"steel","Steel","default_steel_block.png","default:steelblock"},
{"glass","Glass","default_glass.png","default:glass"},
{"stonebrick","Stone Brick","default_stone_brick.png","default:stonebrick"},
{"desert_stone_brick","Desert Stone Brick","default_desert_stone_brick.png","default:desertstonebrick"},
{"sand_stone_brick","Sand Stone Brick","default_sandstone_brick.png","default:sandstonebrick"},
{"tree","Tree","default_tree.png","default:tree"},
{"wood","Wood","default_wood.png","default:wood"},
{"sand_stone","Sand Stone","default_sandstone.png","default:sandstone"},
{"obsidian","Obsidian","default_obsidian.png","default:obsidian"},
{"gravel","Gravel","default_gravel.png","default:gravel"},
{"pavingstone","Paving Stone","castle_pavement_brick.png","castle:pavement"},
{"desertcobble","Desert Cobble","desert_cobble.png","castle:desert_cobble"},
{"shingles_asphalt", "Shingles Asphalt", "shingles_asphalt.png", "castle:shingles_asphalt"},
{"shingles_terracotta", "Shingles Terracotta", "shingles_terracotta.png", "castle:shingles_terracotta"},
{"shingles_wood", "Shingles Wood", "shingles_wood.png", "castle:shingles_wood"},
{"castle_straw_bale","Straw Bale","castle_straw_bale.png","castle:straw_bale"},
{"castle_straw_bale_reinforced","Straw Bale Reinforced","castle_secret_door_straw_bale_top.png","castle:straw_bale_reinforced"},
{"lawn", "Lawn", "default_grass.png","castle:lawn"},
{"lawn2", "Lawn2", "castle_lawn2.png","castle:lawn2"},
{"lawn3", "Lawn3", "castle_lawn3.png","castle:lawn3"},
-- {"leaves","Desert Leaves","default_leaves.png","default:default_leaves"},
}
for _, row in ipairs(castle_cover.types) do
local name = row[1]
local desc = row[2]
local inv = row[3]
local craft_logical = row[4]
-- Cover Definition
minetest.register_node("castle:cover_" ..name, {
description = desc.. " Cover ",
inventory_image = inv ,
tiles = { inv },
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box={
type="fixed",
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 }
},
selection_box={
type="fixed",
fixed = { -0.5, -0.5, 0.4375, 0.5, 0.5, 0.5 }
},
groups = {choppy=2,dig_immediate=1},
-- sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "castle:cover_" ..name.. "8",
recipe = {
{"castle:saw", craft_logical ,""},
{"", "", ""},
{"", "", ""}
},
})
end
-------------------
------------------Saw
---------------------
minetest.register_craftitem("castle:saw", {
description = "Handsaw",
tiles = { 'coversaw.png' },
inventory_image = 'coversaw.png',
})
minetest.register_craftitem("castle:sawhandle", {
description = "Saw Handle",
tiles = { 'sawhandle.png' },
inventory_image = 'sawhandle.png',
})
minetest.register_craftitem("castle:sawblade", {
description = "Saw Blade",
tiles = { 'sawblade.png' },
inventory_image = 'sawblade.png',
})
minetest.register_craft({
output = "castle:sawhandle",
recipe = {
{"default:stick", "default:stick", "default:stick"},
{"default:stick", "", ""},
{"", "", ""},
},
})
minetest.register_craft({
output = "castle:sawblade",
recipe = {
{"default:cobble", "default:cobble", "default:cobble"},
{"default:stick", "default:stick", "default:stick"},
{"", "", ""},
},
})
minetest.register_craft({
output = "castle:saw",
recipe = {
{"castle:sawhandle", "castle:sawblade", ""},
{"", "", ""},
{"", "", ""},
},
})