安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题










if params.capacity then
result.personCapacity = {
type = ({"RESIDENTIAL", "COMMERCIAL", "INDUSTRIAL"})[(params.resComInd or 0) + 1],
capacity = params.capacity * 5
}
else
result.personCapacity = nil
end
You can do better than that with an array of capacities, like {0, 5, 10, 20, 50, 100}. More freedom and no more ugly factor 5.
You can also use BUTTON instead of SLIDER, it's nicer to use.
{
key = "resComInd",
name = _("Type"),
uiType = "BUTTON",
values = { _("Residential"), _("Commercial"), _("Industrial") }
},
{
key = "capacity",
name = _("Capacity"),
uiType = "SLIDER",
values = { _("0"), _("5"), _("10"), _("15"), _("20"), _("25"), _("30"), _("35"), _("40"), _("45"), _("50"), }
}
2) At the end of updateFn, add:
if params.capacity and params.capacity > 0 then
result.personCapacity = {
type = ({"RESIDENTIAL", "COMMERCIAL", "INDUSTRIAL"})[(params.resComInd or 0) + 1],
capacity = params.capacity * 5
}
else
result.personCapacity = {}
end