mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-10-23 11:55:41 +02:00
Make dp_modpack game agnostic using XCompat (#14)
* . * Add `material.sandstone` (not in upstream xcompat yet)
This commit is contained in:
@@ -4,7 +4,7 @@ This mod provides stone steles with text display. Text is locked if area is prot
|
||||
|
||||
For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
|
||||
|
||||
**Dependancies**: default, display\_lib, font\_lib, technic?
|
||||
**Dependencies**: xcompat, display\_lib, font\_lib, technic?
|
||||
|
||||
(Technic adds marble and granite steles)
|
||||
|
||||
|
@@ -19,11 +19,12 @@
|
||||
--]]
|
||||
|
||||
local S = steles.S
|
||||
local mat = xcompat.materials
|
||||
|
||||
steles.materials = {
|
||||
'default:stone',
|
||||
'default:sandstone',
|
||||
'default:desert_stone',
|
||||
mat.stone,
|
||||
mat.sandstone,
|
||||
mat.desert_stone,
|
||||
'technic:marble',
|
||||
'technic:granite',
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ for _, material in ipairs(steles.materials) do
|
||||
output = 'steles:'..parts[2]..'_stele 4',
|
||||
recipe = {
|
||||
{'', material, ''},
|
||||
{'', 'dye:black', ''},
|
||||
{'', xcompat.materials.dye_black, ''},
|
||||
{material, material, material},
|
||||
}
|
||||
})
|
||||
|
@@ -1,5 +1,5 @@
|
||||
name = steles
|
||||
title = Steles
|
||||
description = Stone steles with text display on them
|
||||
depends = default,display_api,font_api
|
||||
depends = display_api, font_api, xcompat
|
||||
optional_depends = technic
|
||||
|
@@ -36,13 +36,11 @@ for i, material in ipairs(steles.materials) do
|
||||
local meta = minetest.get_meta(pos)
|
||||
local display_text = minetest.formspec_escape(meta:get_string("display_text"))
|
||||
meta:set_string("formspec", string.format([=[
|
||||
size[6,4]%s%s%s
|
||||
size[6,4]
|
||||
textarea[0.5,0.7;5.5,2;display_text;%s;%s]
|
||||
button[1,3;2,1;font;%s]
|
||||
button_exit[3,3;2,1;ok;%s]]=],
|
||||
default.gui_bg, default.gui_bg_img, default.gui_slots,
|
||||
FS("Displayed text (3 lines max)"),
|
||||
display_text,
|
||||
FS("Displayed text (3 lines max)"), display_text,
|
||||
FS("Font"), FS("Write")))
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user