Skip to content

Commit

Permalink
Bugfix: invalid capture index with non-english player names, resolves #…
Browse files Browse the repository at this point in the history
  • Loading branch information
stujones11 committed Oct 17, 2015
1 parent 741faf3 commit 64f6be4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions 3d_armor/armor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ armor = {
player_hp = {},
elements = {"head", "torso", "legs", "feet"},
physics = {"jump","speed","gravity"},
formspec = "size[8,8.5]list[detached:player_name_armor;armor;0,1;2,3;]"
.."image[2,0.75;2,4;armor_preview]"
formspec = "size[8,8.5]image[2,0.75;2,4;armor_preview]"
.."list[current_player;main;0,4.5;8,4;]"
.."list[current_player;craft;4,1;3,3;]"
.."list[current_player;craftpreview;7,2;1,1;]",
Expand All @@ -78,7 +77,6 @@ armor = {
if minetest.get_modpath("inventory_plus") then
inv_mod = "inventory_plus"
armor.formspec = "size[8,8.5]button[0,0;2,0.5;main;Back]"
.."list[detached:player_name_armor;armor;0,1;2,3;]"
.."image[2.5,0.75;2,4;armor_preview]"
.."label[5,1;Level: armor_level]"
.."label[5,1.5;Heal: armor_heal]"
Expand Down Expand Up @@ -328,7 +326,7 @@ armor.get_armor_formspec = function(self, name)
minetest.log("error", "3d_armor: Armor def["..name.."] is nil [get_armor_formspec]")
return ""
end
local formspec = armor.formspec:gsub("player_name", name)
local formspec = armor.formspec.."list[detached:"..name.."_armor;armor;0,1;2,3;]"
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
formspec = formspec:gsub("armor_level", armor.def[name].level)
formspec = formspec:gsub("armor_heal", armor.def[name].heal)
Expand Down

0 comments on commit 64f6be4

Please sign in to comment.