-- TODO: Include and support inverted walls

local function createObjectTypesFromAsset(asset)
	if asset then
		local newObjectTypes = {}
		for rotation = 0, 270, 90 do
			table.insert(newObjectTypes, ObjectType.new(asset, rotation, 0))
			if asset then
				local typeConfig = asset:WaitForChild("ObjectType")
				if typeConfig and typeConfig:IsA("StringValue") then
					local type = typeConfig.Value
					if BitOps.getVerticalFaceFromOccupancy(ObjectTypeConfigurations[type].OCCUPANCY) then
						table.insert(newObjectTypes, ObjectType.new(asset, rotation, 180))
					end
				end
			end
		end

		return newObjectTypes
	else
		error("Cannot create a grid object from nil instance")
	end
end

return createObjectTypesFromAsset
