Replace string comparison with df.is_instance

develop
Ryan Dwyer 2023-11-08 17:44:40 -08:00
parent 674bf94344
commit 7516e6f268
1 changed files with 2 additions and 2 deletions

@ -98,9 +98,9 @@ local function get_location_search_key(zone)
end
-- for temples and guildhalls, get assigned organization
if language_name_types[building.name.type] == 'Temple' then
if df.abstract_building_templest:is_instance(building) then
table.insert(result, get_location_religion(building.deity_data.Deity or building.deity_data.Religion, building.deity_type))
elseif language_name_types[building.name.type] == 'Guildhall' then
elseif df.abstract_building_guildhallst:is_instance(building) then
local dwarfified_profession = locationselector.get_profession_string(building.contents.profession):gsub('[Mm][Aa][Nn]', 'dwarf') -- Craftsman becomes Craftsdwarf, etc
table.insert(result, dwarfified_profession)
end