Changed: Minor changes (spaces replaced by tabs)

This commit is contained in:
kervala 2016-03-14 23:58:58 +01:00
parent 49f62f7747
commit 9a4ef0501f
2 changed files with 427 additions and 422 deletions

View file

@ -25,6 +25,7 @@ function outgame:getFyrosFirstName()
return fyrosFirstNames[math.random(nbFyrosFirstNames)]
end
function outgame:getFyrosLastName()
local nbFyrosLastNames = 0;
for _ in pairs(fyrosLastNames) do nbFyrosLastNames = nbFyrosLastNames + 1 end
@ -34,6 +35,7 @@ end
-- Matis
function outgame:getMatisFirstName(sex)
-- 1 = male, 2 = female
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX");
if sex ~= nil then
@ -41,7 +43,7 @@ function outgame:getMatisFirstName(sex)
end
local FirstName = ""
if tonumber( dbNameSex )== 1 then
if tonumber(dbNameSex) == 1 then
local nbMatisMaleFirstNames = 0;
for _ in pairs(matisMaleFirstNames) do nbMatisMaleFirstNames = nbMatisMaleFirstNames + 1 end
FirstName = matisMaleFirstNames[math.random(nbMatisMaleFirstNames)];
@ -69,6 +71,7 @@ function outgame:getTrykerFirstName()
return trykerFirstNames[math.random(nbTrykerFirstNames)]
end
function outgame:getTrykerLastName()
local nbTrykerLastNames = 0;
for _ in pairs(trykerLastNames) do nbTrykerLastNames = nbTrykerLastNames + 1 end
@ -173,6 +176,8 @@ function outgame:procGenerateName()
nameResult = firstName
end
uiNameFull.hardtext = fullnameResult;
uiNameFull.hardtext = fullnameResult;
nameResult = string.gsub(nameResult, "'", "");
@ -182,6 +187,7 @@ function outgame:procGenerateName()
nameResult = nameResult:gsub("^%l", string.upper);
uiGenText.input_string = nameResult;
end
-- Name sex slider update.
function outgame:procUpdateNameSexLabel()
local nameSexType = { "uiCP_Sex_Male", "uiCP_Sex_Female" }
@ -189,11 +195,12 @@ function outgame:procUpdateNameSexLabel()
local uiNameSex = getDbProp("UI:TEMP:NAME_SEX");
tempstr = tostring(i18n.get(nameSexType[tonumber(uiNameSex)]));
tempstr = string.lower( tempstr );
tempstr = string.lower(tempstr);
tempstr = (tempstr:gsub("^%l", string.upper));
uiNameSexText.hardtext= tempstr;
uiNameSexText.hardtext = tempstr;
end
-- Name race slider update.
function outgame:procUpdateNameRaceLabel()
local nameRaceType = { "Fyros", "Matis", "Tryker", "Zoraï", "uiCP_Maraudeur" }
@ -227,8 +234,7 @@ function outgame:procUpdateNameRaceLabel()
uiNameSubRace2Slider.active = false;
end
uiNameRaceText.hardtext= tostring(nameRaceType[tonumber(dbNameRace)]);
uiNameRaceText.hardtext = tostring(nameRaceType[tonumber(dbNameRace)]);
end

View file

@ -1273,8 +1273,7 @@
<group type="modal" id="appear_name" posref="MM MM" w="400" h="680"
mouse_pos="false" escapable="false" exit_click_out="false"
on_active="proc" on_active_params="proc_appear_name_active"
display="false"
>
display="false">
<instance template="outgame_popup" id="back" posref="TL TL" />
@ -1539,13 +1538,13 @@
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB2_RACE|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_FIRST_NAME|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE_LAST_NAME|value=1" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<action handler="lua:outgame:procUpdateNameSubRaceFirstNameLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLastNameLabel()" />
<!-- End Name Generator. -->
</proc>