1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-28 11:40:36 +01:00

Update style of default armor formspec

This commit is contained in:
stujones11 2017-02-15 19:37:35 +00:00
parent 4d3b219e7d
commit 4829445d12

View File

@ -56,12 +56,18 @@ armor = {
timer = 0, timer = 0,
elements = {"head", "torso", "legs", "feet"}, elements = {"head", "torso", "legs", "feet"},
physics = {"jump","speed","gravity"}, physics = {"jump","speed","gravity"},
formspec = "size[8,8.5]image[2,0.75;2,4;armor_preview]" formspec = "size[8,8.5]"..
.."list[current_player;main;0,4.5;8,4;]" default.gui_bg..
.."list[current_player;craft;4,1;3,3;]" default.gui_bg_img..
.."list[current_player;craftpreview;7,2;1,1;]" default.gui_slots..
.."listring[current_player;main]" default.get_hotbar_bg(0,4.25)..
.."listring[current_player;craft]", "image[2,0.5;2,4;armor_preview]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"list[current_player;craft;4,0.5;3,3;]"..
"list[current_player;craftpreview;7,1.5;1,1;]"..
"listring[current_player;main]"..
"listring[current_player;craft]",
textures = {}, textures = {},
default_skin = "character", default_skin = "character",
version = "0.4.7", version = "0.4.7",
@ -265,7 +271,7 @@ armor.get_armor_formspec = function(self, name)
minetest.log("error", "3d_armor: Armor def["..name.."] is nil [get_armor_formspec]") minetest.log("error", "3d_armor: Armor def["..name.."] is nil [get_armor_formspec]")
return "" return ""
end end
local formspec = armor.formspec.."list[detached:"..name.."_armor;armor;0,1;2,3;]" local formspec = armor.formspec.."list[detached:"..name.."_armor;armor;0,0.5;2,3;]"
formspec = formspec:gsub("armor_preview", armor.textures[name].preview) formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
formspec = formspec:gsub("armor_level", armor.def[name].level) formspec = formspec:gsub("armor_level", armor.def[name].level)
formspec = formspec:gsub("armor_heal", armor.def[name].heal) formspec = formspec:gsub("armor_heal", armor.def[name].heal)