Use different style for wagon prop. formspec
This commit is contained in:
parent
e39cd526f0
commit
c3f9da6f24
11
init.lua
11
init.lua
@ -188,8 +188,8 @@ local function doc_register_wagon(itemname)
|
||||
table.insert(desctext, S2(v .. ": @1", prototype[k] and "Defined" or "Undefined"))
|
||||
end
|
||||
|
||||
local x0, y0 = doc.FORMSPEC.ENTRY_START_X, doc.FORMSPEC.ENTRY_START_Y
|
||||
local x1, y1 = doc.FORMSPEC.ENTRY_END_X+0.75, doc.FORMSPEC.ENTRY_END_Y
|
||||
local x0, y0 = doc.FORMSPEC.ENTRY_START_X+0.25, doc.FORMSPEC.ENTRY_START_Y
|
||||
local x1, y1 = doc.FORMSPEC.ENTRY_END_X+0.75, doc.FORMSPEC.ENTRY_END_Y+0.625
|
||||
local width, height = x1-x0, y1-y0
|
||||
local mside = height/2
|
||||
|
||||
@ -199,11 +199,10 @@ local function doc_register_wagon(itemname)
|
||||
textures = fsescape(string.format("%s_%s.png", dlxlivdef.filename_prefix, dlxlivdef[0].code))
|
||||
end
|
||||
local fstext = {
|
||||
doc.widgets.text(table.concat(desctext, "\n"), x0, y0, width-mside, height),
|
||||
string.format("item_image[%f,%f;%f,%f;%s]", x1-mside, y0, mside, mside, fsescape(itemname)),
|
||||
"style[wagon_model;bgcolor=#000]",
|
||||
string.format("textarea[%f,%f;%f,%f;;;%s]", x0, y0, width-mside, height+0.875, fsescape(table.concat(desctext, "\n"))),
|
||||
string.format("item_image[%f,%f;%f,%f;%s]", x1-mside, y0+0.0625, mside, mside, fsescape(itemname)),
|
||||
string.format("model[%f,%f;%f,%f;%s;%s;%s;%f,%f]",
|
||||
x1-mside, y1-mside+0.625, mside, mside, "wagon_model", mesh, textures, -30, 135),
|
||||
x1-mside, y1-mside, mside, mside, "wagon_model", mesh, textures, -30, 135),
|
||||
}
|
||||
minetest.override_item(itemname, {_doc_items_create_entry = false})
|
||||
doc.add_entry("advtrains_wagons", itemname, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user