Rename 'get_typestring_from_language_name' to 'get_location_type_from_language_name'

develop
Ryan Dwyer 2023-11-07 12:55:55 -08:00
parent fc2819ec1a
commit 14d441344f
1 changed files with 2 additions and 2 deletions

@ -38,7 +38,7 @@ local function get_default_zone_name(zone_type)
return zone_names[zone_type] or '' return zone_names[zone_type] or ''
end end
local function get_typestring_from_language_name(language_name_type) local function get_location_type_from_language_name(language_name_type)
-- Looking at df.language.xml I think SymbolFood and SymbolDomestic are the only two we need to override? -- Looking at df.language.xml I think SymbolFood and SymbolDomestic are the only two we need to override?
-- Every other df.language_name_type for a location matches the displayed type name (e.g. Temples are language_name_type.Temple, etc) -- Every other df.language_name_type for a location matches the displayed type name (e.g. Temples are language_name_type.Temple, etc)
return language_name_type_strings[language_name_type] or df.language_name_type[language_name_type] return language_name_type_strings[language_name_type] or df.language_name_type[language_name_type]
@ -66,7 +66,7 @@ local function get_zone_search_key(zone)
else -- zone is a special location and we need to get its type from world data else -- zone is a special location and we need to get its type from world data
local building, success, _ = utils.binsearch(site.buildings, zone.location_id, 'id') local building, success, _ = utils.binsearch(site.buildings, zone.location_id, 'id')
if success and building.name then if success and building.name then
table.insert(result, get_typestring_from_language_name(building.name.type)) table.insert(result, get_location_type_from_language_name(building.name.type))
if building.name.has_name then if building.name.has_name then
table.insert(result, dfhack.TranslateName(building.name, true)) table.insert(result, dfhack.TranslateName(building.name, true))
end end