-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
142 lines (127 loc) · 4.38 KB
/
init.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
local gmc_extras = {
grassy_sides = minetest.settings:get_bool("gmc_extras_grassy_sides") or false,
}
local sandstone_block = {
"default_sandstone.png",
"extras_default_sandstone_block_bottom.png",
"extras_default_sandstone_block_side.png",
"extras_default_sandstone_block_side.png",
"extras_default_sandstone_block_side.png",
"extras_default_sandstone_block_side.png"
}
local dirt_with_grass_grassy = {
"default_grass.png",
"default_dirt.png",
"default_grass.png",
"default_grass.png",
"default_grass.png",
"default_grass.png",
}
local dirt_with_dry_grass_grassy = {
"default_dry_grass.png",
"default_dirt.png",
"default_dry_grass.png",
"default_dry_grass.png",
"default_dry_grass.png",
"default_dry_grass.png",
}
local farming_straw = {
"extras_farming_straw_top_bottom.png",
"extras_farming_straw_top_bottom.png",
"farming_straw.png",
"farming_straw.png",
"farming_straw.png",
"farming_straw.png"
}
local slab_stone_block = {
"extras_slab_stone_block_top_bottom.png",
"extras_slab_stone_block_top_bottom.png",
"extras_slab_stone_block_side.png",
"extras_slab_stone_block_side.png",
"extras_slab_stone_block_side.png",
"extras_slab_stone_block_side.png"
}
local default_chest_christmas = {
"extras_default_chest_christmas_top.png",
"extras_default_chest_christmas_bottom.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_christmas_front.png"
}
local default_chest_lock_christmas = {
"extras_default_chest_christmas_top.png",
"extras_default_chest_christmas_bottom.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_christmas_side.png",
"extras_default_chest_lock_christmas_front.png"
}
local anvil_anvil = {
"extras_anvil_base.png"
}
--default overrides
if minetest.get_modpath("default") ~= nil then
-- default.gui_slots = "listcolors[#00000033;#5A5A5A;#FFFFFF00;#0C021A99;#FFFFFF]"
minetest.override_item("default:sandstone_block", { tiles = sandstone_block })
if os.date("%m") == "12" then
minetest.override_item("default:chest", { tiles = default_chest_christmas })
minetest.override_item("default:chest_lock", { tiles = default_chest_lock_christmas })
end
if gmc_extras.grassy_sides == true then
minetest.override_item("default:dirt_with_grass", { tiles = dirt_with_grass_grassy })
minetest.override_item("default:dirt_with_dry_grass", { tiles = dirt_with_dry_grass_grassy })
end
end
--bed overrides
if minetest.get_modpath("beds") ~= nil then
minetest.register_craft({
output = "beds:bed",
recipe = {
{"wool:green", "wool:green", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
},
})
end
--farming overrides
if minetest.get_modpath("farming") ~= nil then
minetest.override_item("farming:straw", { tiles = farming_straw })
end
--stairs overrides
if minetest.get_modpath("stairs") ~= nil then
minetest.override_item("stairs:slab_stone_block", { tiles = slab_stone_block })
minetest.override_item("stairs:slab_sandstone_block", { tiles = sandstone_block })
minetest.override_item("stairs:stair_sandstone_block", { tiles = sandstone_block })
minetest.override_item("stairs:slab_straw", { tiles = farming_straw })
minetest.override_item("stairs:stair_straw", { tiles = farming_straw })
end
if minetest.get_modpath("carts") ~= nil then
minetest.override_item("carts:cart", { inventory_image = "extras_carts_cart_inv.png" })
end
if minetest.get_modpath("anvil") ~= nil then
anvil_item_displacement = 13/16
minetest.override_item("anvil:anvil", {
tiles = anvil_anvil,
node_box = {
type = "fixed",
fixed = {
{-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}, -- Base
{-0.3125, -0.5, -0.25, 0.3125, -0.1875, 0.25}, -- PoleBase
{-0.25, -0.1875, -0.125, 0.25, 0.125, 0.125}, -- Pole
{-0.5, 0.125, -0.3125, 0.5, 0.5, 0.3125}, -- Block
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}, -- Base
{-0.3125, -0.5, -0.25, 0.3125, -0.1875, 0.25}, -- PoleBase
{-0.25, -0.1875, -0.125, 0.25, 0.125, 0.125}, -- Pole
{-0.5, 0.125, -0.3125, 0.5, 0.5, 0.3125}, -- Block
}
},
})
end
if minetest.get_modpath("itemframes") ~= nil then
minetest.override_item("itemframes:frame", { inventory_image = "extras_itemframes_inv.png" })
end