Fixed: Wrong first and last names orders and some minor bugs

--HG--
branch : develop
feature/pipeline-tools
kervala 9 years ago
parent efac9c97b1
commit bb67a604e6

@ -108,75 +108,65 @@ function outgame:procGenerateName()
local nameResult = ""; local nameResult = "";
local fullnameResult = ""; local fullnameResult = "";
-- Look at outgame:procUpdateNameRaceLabel() for the "race" list. -- Look at outgame:procUpdateNameRaceLabel() for the "race" list.
-- fy ma try zo --> -- fy ma try zo -->
local lastName = "test" local firstName = "test2"
local firstName = "test2" local lastName = "test"
if tonumber( dbNameRace ) == 1 then if tonumber(dbNameRace) == 1 then
-- Fyros -- Fyros
lastName = self:getFyrosLastName() firstName = self:getFyrosFirstName()
firstName = self:getFyrosFirstName() lastName = self:getFyrosLastName()
fullnameResult = lastName .. " " .. firstName elseif tonumber(dbNameRace) == 2 then
nameResult = firstName -- Matis
elseif tonumber( dbNameRace ) == 2 then firstName = self:getMatisFirstName()
-- Matis lastName = self:getMatisLastName()
lastName = self:getMatisLastName() elseif tonumber(dbNameRace) == 3 then
firstName = self:getMatisFirstName() -- Tryker
fullnameResult = lastName .. " " .. firstName firstName = self:getTrykerFirstName()
nameResult = firstName lastName = self:getTrykerLastName()
elseif tonumber( dbNameRace ) == 3 then elseif tonumber(dbNameRace) == 4 then
-- Tryker -- Zorai
lastName = self:getTrykerLastName() firstName = self:getZoraiFirstName()
firstName = self:getTrykerFirstName() lastName = self:getZoraiLastName()
fullnameResult = firstName .. " " .. lastName elseif tonumber(dbNameRace) == 5 then
nameResult = firstName -- Maraudeurs
elseif tonumber( dbNameRace ) == 4 then
-- Zorai -- firstName
lastName = self:getZoraiLastName() if tonumber(dbNameSubRaceFirstName) == 1 then
firstName = self:getZoraiFirstName() -- Fyros
fullnameResult = firstName .. " " .. lastName firstName = self:getFyrosFirstName()
nameResult = firstName elseif tonumber(dbNameSubRaceFirstName) == 2 then
elseif tonumber( dbNameRace ) == 5 then -- Matis M
-- Maraudeurs firstName = self:getMatisFirstName(1)
-- lastName elseif tonumber(dbNameSubRaceFirstName) == 3 then
if tonumber(dbNameSubRace) == 1 then -- Matis F
-- Fyros firstName = self:getMatisFirstName(2)
lastName = self:getFyrosLastName() elseif tonumber(dbNameSubRaceFirstName) == 4 then
elseif tonumber( dbNameSubRace ) == 2 then -- Tryker
-- Matis F firstName = self:getTrykerFirstName()
lastName = self:getMatisLastName(2) elseif tonumber(dbNameSubRaceFirstName) == 5 then
elseif tonumber( dbNameSubRace ) == 3 then -- Zorai
-- Matis M firstName = self:getZoraiFirstName()
lastName = self:getMatisLastName(1) end
elseif tonumber( dbNameSubRace ) == 4 then
-- Tryker -- lastName
lastName = self:getTrykerLastName() if tonumber(dbNameSubRaceLastName) == 1 then
elseif tonumber( dbNameSubRace ) == 5 then -- Fyros
-- Zorai lastName = self:getFyrosLastName()
lastName = self:getZoraiLastName() elseif tonumber(dbNameSubRaceLastName) == 2 then
end -- Matis
lastName = self:getMatisLastName()
-- firstName elseif tonumber(dbNameSubRaceLastName) == 3 then
if tonumber(dbNameSubRace2) == 1 then -- Tryker
-- Fyros lastName = self:getTrykerLastName()
firstName = self:getFyrosFirstName() elseif tonumber(dbNameSubRaceLastName) == 4 then
elseif tonumber( dbNameSubRace2 ) == 2 then -- Zorai
-- Matis lastName = self:getZoraiLastName()
firstName = self:getMatisFirstName() end
firstName = self:getMatisFirstName() end
elseif tonumber( dbNameSubRace2 ) == 3 then
-- Tryker fullnameResult = firstName .. " " .. lastName
firstName = self:getTrykerFirstName() nameResult = firstName
elseif tonumber( dbNameSubRace2 ) == 4 then
-- Zorai
firstName = self:getZoraiFirstName()
end
fullnameResult = lastName .. " " .. firstName
nameResult = firstName
end
uiNameFull.hardtext = fullnameResult;
uiNameFull.hardtext = fullnameResult; uiNameFull.hardtext = fullnameResult;
@ -241,10 +231,10 @@ end
local matisF = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Female")) )):gsub("^%l", string.upper); local matisF = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Female")) )):gsub("^%l", string.upper);
local matisM = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Male")) )):gsub("^%l", string.upper); local matisM = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Male")) )):gsub("^%l", string.upper);
function outgame:procUpdateNameSubRaceLabel() function outgame:procUpdateNameSubRaceFirstNameLabel()
local nameSubRaceType = { "Fyros", matisF, matisM, "Tryker", "Zoraï" } local nameSubRaceFirstNameType = { "Fyros", matisM, matisF, "Tryker", "Zoraï" }
local uiNameSubRaceText = getUI("ui:outgame:appear_name:name_sub_race_slider:name_race"); local uiNameSubRaceFirstNameText = getUI("ui:outgame:appear_name:name_sub_race_first_name_slider:name_race");
local dbNameSubRace = getDbProp("UI:TEMP:NAME_SUB_RACE"); local dbNameSubRaceFirstName = getDbProp("UI:TEMP:NAME_SUB_RACE_FIRST_NAME");
uiNameSubRaceFirstNameText.hardtext= tostring(nameSubRaceFirstNameType[tonumber(dbNameSubRaceFirstName)]); uiNameSubRaceFirstNameText.hardtext= tostring(nameSubRaceFirstNameType[tonumber(dbNameSubRaceFirstName)]);
end end

Loading…
Cancel
Save