Refine some patterns capitalizing

This commit is contained in:
kilbith 2015-08-24 21:12:38 +02:00
parent a44a98c44e
commit 3839cb6781
2 changed files with 5 additions and 5 deletions

View File

@ -209,7 +209,7 @@ local colors = {"red"} -- Add more curtains colors simply here.
for _, c in pairs(colors) do for _, c in pairs(colors) do
xdecor.register("curtain_"..c, { xdecor.register("curtain_"..c, {
description = c:gsub("%l", string.upper, 1).." Curtain", description = c:gsub("^%l", string.upper).." Curtain",
use_texture_alpha = true, use_texture_alpha = true,
walkable = false, walkable = false,
tiles = {"xdecor_curtain.png^[colorize:"..c..":130"}, tiles = {"xdecor_curtain.png^[colorize:"..c..":130"},
@ -271,7 +271,7 @@ local door_types = {
for _, d in pairs(door_types) do for _, d in pairs(door_types) do
doors.register_door("xdecor:"..d[1].."_door", { doors.register_door("xdecor:"..d[1].."_door", {
description = d[1]:gsub("%l", string.upper, 1).." Door", description = d[1]:gsub("^%l", string.upper).." Door",
inventory_image = "xdecor_"..d[1].."_door_inv.png", inventory_image = "xdecor_"..d[1].."_door_inv.png",
groups = {choppy=3, flammable=2, door=1}, groups = {choppy=3, flammable=2, door=1},
tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"}, tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"},
@ -557,8 +557,8 @@ local stonish = {"desertstone_tile", "stone_tile", "stone_rune",
for _, t in pairs(stonish) do for _, t in pairs(stonish) do
xdecor.register(t, { xdecor.register(t, {
drawtype = "normal", drawtype = "normal",
description = string.sub(t:gsub("%l", string.upper, 1), 1, -6) description = string.sub(t:gsub("^%l", string.upper), 1, -6)
.." "..t:sub(-4):gsub("%l", string.upper, 1), .." "..t:sub(-4):gsub("^%l", string.upper),
tiles = {"xdecor_"..t..".png"}, tiles = {"xdecor_"..t..".png"},
groups = {cracky=2}, groups = {cracky=2},
sounds = sound.stone sounds = sound.stone

View File

@ -194,7 +194,7 @@ xdecor.register("worktable", {
}) })
local function description(m, w) local function description(m, w)
return m:gsub("%l", string.upper, 1).." "..w:gsub("%l", string.upper, 1) return m:gsub("^%l", string.upper).." "..w:gsub("^%l", string.upper)
end end
local function groups(m) local function groups(m)