Skip to content

Commit ccc5e5d

Browse files
committed
.
1 parent 394166c commit ccc5e5d

File tree

23 files changed

+92
-85
lines changed

23 files changed

+92
-85
lines changed

.luacheckrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ read_globals = {
44
"minetest",
55
"table",
66
"vector",
7-
"default"
7+
"xcompat"
88
}
99

1010
globals = {

boards/init.lua

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ local function set_formspec(pos)
3333
local meta = minetest.get_meta(pos)
3434
local display_text = minetest.formspec_escape(meta:get_string("display_text"))
3535
meta:set_string("formspec",
36-
"size[6,3.5]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
36+
"size[6,3.5]"..
3737
"textarea[0.55,0.25;5.5,3;display_text;"..FS("Text")..";" .. display_text .. "]"..
3838
"button_exit[1,2.75;2,1;ok;"..FS("Write").."]"..
3939
"button[3,2.75;2,1;font;"..FS("Font").."]")
@@ -52,6 +52,8 @@ local function on_receive_fields(pos, formname, fields, player)
5252
end
5353
end
5454

55+
local wood_texture = xcompat.textures.wood.planks
56+
5557
local models = {
5658
black_board = {
5759
depth = 1/16, width = 1, height = 1,
@@ -65,9 +67,9 @@ local models = {
6567
},
6668
node_fields = {
6769
description = S("Black board"),
68-
tiles = { "default_wood.png", "default_wood.png",
69-
"default_wood.png", "default_wood.png",
70-
"default_wood.png", "board_black_front.png" },
70+
tiles = {wood_texture, wood_texture,
71+
wood_texture, wood_texture,
72+
wood_texture, "board_black_front.png"},
7173
_itemframe_texture = "board_black_front.png",
7274
drawtype = "nodebox",
7375
node_box = {
@@ -103,9 +105,9 @@ local models = {
103105
},
104106
node_fields = {
105107
description = S("Green board"),
106-
tiles = { "default_wood.png", "default_wood.png",
107-
"default_wood.png", "default_wood.png",
108-
"default_wood.png", "board_green_front.png" },
108+
tiles = {wood_texture, wood_texture,
109+
wood_texture, wood_texture,
110+
wood_texture, "board_green_front.png"},
109111
drawtype = "nodebox",
110112
_itemframe_texture = "board_green_front.png",
111113
node_box = {
@@ -138,19 +140,21 @@ do
138140
end
139141

140142
-- Recipes
143+
local mat = xcompat.materials
144+
141145
minetest.register_craft(
142146
{
143147
output = "boards:black_board",
144148
recipe = {
145-
{"group:wood", "group:stone", "dye:black"},
149+
{"group:wood", "group:stone", mat.dye_black},
146150
}
147151
})
148152

149153
minetest.register_craft(
150154
{
151155
output = "boards:green_board",
152156
recipe = {
153-
{"group:wood", "group:stone", "dye:dark_green"},
157+
{"group:wood", "group:stone", mat.dye_dark_green},
154158
}
155159
})
156160

boards/mod.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name = boards
22
title = Black boards
33
description = Writable school boards using sign_api
4-
depends = default,signs_api
4+
depends = signs_api, xcompat

display_api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This library's purpose is to ease creation of nodes with one or more displays on
44

55
**Limitations**: This lib uses entities to draw display. This means display has to be vertical (and "upside up") on Minetest before version 5.0.
66

7-
**Dependancies**:default
7+
**Dependencies**: xcompat
88

99
**License**: LGPLv2
1010

font_api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A library for rendernig text on textures (to be used with display_api for sign creation).
44

5-
**Dependancies**: default
5+
**Dependencies**: xcompat
66

77
**License**: LGPL
88

font_api/fontform.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ local function show_font_formspec(playername)
9898
table.sort(fonts)
9999

100100
local fs = string.format(
101-
"size[4,%s]%s%s%sbutton_exit[0,%s;4,1;cancel;%s]",
102-
#fonts + 0.8, default.gui_bg, default.gui_bg_img, default.gui_slots,
103-
#fonts, FS("Cancel"))
101+
"size[4,%s]button_exit[0,%s;4,1;cancel;%s]",
102+
#fonts + 0.8, #fonts, FS("Cancel"))
104103

105104
for line = 1, #fonts do
106105
local font = font_api.get_font(fonts[line])

ontime_clocks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This mod provides clocks that display real ingame time.
44

55
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
66

7-
**Dependancies**: display_api, default
7+
**Dependencies**: display_api, xcompat
88

99
**License**: Code under LGPL, textures under CC-BY-SA
1010

ontime_clocks/crafts.lua

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,58 @@
1818
along with ontime_clocks. If not, see <http://www.gnu.org/licenses/>.
1919
--]]
2020

21+
local mat = xcompat.materials
22+
2123
minetest.register_craft({
2224
output = 'ontime_clocks:green_digital',
2325
recipe = {
24-
{'', 'dye:green', ''},
25-
{'default:glass', 'default:mese_crystal', 'default:glass'},
26+
{'', mat.dye_green, ''},
27+
{mat.glass, mat.mese_crystal, mat.glass},
2628
{'', '', ''},
2729
}
2830
})
2931

3032
minetest.register_craft({
3133
output = 'ontime_clocks:red_digital',
3234
recipe = {
33-
{'', 'dye:red', ''},
34-
{'default:glass', 'default:mese_crystal', 'default:glass'},
35+
{'', mat.dye_red, ''},
36+
{mat.glass, mat.mese_crystal, mat.glass},
3537
{'', '', ''},
3638
}
3739
})
3840

3941
minetest.register_craft({
4042
output = 'ontime_clocks:white',
4143
recipe = {
42-
{'default:steel_ingot', 'default:paper', 'default:steel_ingot'},
43-
{'', 'default:mese_crystal', ''},
44+
{mat.steel_ingot, mat.paper, mat.steel_ingot},
45+
{'', mat.mese_crystal, ''},
4446
{'', '', ''},
4547
}
4648
})
4749

4850
minetest.register_craft({
4951
output = 'ontime_clocks:frameless_black',
5052
recipe = {
51-
{'default:steel_ingot', 'dye:black', 'default:steel_ingot'},
52-
{'', 'default:mese_crystal', ''},
53+
{mat.steel_ingot, mat.dye_black, mat.steel_ingot},
54+
{'', mat.mese_crystal, ''},
5355
{'', '', ''},
5456
}
5557
})
5658

5759
minetest.register_craft({
5860
output = 'ontime_clocks:frameless_gold',
5961
recipe = {
60-
{'default:gold_ingot', '', 'default:gold_ingot'},
61-
{'', 'default:mese_crystal', ''},
62+
{mat.gold_ingot, '', mat.gold_ingot},
63+
{'', mat.mese_crystal, ''},
6264
{'', '', ''},
6365
}
6466
})
6567

6668
minetest.register_craft({
6769
output = 'ontime_clocks:frameless_white',
6870
recipe = {
69-
{'default:steel_ingot', 'dye:white', 'default:steel_ingot'},
70-
{'', 'default:mese_crystal', ''},
71+
{mat.steel_ingot, mat.dye_white, mat.steel_ingot},
72+
{'', mat.mese_crystal, ''},
7173
{'', '', ''},
7274
}
7375
})

ontime_clocks/mod.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name = ontime_clocks
22
title = Ontime Clocks
33
description = Clocks displaing real ingame time
4-
depends = default,dye,display_api
4+
depends = display_api, xcompat

signs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This mod provides various signs with text display. Text is locked if area is pro
44

55
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
66

7-
**Dependancies**: default, display\_lib, font\_lib
7+
**Dependencies**: xcompat, display\_lib, font\_lib
88

99
**License**: Code under LGPL, Textures and models under CC-BY-SA
1010

signs/crafts.lua

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
local mat = xcompat.materials
2+
13
minetest.register_craft({
24
output = 'signs:wooden_right_sign',
35
recipe = {
46
{'group:wood', 'group:wood', 'group:wood'},
5-
{'group:wood', 'group:wood', 'dye:black'},
7+
{'group:wood', 'group:wood', mat.dye_black},
68
{'', '', ''},
79
}
810
})
@@ -16,7 +18,7 @@ minetest.register_craft({
1618
minetest.register_craft({
1719
output = 'signs:wooden_long_sign',
1820
recipe = {
19-
{'group:wood', 'dye:black', 'group:wood'},
21+
{'group:wood', mat.dye_black, 'group:wood'},
2022
{'group:wood', 'group:wood', 'group:wood'},
2123
{'', '', ''},
2224
}
@@ -31,7 +33,7 @@ minetest.register_craft({
3133
minetest.register_craft({
3234
output = 'signs:wooden_sign',
3335
recipe = {
34-
{'', 'dye:black', ''},
36+
{'', mat.dye_black, ''},
3537
{'group:wood', 'group:wood', 'group:wood'},
3638
{'group:wood', 'group:wood', 'group:wood'},
3739
}
@@ -40,22 +42,22 @@ minetest.register_craft({
4042
minetest.register_craft({
4143
output = 'signs:paper_poster',
4244
recipe = {
43-
{'default:paper', 'default:paper', 'dye:black'},
44-
{'default:paper', 'default:paper', ''},
45-
{'default:paper', 'default:paper', ''},
45+
{mat.paper, mat.paper, mat.dye_black},
46+
{mat.paper, mat.paper, ''},
47+
{mat.paper, mat.paper, ''},
4648
}
4749
})
4850

4951
minetest.register_craft({
5052
output = 'signs:label_small',
5153
recipe = {
52-
{'default:paper', 'dye:black'},
54+
{mat.paper, mat.dye_black},
5355
}
5456
})
5557

5658
minetest.register_craft({
5759
output = 'signs:label_medium',
5860
recipe = {
59-
{'default:paper', 'default:paper', 'dye:black'},
61+
{mat.paper, mat.paper, mat.dye_black},
6062
}
6163
})

signs/mod.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name = signs
22
title = Signs
33
description = Basic signs and posters with text display using signs_api
4-
depends = default,dye,signs_api
4+
depends = signs_api, xcompat

signs/nodes.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ local function edit_poster(pos, node, player)
6565

6666
if not minetest.is_protected(pos, player:get_player_name()) then
6767
fs = string.format([=[
68-
size[6.5,7.5]%s%s%s
68+
size[6.5,7.5]
6969
field[0.5,0.7;6,1;display_text;%s;%s]
7070
textarea[0.5,1.7;6,6;text;%s;%s]
7171
button[1.25,7;2,1;font;%s]
7272
button_exit[3.25,7;2,1;write;%s]]=],
73-
default.gui_bg, default.gui_bg_img, default.gui_slots, FS("Title"),
73+
FS("Title"),
7474
minetest.formspec_escape(meta:get_string("display_text")),
7575
FS("Text"), minetest.formspec_escape(meta:get_string("text")),
7676
FS("Title font"), FS("Write"))

signs_api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ No actual signs get registered by this mod, the signs are defined in the sign su
55

66
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
77

8-
**Dependancies**: default, display\_lib, font\_lib
8+
**Dependencies**: xcompat, display\_lib, font\_lib
99

1010
**License**: Code under LGPL, Textures and models under CC-BY-SA
1111

signs_api/init.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ function signs_api.set_formspec(pos)
6767
fs = fs.."button[1,"..y..";2,1;font;"..FS("Font").."]"
6868
fs = fs.."button_exit[3,"..y..";2,1;ok;"..FS("Write").."]"
6969
y = y + 0.8
70-
fs = "size[6,"..y.."]"..default.gui_bg..
71-
default.gui_bg_img..default.gui_slots..fs
70+
fs = "size[6,"..y.."]"..fs
7271

7372
meta:set_string("formspec", fs)
7473
end
@@ -171,7 +170,7 @@ function signs_api.register_sign(mod, name, model)
171170
},
172171
groups = {choppy=2, dig_immediate=2, not_blocking_trains=1, display_api=1,signs_api_formspec_lbm=1},
173172
is_ground_content = false,
174-
sounds = default.node_sound_defaults(),
173+
sounds = xcompat.sounds.node_sound_default(),
175174
display_entities = {
176175
["signs:display_text"] = {
177176
on_display_update = font_api.on_display_update,

signs_api/mod.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name = signs_api
22
title = Signs API
33
description = A library providing various helper functions for registereing signs with text display
4-
depends = default,display_api,font_api
4+
depends = display_api, font_api, xcompat

signs_road/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This mod provides road signs with text display. Text is locked if area is protec
44

55
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
66

7-
**Dependancies**: default, display\_lib, font\_lib, signs
7+
**Dependencies**: xcompat, display\_lib, font\_lib, signs
88

99
**License**: Code under LGPL, texture under CC-BY-SA
1010

0 commit comments

Comments
 (0)